var xmlHttp;

function show()
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
 	{
 		alert ("Browser does not support HTTP Request")
 		return
 	} 

	addNewUser();
}

function addNewUser()
{
	 
  //  Set our destination PHP page "ajaxpost.php"…
  xmlHttp.open("POST", "addUser.php", true);
  xmlHttp.onreadystatechange = stateChanged;

  // Make our POST parameters string…
  var params = "email=" + encodeURI(document.getElementById("email").value);

  // Set our POST header correctly…
  xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  xmlHttp.setRequestHeader("Content-length", params.length);
  xmlHttp.setRequestHeader("Connection", "close");

  // Send the parms data…
  xmlHttp.send(params);

}




function stateChanged() 
{ 
 	
 if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 	document.getElementById("txtHint").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)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}