// check browser type to determine type of object to use
var xmlhttp = false;

// check for ie
try {
	// is javascript greater than version 5?
	xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	//alert ("You are using MS IE");
} catch (e) {
	// if not, use old active x object
	try {
		// using ie
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTTP");
	} catch (E) {
		// not using ie
		//alert ("You are not using MS IE");
		xmlhttp = false;
	}
}

// if not using ie, create a js instance of the obj
if(!xmlhttp && typeof XMLHttpRequest != 'undefined'){
	xmlhttp = new XMLHttpRequest();
}

function loadContent(serverPage, objID){
	var obj = document.getElementById(objID);
	xmlhttp.open("GET", serverPage);
	xmlhttp.onreadystatechange = function(){
		if(xmlhttp.readyState == 4 && xmlhttp.status == 200){
			obj.innerHTML = xmlhttp.responseText;
		}
	}
	xmlhttp.send(null);
}

function addBookmark(title,url) {
	if (window.sidebar) {
		window.sidebar.addPanel(title, url,"");
	} else if( document.all ) {
		window.external.AddFavorite( url, title);
	} else if( window.opera && window.print ) {
		return true;
	}
}
