// Ajax Functions for Sphere
var xmlHttp

function sendcontact(name,title,street,suite,company,city,state,zip,phone,email,description)
{
	xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Your browser does not support our wonderful Ajax technology. Please upgrade your browser.  We recommend Mozilla Firefox or Google Chrome.")
 return
 }
var url="request-send.php"
url=url+"?name="+name
url=url+"&title="+title
url=url+"&street="+street
url=url+"&suite="+suite
url=url+"&company="+company
url=url+"&city="+city
url=url+"&state="+state
url=url+"&zip="+zip
url=url+"&phone="+phone
url=url+"&email="+email
url=url+"&description="+description
url=url+"&randid="+Math.random()
xmlHttp.onreadystatechange=stateChanged
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function stateChanged() 
{ 
if (xmlHttp.readyState==1)
 { 
 document.getElementById('ajax-content').innerHTML="<div><img src='images/loading.gif' /></div>";
 } 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById('ajax-content').innerHTML=xmlHttp.responseText ;
 } 
}

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) //Use old IE Module if xml2 not available
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}
