// Contact Us validation ...........
function contact_us(){
	if(document.getElementById('contact_name').value==''){
		alert('Please Enter contact name');
		document.contactfrm.contact_name.focus();
		return false; 
	}
	if(document.getElementById('contact_email').value==''){
		alert('Please Enter contact Email');
		document.contactfrm.contact_email.focus();
		return false; 
	}
	
	apos=document.contactfrm.contact_email.value.indexOf("@");

  	dotpos=document.contactfrm.contact_email.value.lastIndexOf(".");

	if (apos<1 || dotpos-apos<2)
   	{ 	 
	 alert("Enter the Email in the form of example@domain.com."); 
	 document.contactfrm.contact_email.focus();
	 return false;
	}  
	 
	if(document.getElementById('contact_phone').value==''){
		alert('Please Enter Phone Number');
		document.contactfrm.contact_phone.focus();
		return false; 
	}
	
	if(isNaN(document.contactfrm.contact_phone.value))
	{
		alert('Please Enter Numeric values');
		document.contactfrm.contact_phone.focus();
		return false;
	}
	if(document.getElementById('contact_for').value==''){
		alert('Please Select purpose of Contact');
		document.contactfrm.contact_for.focus();
		return false; 
	}
	if(document.getElementById('contact_type').value==''){
		alert('Please Select contact type');
		document.contactfrm.contact_type.focus();
		return false; 
	}
	if(document.getElementById('contact_description').value==''){
		alert('Please Enter contact description');
		document.contactfrm.contact_description.focus();
		return false; 
	} 
	
	if(document.getElementById('numofans').value!='6'){
		alert('Oh No! An alien! Please prove us wrong and enter the correct answer');
		document.contactfrm.numofans.focus();
		return false; 
	}
	
	
	}
	
//Login Validation
function login_valid(){
	if(document.getElementById('admin').value==''){
		alert('Please Enter Username type');
		document.getElementById('admin').focus();
		return false; 
	}
	if(document.getElementById('password').value==''){
		alert('Please Enter Password');
		document.getElementById('password').focus();
		return false; 
	}  
	
	}
