/* Javascript Document */

/*------------------------------------------------------------------------
# Apu.C.E 1.0 - June, 2009
# ------------------------------------------------------------------------
# Copyright (C) 2009 Apu.C.E Solutions Co., Ltd. All Rights Reserved.
# @license - Copyrighted Commercial Software
# Author: Apu.C.E Solutions Co., Ltd

-------------------------------------------------------------------------*/


function submitPost(){
document.frmPost.submit();
}

function signMeIn(){
if(document.frmSignMe.User.value==""){
alert("Username not specifield....");
}else if(document.frmSignMe.Password.value==""){
alert("Password not specifield....");
}else{

document.frmSignMe.submit();
	}
}

function submit_forgot_Password(){
obj=document.frmForgotPassword;
if(obj.email.value==""){
alert("Email address not specifield....");
}else if(obj.email.value.indexOf("@")==-1){
alert("Invalid Email Id....");
}
else{
obj.submit();
}
	}
function submit_Register_New(){
obj=document.frmRegisterNew;
if(obj.name.value==""){
alert("Username not specifield....");
}
else if(obj.password.value==""){
alert("Password not specifield....");
}
else if(obj.password.value!=obj.pconfirm.value){
alert("Confirmation password does not match the choosen password....");
}

else if(obj.email.value==""){
alert("Email Address not specifield....");
}
else if(obj.email.value.indexOf("@")==-1){
alert("Invalid Email Id....");
}
else{
obj.submit();
	}
	}	
	
	
function submit_newsletter_upload(){
obj=document.frmNLUpload;
index=obj.newsletter.options[obj.newsletter.selectedIndex].id;
if(index==0){
alert('No Newsletter Selected, Please select one');
return;
}
obj.action="admin.php?itemID=1002&option=newsletter&action=upload&operation=submited&NID="+index;
obj.submit();
		}


function _validateEntry(){
	obj=document.frmContent;
if(obj.y.selectedIndex==0){
	alert('Year not selected');
return;
}
else if(obj.m.selectedIndex==0){
	alert('Month not selected');
return;
}
else if(obj.v.selectedIndex==0){
	alert('Volume not selected');
return;
}
obj.year.value=obj.y.options[obj.y.selectedIndex].text;
obj.month.value=obj.m.options[obj.m.selectedIndex].text;
obj.vol.value=obj.v.options[obj.v.selectedIndex].text;
obj.submit();	
}

function submit_edited_entry(){
document.frmAdmin.submit();	
	
	}
	
function _submit_new_Admin(){
document.frmNewAdmin.submit();	
}	

function _submit_new_event(){
document.frmEvent.submit();	
	}
function _submit_edited_event(){
	document.frmEvent.submit();	
	}
	
