var xmlhttp;
function checklogin()
{
xmlhttp=GetXmlHttpObject();

if (xmlhttp==null)
{
alert ("Your browser does not support XMLHTTP!");
return;
}
var username = document.loginform.username.value;
var password = document.loginform.password.value;
var url = dynlink+"/signin.php";
var parameters = "username="+username+"&password="+password;
xmlhttp.open("POST", url, true);

//Send the proper header information along with the request
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.setRequestHeader("Content-length", parameters.length);
xmlhttp.setRequestHeader("Connection", "close");

xmlhttp.onreadystatechange = function() {//Handler function for call back on state change.
	if(xmlhttp.readyState == 4) {
		if(xmlhttp.responseText == "success")
		{
			alert("You are Logged in successfully !!");
			window.parent.location = dynlink+"/"+document.loginform.redircturl.value;
		}
		else
		{
			document.getElementById("loginerror").innerHTML=xmlhttp.responseText;
		}
	}
}
xmlhttp.send(parameters);

return false;
}

