// AJAX up in here
function getHTTPObject() {
	var xmlhttp = false;
	/*@cc_on
	@if (@_jscript_version >= 5)
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (E) {
				xmlhttp = false;
			}
		}
	@end @*/
	if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
			xmlhttp = new XMLHttpRequest();
   	} 
   	return xmlhttp;
}
var ajax = getHTTPObject();

function getAJAX(serverPage, objID) {
	var obj = document.getElementById(objID);
	obj.innerHTML = 'Gathering information, please wait...';
	ajax.open("GET", serverPage);
	ajax.onreadystatechange = function() {
		if (ajax.readyState == 4 && ajax.status == 200) {
			obj.innerHTML = ajax.responseText;
		}
	}
	ajax.send(null);
}

function getExternal(serverPage, objID, objID2, title) {
	var obj = document.getElementById(objID);
	var obj2 = document.getElementById(objID2);
	obj.innerHTML = 'Gathering information, please wait...';
	obj2.innerHTML = '<a class="external" href="javascript:void(0);" onclick="getExternal(\'/ajax/externals.php\', \'externals\', \'exthead\', \'Sites We Like\');">'+title+'</a>';
	ajax.open("GET", serverPage);
	ajax.onreadystatechange = function() {
		if (ajax.readyState == 4 && ajax.status == 200) {
			obj.innerHTML = ajax.responseText;
		}
	}
	ajax.send(null);
}
