var xmlHttp;

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}

function processForm()
{ 
xmlHttpProcess=GetXmlHttpObject();
if (xmlHttpProcess==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 }
var host = document.location.host;
if (host=="newsgeni.us"){var url="http://newsgeni.us/pages/homegain_submit.php";}
if (host=="www.newsgeni.us"){var url="http://www.newsgeni.us/pages/homegain_submit.php";}
var params = "name="+document.getElementById("name").value;
params+="&email="+document.getElementById("email").value;
params+="&phone="+document.getElementById("phone").value;
xmlHttpProcess.open("POST",url,true);
xmlHttpProcess.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttpProcess.setRequestHeader("Content-length", params.length);
xmlHttpProcess.setRequestHeader("Connection", "close");
xmlHttpProcess.onreadystatechange=stateChangedProcessForm;
xmlHttpProcess.send(params);
}

function stateChangedProcessForm() 
{ 
if (xmlHttpProcess.readyState==4 || xmlHttpProcess.readyState=="complete")
 { 
  document.getElementById("form_area").innerHTML=xmlHttpProcess.responseText;
 } 
}