function makeRequest(filename,pic) {
	if (window.XMLHttpRequest) {
		xhr = new XMLHttpRequest();
	}
	else {
	      if (window.ActiveXObject) {
			try {
				xhr = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e) { }
		}
	}

	if (xhr) {
		document.getElementById("lowerbody").style.backgroundImage = "url(../images/"+pic+".jpg)";
		xhr.onreadystatechange = showContents;
		xhr.open("GET", "../content/"+filename+".txt", true);
		xhr.send(null);
	}
	else {
		document.getElementById("middlecontent").innerHTML = "Sorry, but I couldn't create an XMLHttpRequest";
	}
}

function showContents() {
	if (xhr.readyState == 4) {
		if (xhr.status == 200) {
			showpage();
			}
		else {
			var outMsg = "There was a problem with the request " + xhr.status;
		}
	}

}

function showpage()
{
outMsg =  xhr.responseText;
document.getElementById("middlecontent").innerHTML = "<img style='padding-top:120px;padding-left:20px;' src='../images/middlecontenttop.jpg' />"+outMsg;
}
