// JavaScript Document

function calldel(m)

{

  if(!confirm(m))

  {

    return false;

  }

  else

  return true;

}


function admin_validation(){

var txtUsername=document.Login.txtusername.value;

	 if(txtUsername == "")

			 {

			 alert("Please enter the user name");

			 document.Login.txtusername.focus();

			 return false;

			 }

var txtPassword=document.Login.txtpassword.value;

	 if(txtPassword == ""){

			 alert("Please enter the password");

			 document.Login.txtpassword.focus();

			 return false;

	}

}

function poplinks(url)

{

	newwindow=window.open(url,'ImageDisplay','height=400,width=600,left=0,top=0,resizable=yes,scrollbars=yes');

	if (window.focus) {newwindow.focus()}

}



function popservices(url)

{

	newwindow=window.open(url,'ImageDisplay','height=400,width=600,left=0,top=0,resizable=yes,scrollbars=yes');

	if (window.focus) {newwindow.focus()}

}

function sermon_validate(thmb){
	if (document.frm_sermon.title.value == "") 
	{
		alert ("Please enter the title.");
		document.frm_sermon.title.focus();
		return false;
	}
	if (document.frm_sermon.eventdate.value == "") 
	{
		alert ("Please enter the date.");
		document.frm_sermon.eventdate.focus();
		return false;
	}
	if (document.frm_sermon.Video.value == "") {
	if(thmb == "") 
	{
		if (document.frm_sermon.file1.value == "") 
		{
			alert ("Please upload video file.");
			document.frm_sermon.file1.focus();
			return false;
		}
	}
	if(document.frm_sermon.file1.value != "")
	{
		var VideoCorrectFileFlag  = 0;
	var Videowhere_is_mytool=document.frm_sermon.file1.value;
	var Videomytool_array=Videowhere_is_mytool.split(".");
	var Videolastvalue=0;
	Videolastvalue=Videomytool_array.length - 1;
	var Videofilevalue=Videomytool_array[Videolastvalue];
	var Videofiltypes = new Array('wm','wmv','asf','rm','ram','mpg','mov','mpeg','avi','swf','WM','WMV','ASF','RM','RAM','MPG','MOV','MPEG','AVI','SWF');
	Videofiletypeval = Videofiltypes.length;
	for(k=0; k<=Videofiletypeval; k++)
	{
		if(VideoCorrectFileFlag == 0) {
			if((Videofilevalue == Videofiltypes[k]))
			{
			   VideoCorrectFileFlag = 1;
			}
		}
	}
		if(VideoCorrectFileFlag == 0){
		   alert("The file selected is not allowed for the Type indicated. Please select the following video file type.( .wm, .wmv, .asf, .rm, .ram, .mpg, .mov, .mpeg, .avi, .swf)");
		   document.frm_sermon.file1.focus();
		   return false;
		}
	}
	}
}

function changepassword_validate(){

		 var oldpassword = document.account.oldpassword.value;
		 if (oldpassword == "" )
		 { 
			 alert ("Please enter your Old Password");
			 document.account.oldpassword.focus();
			 return false;
		 }
		 var newpassword = document.account.newpassword.value;
		 if (newpassword == "" )
		 { 
			 alert ("Please enter your New Password");
			 document.account.newpassword.focus();
			 return false;
		 }	
		var confirmpassword = document.account.confirmpassword.value;
		 if(confirmpassword == "" )
		 { 
			 alert ("Please enter your Conmfirm Password");
			 document.account.confirmpassword.focus();
			 return false;
		 }	
		 if (newpassword != confirmpassword )
		 { 
			 alert (" Conmfirm Password  and New Password must be the same");
			 document.account.confirmpassword.focus();
			 return false;
		 }	
		
}


//Validation for Bookmark site
function bookmarksite(title, url){
	if (document.all)
	window.external.AddFavorite(url, title);
	else if (window.sidebar)
	window.sidebar.addPanel(title, url, "");
}



<!-- 

 -->
