// email validation
function onsubmitIndexFrm(){
	if(document.indexFrm.name.value=="")	{
		alert("Please Enter the Name!!!");
		document.indexFrm.name.focus();
		return false;
	}
	
if(document.indexFrm.email.value=="")	{
		alert("Please enter email address !!!");
		 document.indexFrm.email.focus();
		return false;
	}
	var re=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i	
	// Email
	if (document.indexFrm.email.length>0) {
		if (!document.indexFrm.email.value.match(re)){
			 alert("Please enter valid email address \"Email\"");
			  document.indexFrm.email.focus();
			return false;
		}	
	}
		
	if(document.indexFrm.query.value=="")	{
		alert("Please Enter the Query!!!");
		document.indexFrm.query.focus();
		return false;
	}
	return true;
}

function onsubmitIndexFrm1() {
	var tmp = document.indexFrm1;
	var returnval = false;
		
	add=tmp.address.value;
	zipcode=tmp.zip.value;
	
	if(add=="")	{
		alert("Please Enter Street Address!!!");
		tmp.address.focus();
		return false;
	}
		if(zipcode=="")	{
		alert("Please Enter Zip Code!!!");
		tmp.zip.focus();
		return false;
	}
	return true;
	
}
function onsubmitIndexFrm2() {
	var tmp = document.indexFrm2;
	var returnval = false;
	emailId=tmp.Email.value;
	name=tmp.Name.value;
	
	if(name=="")	{
		alert("Please Enter the Name!!!");
		tmp.Name.focus();
		return false;
	}
	if(emailId=="")	{
		alert("Please enter email address !!!");
		 tmp.Email.focus();
		return false;
	}
	var re=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i	
	// Email
	if (emailId.length>0) {
		if (!emailId.match(re)){
			 alert("Please enter valid email address \"Email\"");
			  tmp.Email.focus();
			return false;
		}	
	}
	
	return true;
	
}

