/*
if(window.ActiveXObject) {
	try {
		var oHTTP = new ActiveXObject("Msxml2.XMLHTTP");
	} 
	catch(e) {
		var oHTTP = new ActiveXObject("Microsoft.XMLHTTP");
	}
} 
else {
	var oHTTP = new XMLHttpRequest();
}
*/

var xmlHttp;
var xmlHttp1;
var catid;
var catid1;

function GetXmlHttpObject(handler)
{
var objXmlHttp=null;

if (navigator.userAgent.indexOf("Opera")>=0)
{
alert("This example doesn't work in Opera");
return 
}
if (navigator.userAgent.indexOf("MSIE")>=0)
{ 
var strName="Msxml2.XMLHTTP";
if (navigator.appVersion.indexOf("MSIE 5.5")>=0)
{
strName="Microsoft.XMLHTTP";
} 
try
{ 
objXmlHttp=new ActiveXObject(strName);
objXmlHttp.onreadystatechange=handler;
return objXmlHttp;
} 
catch(e)
{ 
alert("Error. Scripting for ActiveX might be disabled");
return 
} 
} 
if (navigator.userAgent.indexOf("Mozilla")>=0)
{
objXmlHttp=new XMLHttpRequest();
objXmlHttp.onload=handler;
objXmlHttp.onerror=handler;
return objXmlHttp;
}
}
 

function requestQuote(quote_name,quote_email,quote_comments)
{
	document.getElementById("div_msg").style.display="";
	document.getElementById("div_msg").innerHTML='<img src="images/ajax-loader.gif" align="absmiddle" alt="Loader" border="0" title="Please Wait" class="changeStatus" />';
  var url="mail_request_quote.php?sid=" + Math.random() + "&quote_name=" + quote_name + "&quote_email=" + quote_email + "&quote_comments=" + quote_comments;
  xmlHttp=GetXmlHttpObject(showMsg);
  xmlHttp.open("GET", url , true);
  xmlHttp.send(null);
}

function showMsg()
{
  if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
  {
    resp=xmlHttp.responseText;
    document.getElementById("div_msg").innerHTML=resp;  
  }
}
