﻿var xmlHttpLoginMaster = null;
function mylogout(){
  document.cookie=".ASPXAUTH="
}

function showLoginMaster()
{
	xmlHttpLoginMaster=GetXmlHttpObject()
	if (xmlHttpLoginMaster==null)
	{
		alert ("Your browser does not support AJAX!");
		return;
	} 
	var url="/Login/loginHandler.ashx";
	xmlHttpLoginMaster.onreadystatechange=stateChangedLogin;
	xmlHttpLoginMaster.open("GET",url,true);
	xmlHttpLoginMaster.send(null);
}


function stateChangedLogin() 
{ 
	if (xmlHttpLoginMaster.readyState==4)
	{ 
		document.getElementById("main_login_form").innerHTML=xmlHttpLoginMaster.responseText;
	}
}



function GetXmlHttpObject()
{
	var xmlHttpLoginMaster=null;
	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttpLoginMaster=new XMLHttpRequest();
	}
	catch (e)
	{
		// Internet Explorer
		try
		{
			xmlHttpLoginMaster=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			xmlHttpLoginMaster=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xmlHttpLoginMaster;
} 

