var xmlHttp

function show(box) {
	xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null) {
			alert('Giving up :( Cannot create an XMLHTTP instance. Something is borked.');
			return;
	}

	if (box == 'events') {
		var url="events.php";
	} else {
		var url="promo.php";
	}
	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function stateChanged() {
	if (xmlHttp.readyState==4) {
		document.getElementById("skylonbox").innerHTML=xmlHttp.responseText;
	}
}

function GetXmlHttpObject() {
	var xmlHttp=null;
	try {
		// Firefox, Opera 8.0+, Safari, IE7
		xmlHttp=new XMLHttpRequest();
	}
	catch (e) {
		// IE6 and under
		try {
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e) {
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xmlHttp;
}

