// JavaScript Document

var xmlHttp

function sendReq(name, email, city, country, postalCode, organization, Title, busInd, employees, salesVol, line1, line2, phone, events, freq, travel, hear)
{ 
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
	} 

	
	var url="registerAndEmail.php";
	url=url+"?name="+name;
	url=url+"&email="+email;
	url=url+"&city="+city;
	url=url+"&country="+country;
	url=url+"&postalCode="+postalCode;
	url=url+"&organization="+organization;
	url=url+"&Title="+Title;
	url=url+"&busInd="+busInd;
	url=url+"&employees="+employees;
	url=url+"&salesVol="+salesVol;
	url=url+"&line1="+line1;
	url=url+"&line2="+line2;
	url=url+"&phone="+phone;
	url=url+"&event="+events;
	url=url+"&freq="+freq;
	url=url+"&travel="+travel;
	url=url+"&hear="+hear;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
	
}

function stateChanged() 
{ 
	if (xmlHttp.readyState==4)
	{ 
		if(xmlHttp.responseText == "done")
		{
			//document.getElementById("txtHint").innerHTML=xmlHttp.responseText;
			resetForm();
		}
	}
}

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;
}