// JavaScript Document
function infovalidate()
{
	if(document.info.fname.value=="" || document.info.fname.value=="First Name")
	{
		alert("Please Enter your First Name");
		document.info.fname.focus();
		return false;
	}
	else if(document.info.lname.value=="" || document.info.lname.value=="Last Name")
	{
		alert("Please Enter your Last Name");
		document.info.lname.focus();
		return false;
	}
	else if (document.info.parent.value=="" || document.info.parent.value=="Parent/Guardian")
	{
		alert("Please Enter your Parent/Guardian name");
		document.info.parent.focus();
		return false;
	}
	else if (document.info.email.value=="" || document.info.email.value=="Email")
	{
		alert("Please Enter your Email-Id");
		document.info.email.focus();
		return false;
	}
	else if (document.info.m1.value=="")
	{
		alert("Fill in the Information Before Submitting");
		document.info.m1.focus();
		return false;
	}
	else if(isNaN(document.getElementById('m1').value))
   	{
     alert("Invalid Phone Number.\n\nOnly numbers are allowed.");
     document.getElementById('m1').focus();
     return (false);
   	}
	else if (document.info.m2.value=="")
	{
		alert("Enter Your Mobile No.");
		document.info.m2.focus();
		return false;
	}
	else if(isNaN(document.getElementById('m2').value))
   	{
     alert("Invalid Phone Number.\n\nOnly numbers are allowed.");
     document.getElementById('m2').focus();
     return (false);
   	}
	else if (document.info.m3.value=="")
	{
		alert("Enter Your Mobile No.");
		document.info.m3.focus();
		return false;
	}
	else if(isNaN(document.getElementById('m3').value))
   	{
     alert("Invalid Phone Number.\n\nOnly numbers are allowed.");
     document.getElementById('m3').focus();
     return (false);
   	}
	else if (document.info.addr.value=="" || document.info.addr.value=="Address")
	{
		alert("Please Enter Your Address");
		document.info.addr.focus();
		return false;
	}
	else if (document.info.city.value=="" || document.info.city.value=="City")
	{
		alert("Please Enter your City");
		document.info.city.focus();
		return false;
	}
	else if (document.info.state.value=="" || document.info.state.value=="State")
	{
		alert("Please Enter Your State");
		document.info.state.focus();
		return false;
	}
	else if (document.info.zip.value=="" || document.info.zip.value=="Zip")
	{
		alert("Please Enter Zip Code");
		document.info.zip.focus();
		return false;
	}
	else if (isNaN(document.info.zip.value))
	{
		alert("Incorrect Zip Code. Zip code only contain digits ");
		document.info.zip.focus();
		return false;
	}
	else if (document.info.comments.value=="" || document.info.comments.value=="Comments")
	{
		alert("Field can't be left Blank");
		document.info.comments.focus();
		return false;
	}
	else
	{
		return true;	
	}
}

function infocheckmail()
{
 var str=document.info.email.value;
 var filter=/^.+@.+\..{2,3}$/
 
 if (filter.test(str))
 {
    return true;
 }
 else 
 {
    alert("Please put a valid email address!")
	document.info.email.focus();
    return false;
 }
}



