var xmlHttp;

function fnLogin()	{ 
	var strEmail=document.getElementById("EmailAddress").value; 
	var strPassword=document.getElementById("Password").value; 
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)	{
	  alert ("Your browser does not support this feature.");
	  return;
	}        
	var url="asyncLogin.php";
	url=url+"?Email="+strEmail;
	url=url+"&Password="+strPassword;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=function()	{
		if (xmlHttp.readyState==4)		{
			if(xmlHttp.responseText=="0")		{
				document.getElementById("LoginError").innerHTML="Login Error...Please try again.";
			}
			else	{
				document.getElementById("LoginError").innerHTML="";
				document.getElementById("login").action =xmlHttp.responseText;
				document.getElementById("login").submit();
				//window.location=xmlHttp.responseText;
			}
		}
	}
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}	