// JavaScript Document

function CreateXHR() {
//no var makes xhr global
window.xhr=false;

//non IE browsers
if (window.XMLHttpRequest) {

	xhr= new XMLHttpRequest();
}else if(window.ActiveXObject) {
	xhr= new ActiveXObject("MicrosoftXMLHTTP");
	
}//end if window

}//end function



function getData(dataSource, divID) {
	if (xhr) {
		var obj=divID;
		xhr.open("GET",dataSource);
		
	
	xhr.onreadystatechange=function() {
		if (xhr.readyState==4  && xhr.status==200) {
			obj.innerHTML=xhr.responseText;
		}//end if check on ready state and status
	}//end anonymous function 
	
	xhr.send(null);
	
	}//end if on xhr
}//end function

