function sendEmail()
{
   var getdate = new Date();  //Used to prevent caching during ajax call
    var params = "";
        var name = document.forms["f"]["qname"].value;
        var email = document.forms["f"]["qemail"].value;
        var tel = document.forms["f"]["qtel"].value;
        var company = document.forms["f"]["qcompany"].value;
        var msg = document.forms["f"]["qmsg"].value;
        params  = "name="+name+"&email="+email+"&tel="+tel+"&msg="+msg+"&company="+company;
    
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("success").innerHTML=xmlhttp.responseText;
    }
  }
   xmlhttp.open("POST","controllers/sendquote.php",true); //calling testing.php using POST method
         //xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
            xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    xmlhttp.setRequestHeader("Content-length", params.length);
    xmlhttp.setRequestHeader("Connection", "close");
    
        // xmlhttp.send("txtname=" + txtname.value); //Posting txtname to PHP File
        xmlhttp.send(params); //Posting txtname to PHP File
} 
