function hiddenWindow()
{
	document.body.style.overflow="scroll";
	try{
		document.getElementById("loginWindow").style.display="none";
		document.getElementById("loginWindow").style.visibility="hidden";
		document.getElementById("loginWindow-bg").style.visibility="hidden";
		document.getElementById("loginWindow-bg").style.display="none";
	}catch(e){}
}
function createXMLHTTP()
{
	var xmlHttp;
	 try
    {
    	xmlHttp=new XMLHttpRequest();
    }
 	catch (e)
    {
  // Internet Explorer
   try
      {
      	xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }
   catch (e)
      {

      try
         {
         	xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
         }
      catch (e)
         {
         	return false;
         }
      }
    }
	return xmlHttp;
} 
var xmlHttp=createXMLHTTP();
function loginAjax()
	
{	
	if(!document.getElementById("loginWindow"))
		{
			createLonginDiv();
		}
	if(document.getElementById("loginWindow").style.visibility=="hidden")
		{
			document.body.style.overflow="hidden";
			document.getElementById("loginWindow").style.display="block";
			document.getElementById("loginWindow").style.visibility="visible";
			document.getElementById("loginWindow-bg").style.visibility="visible";
		document.getElementById("loginWindow-bg").style.display="block";
		}
	var url="/user/login_celerity.php";
	xmlHttp.open("GET",url,true); 
	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.send(null);
}
function stateChanged()
{	
	if (xmlHttp.readyState==4 && xmlHttp.status==200)
	{ 	
		var strhtml = xmlHttp.responseText;
		document.getElementById("loginWindow").innerHTML =strhtml;
	}
}
function createLonginDiv()
{
	var   div1   =   document.createElement("div");
	var   div2   =   document.createElement("div");
	//var   iframe =   document.createElement("iframe");
	div1.className="loginWindow";
	div2.className="loginWindow-bg";
	div2.style.width = Math.max(document.documentElement.scrollWidth, document.documentElement.clientWidth) + "px";
	div2.style.height = Math.max(document.documentElement.scrollHeight, document.documentElement.clientHeight) + "px";
	div2.innerHTML = '<iframe style="position:absolute;top:0;left:0;width:100%;height:100%;filter:alpha(opacity=0);"></iframe>'
	document.body.style.overflow="hidden";
	div1.id="loginWindow";
	div2.id="loginWindow-bg";
	document.getElementsByTagName("body")[0].appendChild(div1); 
	document.getElementsByTagName("body")[0].appendChild(div2);
}