//Checking whether browser is the latest version of IE
try {
	//If yes, create object of XMLHttpRequest
	xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		
	} catch(e) {
	//IF not latest browser

		//Checking if browser is a old version of IE
		try {
		//If yes, create object of XMLHttpRequest
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			
		} catch(e) {
		
			//If not both, then it is a NON-IE Browser
			xmlhttp=false;
	}
}
 
//Checking if browser is a non IE browser
if(!xmlhttp && typeof XMLHttpRequest != 'undefined') {
	//Creating an object of XMLHttpRequest in non-IE browsers
	xmlhttp = new XMLHttpRequest();
}
 
function check(link,loader,target) {
var obj = document.getElementById(target);
xmlhttp.open("GET", link); //Opens connection to the scriptpage using GET response method
	xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			obj.innerHTML = xmlhttp.responseText;
		} else {
			if (loader != '') {
				obj.innerHTML = loader;
			}
		}
	}
xmlhttp.send(null);
}