var xmlHttp=null;
function toggle(mdiv){
	if (mdiv == "forgot") {
		if(document.getElementById("forgot").style.display == "block") {
    		document.getElementById("forgot").style.display = "none";
  		}
		else {
			document.getElementById("forgot").style.display = "block";
		}
	}
	if (mdiv == "calendar") {
		document.getElementById("calendar").style.display = "block";
	}

} 
function showScreen(str)
{
    var url="events.asp";
    if (str.length == 0)
    { 
        document.getElementById("calendar").innerHTML="";
        return;
    }
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null)
    {
        alert ("Your browser does not support AJAX!");
        return;
    }
    else
    {   
        url=url+"?m="+str;
        xmlHttp.onreadystatechange=stateChanged;
        xmlHttp.open("GET",url,true);
        xmlHttp.send(null);
    }
}

function stateChanged() 
{ 
    if (xmlHttp.readyState==4)
    { 
        document.getElementById("calendar").innerHTML=xmlHttp.responseText;
    }
}

function GetXmlHttpObject()
{
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;
}

