// Ajax function before login
var loadIMG = '<center>LOADING...</BR><img src="image/progIndicator.gif" width="25px" height="25px"></center>';
function getXMLHTTPRequest() 
{
	try 
	{
		req = new XMLHttpRequest();
	} 
	catch(err1) 
	{
  		try 
		{
  			req = new ActiveXObject("Msxml2.XMLHTTP");
  		} 
		catch (err2) 
		{
    		try 
			{
    			req = new ActiveXObject("Microsoft.XMLHTTP");
    		} 
			catch (err3) 
			{
    	  		req = false;
    		} 
  		} 
	}
	return req;
}

var http = getXMLHTTPRequest();

function getServerText(locationVar,fileNum) {
  var myurl = 'scripts/PHP/getFilePreLogin.php?locationVar='+locationVar;
  myRand = parseInt(Math.random()*999999999999999);
  var modurl = myurl+"&filenum="+fileNum;  
  http.open("GET", modurl, true);
  http.onreadystatechange = useHttpResponse;
  http.send(null);
}

function useHttpResponse() 
{
	if (http.readyState == 4) 
	{
    	if(http.status == 200) 
		{ 
      		var mytext = http.responseText;
			var test = mytext.split("|");
			document.getElementById(test[0]).innerHTML = test[1];
			document.getElementById('login').innerHTML = "";
    	}
	}
	else 
	{
  		document.getElementById('load').innerHTML = '<p style="font: 1.8em Verdana; padding: 80px 50% 80px 50%; text-align:center;">LOADING...</br><img src="image/progIndicator.gif" width="100px" height="100px"></p>';
		//loadIMG;
  	}
}

