// JavaScript Document
var xmlHttp
function display_data2()
{
		if (document.GetAQuote.Name.value=='')
		 {
		 	alert('Please enter name.');
			document.GetAQuote.Name.value='';
			document.GetAQuote.Name.focus();
			return false;
			
		 } 
		 if (document.GetAQuote.Phone.value=='')
		 {
		 	alert('Please enter phone number.');
			document.GetAQuote.Phone.value='';
			document.GetAQuote.Phone.focus();
			return false;
			
		 } 
		emailExp= /^\w+(\-\w+)*(\.\w+(\-\w+)*)*@\w+(\-\w+)*(\.\w+(\-\w+)*)+$/;
	 	 if (!(emailExp.test(document.GetAQuote.Email.value)))
		 {
		 	alert('Please Enter Valid Email.');
			document.GetAQuote.Email.value='';
			document.GetAQuote.Email.focus();
			return false;
			
		 } 
		
		 if (document.GetAQuote.MessageSet.value=='')
		 {
		 	alert('Please enter your message.');
			document.GetAQuote.MessageSet.value='';
			document.GetAQuote.MessageSet.focus();
			return false;
			
		 } 
		 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 } 
var url="send_a_quote.php"
url=url+"?Name="+document.GetAQuote.Name.value+"&Email="+document.GetAQuote.Email.value+"&Phone="+document.GetAQuote.Phone.value+"&MessageSet="+document.GetAQuote.MessageSet.value;
//url=url+"?Name="+document.GetAQuote.Name.value+"&Email="+document.GetAQuote.Email.value+"&Phone="+document.GetAQuote.Phone.value+"&check="+checksend+"&DomainAddress="+document.GetAQuote.DomainAddress.value+"&security_code="+document.GetAQuote.security_code.value;

 document.getElementById("ShowError").innerHTML='Loading response...';
xmlHttp.onreadystatechange=stateChanged2 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 

function stateChanged2() 
{ 
  if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
// document.getElementById("getcode").innerHTML=xmlHttp.responseText;
document.getElementById("ShowError").innerHTML=xmlHttp.responseText;

//alert(xmlHttp.responseText);
 } 
 document.GetAQuote.Name.value='Name';
 document.GetAQuote.Email.value='Email';
 document.GetAQuote.Phone.value='Phone';
 document.GetAQuote.DomainAddress.value='Domain Address';
 
} 
function GetXmlHttpObject()
{ 
var objXMLHttp=null
if (window.XMLHttpRequest)
 {
 objXMLHttp=new XMLHttpRequest()
 }
else if (window.ActiveXObject)
 {
 objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
 }
return objXMLHttp
}
