var xmlHttp
var loadstatustext="<p class='txtSmall txtGray'><BR><BR><BR><BR><BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sending mail... <BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Please wait...</span>";

function sendMail(str,email,telephone,comments)
{
if (str.length==0 && id.length==0)
{ 
return
}
xmlHttp=GetXmlHttpObject2()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="php/sendMail.php"
name		=str
email		=email
telephone	=telephone
comments	=comments
url=url+"?name="+name+"&email="+email+"&telephone="+telephone+"&comments="+comments
document.getElementById("txtMail").innerHTML=loadstatustext;
//alert(url);
url=url+"&stid="+Math.random()
xmlHttp.onreadystatechange=stateChanged2 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 

function stateChanged2() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{	
	document.getElementById("txtMail").innerHTML=xmlHttp.responseText
} 
} 

function GetXmlHttpObject2()
{ 
var objXMLHttp=null
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
} 
