function loadBodyContent()
{
	loadContent("bodyTop", "bodyTop.txt", false);
	loadContent("bodySide", "bodySide.txt", false);
	loadContent("bodyBottom", "bodyBottom.txt", false);
}

var xmlhttp;
var loadContentTargetId;

function loadContent(targetId, sourceURL, async)
{
	xmlhttp = GetXmlHttpObject();

	if(xmlhttp == null)
	{
		alert("XMLHTTP is not supported by your browser!");
		return;
	}

	loadContentTargetId = targetId;

	if(async)
	{
		xmlhttp.callback = loadContentCallback;
	}
//alert("1");
	xmlhttp.open("GET", sourceURL, async);
//alert("2");
	if(window.XMLHttpRequest) { xmlhttp.send(null); }
	else xmlhttp.send();
//alert("3");
	if(!async)
	{
		document.getElementById(loadContentTargetId).innerHTML = xmlhttp.responseText;
	}
}

function GetXmlHttpObject()
{
	var xmlhttp2;
	
	if(window.ActiveXObject)
	{
		try{
		xmlhttp2 = new ActiveXObject("Msxml2.XMLHTTP");
		//alert("msxml2");
		} catch(e) {
		try {
		xmlhttp2 = new ActiveXObject("Microsoft.XMLHTTP");
		//alert("msxml");
		} catch(e) {
		if(window.createRequest)
		{
			try {
			xmlhttp2 = window.createRequest();
			//alert("Request");
			}
			catch(e) { return NULL; }
		}
		}
		}
		return xmlhttp2;
		
	}
	if(window.XMLHttpRequest)
	{
		//alert("normal");
		return new XMLHttpRequest();
	}
	//alert("Nothin");
	return NULL;
}

function loadContentCallback()
{
	if(xmlhttp.readyState == 4)
	{
		if(xmlhttp.status == 200)
		{
			document.getElementById(loadContentTargetId).innerHTML = xmlhttp.responseText;
			return;
		}
		else
		{
			document.getElementById(loadContentTargetId).innerHTML = "I/O Error";
		}
	}
}

