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){
		    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 ValidateForm(){
	
	

  
    	if (document.frmSample.Attn.value == "")
  {
    alert("Attention is required.");
    document.frmSample.Attn.focus();
    return false
  }
  
  if (document.frmSample.Company_Name.value == "")
  {
    alert("Company Name is required.");
    document.frmSample.Company_Name.focus();
    return false
  }
  
     	if (document.frmSample.Address_1.value == "")
  {
    alert("Address 1 is required.");
    document.frmSample.Address_1.focus();
    return false
  }
  
       	
   if (document.frmSample.City.value == "")
  {
    alert("City is required.");
    document.frmSample.City.focus();
    return false
  }
  
  if (document.frmSample.State.value == "")
  {
    alert("State is required.");
    document.frmSample.State.focus();
    return false
  }
  
  if (document.frmSample.Zip.value == "")
  {
    alert("Zip is required.");
    document.frmSample.Zip.focus();
    return false
  }
  
  var emailID=document.frmSample.Email
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email ID")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}
	
  if (document.frmSample.Phone.value == "")
  {
    alert("Phone is required.");
    document.frmSample.Phone.focus();
    return false
  }
  
    if (document.frmSample.International.value == "")
  {
    alert("International is required.");
    document.frmSample.International.focus();
    return false
  }
  
  
  if (document.frmSample.Bus_Type.value == "")
  {
    alert("Business Type is required.");
    document.frmSample.Bus_Type.focus();
    return false
  }
  
 	
	return true
 }