// JavaScript Document

var xmlHttp;



function email_inq(name,designation,company,phonenumber,email,message,sandzoffice)

{ 

xmlHttp=GetXmlHttpObject();

//document.getElementById('img').innerHTML = "<img src='newload.gif'>";

if (xmlHttp==null)

  {

  alert ("Your browser does not support AJAX!");

  return;

  } 

var url="sendcontactus.php";
 
url=url+"?name="+encodeURI(name)+"&designation="+encodeURI(designation)+"&company="+encodeURI(company)+"&phonenumber="+encodeURI(phonenumber)+"&email="+encodeURI(email)+"&message="+encodeURI(message)+"&sandzoffice="+encodeURI(sandzoffice);

url=url+"&sid="+Math.random();

xmlHttp.onreadystatechange=stateChanged;

xmlHttp.open("GET",url,true);

xmlHttp.send(null);

}



function stateChanged() 

{ 

if (xmlHttp.readyState==4)

{ 

  

document.getElementById("statmsg").innerHTML=xmlHttp.responseText;

//document.getElementById('img').innerHTML = "";

}

}



function GetXmlHttpObject()

{

var xmlHttp=null;

try

  {

  // Firefox, Opera 8.0+, Safari

  xmlHttp=new XMLHttpRequest();

  }

catch (e)

  {

  // Internet Explorer

  try

    {

    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");

    }

  catch (e)

    {

    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");

    }

  }

return xmlHttp;

}