 function sendmail(){

  name=document.getElementById("name").value;
   email=document.getElementById("email").value;
    mobile=document.getElementById("mobile").value;
	 msg=document.getElementById("msg").value;
  
  
if(document.main.name.value=="")
{
alert("Enter Your Name Please");
document.main.name.focus();
return false;
}
if(document.main.email.value=="")
{
alert("Enter Your Email Address Please");
document.main.email.focus();
return false;
}
if(document.main.email.value!="")
{
checkEmail=document.main.email.value;
if ((checkEmail.indexOf('@') < 0) || ((checkEmail.charAt(checkEmail.length-4) != '.') && (checkEmail.charAt(checkEmail.length-3) != '.'))) 
{
alert("Invalid Email Id");
document.main.email.focus();
return false;
}
}

if(document.main.msg.value=="")
{
alert("Enter Your Message Please");
document.main.msg.focus();
return false;
}
/*
if(document.main.describe_requirement.value=="")
{
alert("Enter Your Requirement Please");
return false;
}
if(document.main.captcha.value!=document.main.captchatest.value)
{
alert("The Security No Is Invalid");
return false;
}

*/
  
  
  
  
 // alert(name);
  xmlhttpPost('mail_send.php?name='+name+'&email='+email+'&mobile='+mobile+'&msg='+msg,'show_div');
  }
  
  

  function xmlhttpPost(strURL,divName) {



    var xmlHttpReq = false;

    var self = this;

    document.getElementById(divName).innerHTML="<img align=top src='images/loading.gif' title='Sending...'>";

	// Mozilla/Safari

    if (window.XMLHttpRequest) {

        self.xmlHttpReq = new XMLHttpRequest();

    }

    // IE

    else if (window.ActiveXObject) {

        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");

    }

    self.xmlHttpReq.open('POST', strURL, true);

    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');

    self.xmlHttpReq.onreadystatechange = function() {

        if (self.xmlHttpReq.readyState == 4) 

		{

				document.getElementById(divName).innerHTML=self.xmlHttpReq.responseText;

				
    }}

    self.xmlHttpReq.send('');

}