        var xmlHttp = null; var thePhone = ""; var ajaxTimeOut = 5000; var ajaxComplete = false;  var serverPath = "www.uta.edu";
        var menuRegOn, menuRegOff, menuArlOn, menuArlOff, menuInfoOn, menuInfoOff, menuMapsOn, menuMapsOff, menuHotelsOn, menuHotelsOff, menuContactOn, menuContactOff;



function	loadOldImages()
{
		menuRegOn = new Image(180,65); menuRegOn.src='images/apsiMenuRegisterOn.jpg';
		menuRegOff = new Image(180,65); menuRegOff.src='images/apsiMenuRegisterOff.jpg';
		menuArlOn = new Image(180,75); menuArlOn.src='images/apsiMenuArlOn.jpg';
		menuArlOff = new Image(180,75); menuArlOff.src='images/apsiMenuArlOff.jpg';
		menuInfoOn = new Image(180,75); menuInfoOn.src='images/apsiMenuInfoOn.jpg';
		menuInfoOff = new Image(180,75); menuInfoOff.src='images/apsiMenuInfoOff.jpg';
		menuMapsOn = new Image(180,75); menuMapsOn.src='images/apsiMenuCampusOn.jpg';
		menuMapsOff = new Image(180,75); menuMapsOff.src='images/apsiMenuCampusOff.jpg';
		menuHotelsOn = new Image(180,70); menuHotelsOn.src='images/apsiMenuLodgeOn.jpg';
		menuHotelsOff = new Image(180,70); menuHotelsOff.src='images/apsiMenuLodgeOff.jpg';
		menuContactOn = new Image(180,50); menuContactOn.src='images/apsiMenuContactOn.jpg';
		menuContactOff = new Image(180,50); menuContactOff.src='images/apsiMenuContactOff.jpg';
		menuClassesOn = new Image(180,70); menuClassesOn.src='images/apsiMenuCoursesOn.jpg';
		menuClassesOff = new Image(180,70); menuClassesOff.src='images/apsiMenuCoursesOff.jpg';
}






		function lightup(imgName)
 		{ if (document.images) { imgOn=eval(imgName + "On.src"); document[imgName].src= imgOn; } }


		function turnoff(imgName)
 		{ if (document.images) { imgOn=eval(imgName + "Off.src"); document[imgName].src= imgOn; } }





  	function doHide(arg1)
  	{
    	if (document.getElementById)
    	{ theObject = document.getElementById(arg1); theObject.style.display = 'none';  }
    	return true;
  	}


  	function doShow(arg1)
  	{
    	if (document.getElementById)
    	{ theObject = document.getElementById(arg1);  theObject.style.display = 'block'; }
    	return true;
  	}


	function editRecord_ShowAlert()
	{
		doShow("er_AlertBlock"); doHide("er_ControlBlock");
	}
	
	
	function editRecord_HideAlert()
	{
		doHide("er_AlertBlock"); doShow("er_ControlBlock");
	}










/*	========================================================== */


	function lostPassword()
	{
    	if (document.getElementById)
    	{
    		lpFetchData(document.getElementById("emailBox").value);
    	}
    	else
    	{ alert("Your browser cannot perform this function." + chr(13) + "Please contact the UTA AP Summer Institute Office at 817-272-7215 for assistance."); }
		
	}





		function lpAjaxFailure()
		{
			if (!ajaxComplete)
			{ alert("The ajax function has failed to respond in time."); }
		}

        
        function lpHandleStateChange()
        {

            if (xmlHttp.readyState == 4)
            {     if (xmlHttp.status == 200) {  ajaxComplete = true; lpFinishJob();  }     }
        }





        function lpFetchData(theItem)
        {

			document.getElementById("emailStatus").innerHTML = '&nbsp;';
            if (window.ActiveXObject) { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); }
            else if (window.XMLHttpRequest) { xmlHttp = new XMLHttpRequest(); }

            xmlHttp.onreadystatechange = lpHandleStateChange;
            xmlHttp.open("POST", "https://" + serverPath + "/apsi/online/fetchAccount.php", true);
            xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
            xmlHttp.setRequestHeader("Cache-control", "no-cache");
            xmlHttp.setRequestHeader("Pragma", "no-cache");
            var queryString = "email=" + theItem;
			setTimeout("lpAjaxFailure()", ajaxTimeOut);
            xmlHttp.send(queryString);
        }



        function lpFinishJob()
        {
        	/*   1: email not found;  2: email sent;  3: the result back from AJAX was bad;   */
            var xmlDoc = xmlHttp.responseXML; var theElem = null; var resultCode = 3;
            var failed = xmlDoc.getElementsByTagName("failed")[0].firstChild.nodeValue;
            if (failed == 0) 
            {
                resultCode = xmlDoc.getElementsByTagName("resultCode")[0].firstChild.nodeValue;
            }
            else
            {
                resultCode = 1;
            }

			document.getElementById("emailStatus").innerHTML = resultCode;
        }



