var xmlHttp

function submitForm(str)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 
var url="req_quote_submit.php"
url=url+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
document.getElementById("process").style.display = "block";
}

function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
	var result=xmlHttp.responseText
	if (result.substr(0,1)=="1"){
		document.getElementById("process").style.display = "none";
		document.location.href='result_submit.php';
	}
	else{
		alert("Sorry, we've problem with server. Use our contact number for contact us. Thank you.");
	}
 } 
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 { xmlHttp=new XMLHttpRequest(); }
catch (e)
 {
 try
  { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); }
 catch (e)
  { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); }
 }
return xmlHttp;
}
