	var method = "";
	var result = "";
	var universityID = "";
	var fname = "";
	var mname = "";
	var lname = "";
	
	
	function loadXMLDoc( url ) 
	{
	    // branch for native XMLHttpRequest object
	    if (window.XMLHttpRequest) {
	        req = new XMLHttpRequest();
	        req.onreadystatechange = processReqChange;
	        req.open("GET", url, true);
	        req.send(null);
	    // branch for IE/Windows ActiveX version
	    } else if (window.ActiveXObject) {
	        req = new ActiveXObject("Microsoft.XMLHTTP");
	        if (req) {
	            req.onreadystatechange = processReqChange;
	            req.open("GET", url, true);
	            req.send();
	        }
	    }
		
	}
	//-------------------------------------------------//
	
	function processReqChange()
	{
	    // only if req shows "complete"
	    if (req.readyState == 4)
		{
	        // only if "OK"
	        if (req.status == 200)
			{
	            // ...processing statements go here...
		    	response  = req.responseXML.documentElement;
				
				method = response.getElementsByTagName('method')[0].firstChild.data;
				result = response.getElementsByTagName('result')[0].firstChild.data;
				
				universityID = response.getElementsByTagName('universityid')[0].firstChild.data;
				fname = response.getElementsByTagName('fname')[0].firstChild.data;
				mname = response.getElementsByTagName('mname')[0].firstChild.data;
				lname = response.getElementsByTagName('lname')[0].firstChild.data;
				
	        }
			else
			{
	            //alert("There was a problem retrieving the XML data:\n" + req.statusText);
	        }
	    }
	}
	
	//-------------------------------------------------//
	
	function ProcessInfo ( )
	{	
	
		var ID = document.getElementById("last4SSN").value;
		var DOB = document.getElementById("DOB").value;
		
			if ( ( ID != "Enter the last 4 digits of your SSN" ) && ( ID != "" ) )
			{
				if( ( DOB != "Enter your Date of Birth" ) && ( DOB != "" ) )
				{
					InputInfo( ID, DOB, '');
				}
			}									
		
	}
	//-------------------------------------------------//
	//Function to handle the input from the user and send it to the server for processing 
	function InputInfo(ID, DOB, response)
	{	  
	  if (response == '')
	  { 	 
	    // Input mode		
	   	url = "http://www.ius.edu/financialaid/LookUp2.cfm?id=" + ID + "&DOB=" + encodeURIComponent(DOB);
	  	loadXMLDoc(url);
	  }	
	}
	
	function InputPersonalInfo(response)
	{
	  
	  if (response != '')
	  { 
	    // Response mode	    
	    if (response == 1)
		{	// Redirect user to page stating that they have not submitted the scholarship application form yet
			window.location="http://www.ius.edu/financialaid/NotSubmitted.cfm";
	    } else if (response == 3)
		{	// Redirect user to page stating that they have already completed this form
			window.location="http://www.ius.edu/financialaid/AlreadySubmittedExtra.cfm";
				
		} else if (response == 2)
		{	// Populate page
			document.getElementById('StudentNameData').innerHTML = fname + " " +mname + " " + lname;			
			document.getElementById('StudentIDData').innerHTML = universityID;			
				
		}
	  }
	 }