function mOvr(src,clrOver){ 
	if (!src.contains(event.fromElement)){ 
		src.style.cursor = 'default'; 
		src.bgcolor = clrOver; 
	} 
} 

function mOut(src,clrIn){ 
	if (!src.contains(event.toElement)){ 
		src.style.cursor = 'default'; 
		src.bgcolor = clrIn; 
	} 
}

function ChangeColor(obj,color){
	obj.style.background=color;
}

function markmenu(obj){
	ChangeColor(obj,'#7C8C81');
	obj.onmouseout="ChangeColor("+obj+",'#7C8C81');";
}

function loadincludes(p){	
	if(document.getElementById("topinc")) clientSideInclude('topinc', p+'includes/top_bar.htm');
	if(document.getElementById("topinc1")) clientSideInclude('topinc1', p+'includes/innermenu.htm');
if(document.getElementById("topinc2")) 
clientSideInclude('topinc2', p+'includes/innermenu2.htm');
	if(document.getElementById("rightinc")) clientSideInclude('rightinc', p+'includes/right_panel.htm');
	if(document.getElementById("newsinc")) clientSideInclude('newsinc', 'pressroom.php');
	if(document.getElementById("announcementinc")) clientSideInclude('announcementinc', 'announcements.php');
	if(document.getElementById("links_span")) clientSideInclude('links_span', 'links.php');
}

function validateAnnouncement(e){
	form = document.frm;
	if(trim(form.f.value)==""){
		alert("Please browse for the image.");
		form.f.focus();
		return false;
	}
	if(trim(form.title.value)==""){
		alert("Please enter the title.");
		form.title.focus();
		return false;
	}
	form.action="db_announcements.php?e="+e;
	form.submit();
}

function validateAccountInformation()
{
	form = document.frm_accountInformation;
	if(trim(form.admin_email.value)=="")
	{
		alert("Please Enter E-mail");
		form.admin_email.focus();
		return false;
		}
	else if(checkEmailAddress(form.admin_email.value)=="")
	{
		alert("Please Enter Valid E-mail");
		form.admin_email.focus();
		return false;
		}	
	
	form.action = "db_accountInformation.php";
	form.submit();
	return true;
	
	}	
function validateChangePassword()
{
	form = document.changepassword;
	if(trim(form.oldPass.value)=='')
	{
		alert("Please Enter Old Password");
		form.oldPass.focus();
		return false;
		}
	if(trim(form.newPass.value)=='')
	{
		alert("Please Enter New Password");
		form.newPass.focus();
		return false;
		}	
	if(trim(form.cNewPass.value)=='')
	{
		alert("Please Enter Confirm Password");
		form.cNewPass.focus();
		return false;
		}	
	if(form.newPass.value!=form.cNewPass.value)
	{
		alert("New Password and Confirm Password are not matched ");
		form.cNewPass.focus()
		return false;
		}
	form.action = "db_changePassword.php";
	form.submit();
	}	
	
function validatecontactinfo(){
		form = document.frm;
		if(trim(form.fname.value)==""){
			alert("Please enter first name.");
			form.fname.focus();
			return false;
		}else if(checkname(form.fname.value)=="") {
			alert("Please Enter valid first name");
			form.fname.focus();
			return false;
		}
		if(trim(form.lname.value)==""){
			alert("Please enter last name.");
			form.lname.focus();
			return false;
		}else if(checkname(form.lname.value)=="") {
			alert("Please Enter valid last name");
			form.lname.focus();
			return false;
		}
		if(trim(form.addr.value)==""){
			alert("Please enter address.");
			form.addr.focus();
			return false;
		}else if(checkadd(form.addr.value)=="") {
			alert("Please Enter valid address");
			form.addr.focus();
			return false;
		}
		if(trim(form.city.value)==""){
			alert("Please enter city.");
			form.city.focus();
			return false;
		}else if(checkname(form.city.value)=="") {
			alert("Please Enter valid city");
			form.city.focus();
			return false;
		}
		if(trim(form.state.value)==""){
			alert("Please enter state.");
			form.state.focus();
			return false;
		}else if(checkname(form.state.value)=="") {
			alert("Please Enter valid state");
			form.state.focus();
			return false;
		}
		if(trim(form.zip.value)==""){
			alert("Please enter zip.");
			form.zip.focus();
			return false;
		}else if(inValidCharZip(form.zip.value)=="") {
			alert("Please Enter valid zip code");
			form.zip.focus();
			return false;
		}
		if(trim(form.phone.value)==""){
			alert("Please enter phone.");
			form.phone.focus();
			return false;
		}else if(checkPhone(form.phone.value)=="") {
			alert("Please Enter valid phone");
			form.phone.focus();
			return false;
		}
		if(trim(form.email.value)==""){
			alert("Please enter E-mail.");
			form.email.focus();
			return false;
		}else if(checkEmailAddress(form.email.value)=="") {
			alert("Please Enter Valid E-mail");
			form.email.focus();
			return false;
		}
		form.action = "db_contactus.php"
		form.submit();
}

function validatePressRelease(e){
	if(trim(document.pressrelease.release_date.value)==""){
		alert("Please Enter Release Date");
		document.pressrelease.release_date.focus();
		return false;
	}

	if(trim(document.pressrelease.title.value)==""){
		alert("Please Enter Title");
		document.pressrelease.title.focus();
		return false;
	}	

	if(!checkcity(document.pressrelease.title.value)){
		alert("Please Enter Valid Title");
		document.pressrelease.title.focus();
		return false;
	}	

	if(trim(document.pressrelease.contact_name.value)=="")	{
		alert("Please Enter Contact Name");
		document.pressrelease.contact_name.focus();
		return false;
	}		

	if(!checkcity(document.pressrelease.contact_name.value))	{
		alert("Please Enter Valid Contact Name");
		document.pressrelease.contact_name.focus();
		return false;
	}	
	document.pressrelease.action="db_news.php?e="+e;
	//alert(document.pressrelease.action)
 	document.pressrelease.submit();	
	return true;

	}