var mbrowser=BrowserDetect.browser;
function checkForm(){
	var ret=true;
	if(document.getElementById('thename').value==''){ret=false;alert('Please input your name.');}
	if(document.getElementById('theemail').value==''){ret=false;alert('Please input your email.');}
	if(document.getElementById('thephone').value==''){ret=false;alert('Please input your phone.');}
	if(ret){
		var req;	
if(mbrowser!="Explorer"){
	req= new XMLHttpRequest();
} else {
	try
    {
    req=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    req=new ActiveXObject("Microsoft.XMLHTTP");
    }
}
  req.onreadystatechange=function()
    {
    if(req.readyState==4)
      {
		  document.getElementById('thankyoublock').style.display='';
		  document.getElementById('thankyoushadow').style.display='';
	  }
	}
	req.open("GET","sendmail.php?name="+document.getElementById('thename').value+"&email="+document.getElementById('theemail').value+"&phone="+document.getElementById('thephone').value,true);
	req.send(null);
	}
	return false;
}
function closeThankYou(){
	
	document.getElementById('thankyoublock').style.display='none';
	document.getElementById('thankyoushadow').style.display='none';
}