var xmlHttp;
function createXMLHttpRequest() 
{
    if (window.ActiveXObject) 
	{
        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    } 
    else if (window.XMLHttpRequest) 
	{
        xmlHttp = new XMLHttpRequest();
    }
}
function toMsg(URL) 
{	
	//document.getElementById("options").innerHTML = URL;
    createXMLHttpRequest();
    xmlHttp.onreadystatechange = postToMsg; //parenthesis do not work here
    xmlHttp.open("GET", URL, true);
    xmlHttp.send(null);
	return false;
}
function postToMsg() 
{
    if(xmlHttp.readyState == 4) 
	{
        if(xmlHttp.status == 200) 
		{
            document.getElementById("SchoolMsg").innerHTML = xmlHttp.responseText;
			xmlHttp = null;
        }
    }
}
function toList(URL) 
{	
	//document.getElementById("options").innerHTML = URL;
    createXMLHttpRequest();
    xmlHttp.onreadystatechange = postToList; //parenthesis do not work here
    xmlHttp.open("GET", URL, true);
    xmlHttp.send(null);
	return false;
}
function postToList() 
{
    if(xmlHttp.readyState == 4) 
	{
        if(xmlHttp.status == 200) 
		{
            document.getElementById("SchoolSelect").innerHTML = xmlHttp.responseText;
			xmlHttp = null;
        }
    }
}
function showSchools()
{
	//document.getElementById("SchoolMsg").innerHTML = document.leaderinfo.leadershipStateCode.value
	document.getElementById("SchoolMsg").innerHTML = '<br><br>';
	toList("/showschoollist.asp?state=" + document.leaderinfo.leadershipStateCode.value);
}
function showMoney()
{
	toMsg("/showschoolMoney.asp?school=" + document.getElementById("SchoolList").value);
}