var req;
var doesNotSupport = true;

function AjaxObjectCreate()
{
	if (window.XMLHttpRequest) {
        req = new XMLHttpRequest;
    } else if (window.ActiveXObject) {
        req = new ActiveXObject("Microsoft.XMLHTTP");
    }
	return req;
}
 
/* Contact Us Starts */
function Contactus(formid) 
{
	req = AjaxObjectCreate();
	
	
	if(req)
	{
		//$("ErrMsgDisplay").innerHTML = "<img src='images/indicator.gif' border='0'>";
		
		var poststr = Form.serialize(formid);
	
		req.onreadystatechange = processContactus;
		req.open("POST","mailprocess.php?"+poststr,true);
		req.send(null);
	}
}
function processContactus() 
{
      if(req.readyState == 4) 
	  {
           if(req.status == 200) 
		   {
			   	
				var msg_no=trim(req.responseText).substr(0,1);
				var msg_text=trim(req.responseText).substr(1);
				
				if(msg_no == 1)
				{
					
					window.location.href = 'thankyou.php';
				}
				else
				{
					document.getElementById("ErrMsgDisplay").innerHTML = "";
					document.getElementById("ErrMsgDisplay").innerHTML = msg_text;
				}
           } 
				
						
				
          
      }
 }
 /* Contact Us Ends */
 
 
