var xhr = false;
function getcontent(url){showPreview(url);}
function showPreview(url) {
	if (window.XMLHttpRequest) {
		xhr = new XMLHttpRequest();
	}
	else {
		if (window.ActiveXObject) {
			try {
				xhr = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e) { }
		}
	}

	if (xhr) {
		xhr.onreadystatechange = showContents;
		xhr.open("GET", url, true);
		xhr.send(null);
	}
	else {
		alert("Sorry, but I couldn't create an XMLHttpRequest");
	}
	return false;
}

function showContents() {
	if (xhr.readyState == 1)
	{
		document.getElementById("content").innerHTML = '<div style="width:50px; margin-left:auto; margin-right:auto; text-align:left;"><br/><br/><br/><br/>LOADING<br/><img style="margin:10px 0 0 8px;" src="/images/gui/loading.gif" border="0"/></div>';
	}
	if (xhr.readyState == 4) {
		if (xhr.status == 200) {
			var outMsg = xhr.responseText;
		}
		else {
			var outMsg = "There was a problem with the request " + xhr.status;
		}

		var prevWin = document.getElementById("content");
		prevWin.innerHTML = outMsg;
	}
}
