
/*				_javascript/httpRequest.js
*/



// creates XMLHttpRequest object for AJAX applications


var httpRequest=false;

try{httpRequest=new XMLHttpRequest();}
 catch(tryIE){
	try{httpRequest=new ActiveXObject("Msxml2.XMLHTTP");}
	 catch(tryOlderIE){
		try{httpRequest=new ActiveXObject("MicrosoftXMLHTTP");}
		 catch(failed){
			 httpRequest=false;
		 }
	 }
 }


// show error if httpRequest=false
if(httpRequest===false){
	alert("Sorry, your browser does not support AJAX applications!");
} 


function fetchAjaxResponse(oThis,responseFunction){
// runs response function once request is complete


	if (httpRequest.readyState == 4){
		if (httpRequest.status == 200){
				responseFunction.apply(oThis);
		} else if (httpRequest.status == 404){
	         // alert("Request URL does not exist");
		} else {
	        //  alert("Error: status code is " + httpRequest.status);
		}
	}

}


/*			created on [ 09.29.2009 ] Grenard Madrigal
/*			updated on [ 09.29.2009 ] Grenard Madrigal
/*			evolve, create © 2009
*/






