function echeck(str) {
		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr-1){
		    alert("Invalid E-mail ID")
		    return false
		}	
		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail ID")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }
 		 return true					
}
function validate(){
	if(document.form1.yourName.value==""){
		alert('Please Fill Your Name');
	  	document.form1.yourName.focus();
	  	return false;
	 }
	if(document.form1.companyName.value==""){
		alert('Please Fill Your Company Name');
	  	document.form1.companyName.focus();
	 	return false;
	 }	 
		 
	// if(document.form1.address1.value==""){
	  //alert('Please Fill Your Address');
	  //document.form1.address1.focus();
	  //return false;
	 //}		
   if (echeck(document.form1.email.value)==false){
//		alert('Please Fill Your email');
	  document.form1.email.focus();
	  return false;
	 }	 	 
	if(document.form1.phone.value=="" || !parseInt(document.form1.phone.value) ){
	  alert('Please Fill Your Correct Telphone/Mobile');
	  document.form1.phone.focus();
	  return false;
	 }
     if(document.form1.organization.value==""){
		alert('Please Fill Your Organization Name');
	  	document.form1.organization.focus();
	  	return false;
	 }
     if(document.form1.messages.value==""){
		alert('Please Fill Your Messages Details');
	  	document.form1.messages.focus();
	  	return false;
	 }	 
	// if(document.form1.requirements.value==""){
	//  alert('Please Fill Your Comments');
	 // document.form1.requirements.focus();
	//  return false;
	// }			 
}