//start to instantiate XMLHttpRequest object,
var xmlhttp = false;
//check if we are using IE
try {
	//if the js version is greater than 5
	xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
	//if not, use older activex object
	try {
		//if we are using IE
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	} catch(E) {
		//using non-IE browser
		xmlhttp = false;
	}
}
//using a non-IE browser, create js instance of object
if(!xmlhttp && typeof XMLHttpRequest != 'undefined') {
	xmlhttp = new XMLHttpRequest();
}
// XMLHttpRequest object created

//function to make server request
function make_request(server_page, obj_id, open_method) {
	var obj = document.getElementById(obj_id);
	xmlhttp.open(open_method, server_page);
	xmlhttp.onreadystatechange = function() {
		if(xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			obj.innerHTML = xmlhttp.responseText;
		}
	}
	xmlhttp.send(null);
}

//==============================================
//sfhover for CSS Slider Menu
//This allows for a lack of CSS support by Internet Explorer
//==============================================
sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

