// JavaScript Document

/*************************************
 * This function will create an XMLHTTP object
 * that can be used for the AJAX calls. Because IE acts
 * differently from Mozilla, there is a conditional on it that will
 * create an IE form of the object. 
 ************************************/
function getXMLHttp() {
	var xmlHttp

	try  {
	    //Firefox, Opera 8.0+, Safari
    	xmlHttp = new XMLHttpRequest();
	}		// end of try for Firefox
	catch(e) {
    	//Internet Explorer
    	try   {
      		xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
	    }	// end of try for  Msxml2.XMLHTTP
    	catch(e) {
		    try {
    		    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
      		}		// end of try for Microsoft.XMLHTTP
      		catch(e) {
        		alert("Your browser does not support AJAX!")
		        return false;
	     	}		// end of  catch for Microsoft.XMLHTTP
    	}		// end of catch for Msxml2.XMLHTTP 
  	}			// end of catch for  new XMLHttpRequest
  	return xmlHttp;
}		// end of getXMLHttp

/*********************************
 * AJAX make request for the XMLHTTP. This will allow 
 * us to make HTTP requests back to the server, and 
 * retrieve the results to this page. 
 * 
 * The ready state is set to 4 to assure that all of the informaiton is pulled back
 * from the page requests. 
 *********************************/
function MakeRequest(pageURL) {
	var xmlHttp = getXMLHttp();
 
  	xmlHttp.onreadystatechange = function() {
    								if (xmlHttp.readyState == 4) {
							      		HandleResponse(xmlHttp.responseText);
							    	}		// end of (xmlHttp.readyState == 4)
							  	 } 	// end of function()

	// Set the HTTP Request type (Post/Get), Page request, and is this Asynchronous (true) or not(false)
  	xmlHttp.open("GET", pageURL, true);
  	xmlHttp.send(null);
}	// end of function MakeRequest()
 
/***************************************
 * This function will handle the response back from the page request 
 **************************************/
function HandleResponse(response) {
	document.getElementById('eventDetailDiv').innerHTML = response;
}	// end of function HandleResponse(response)
 

