// JavaScript Document
var xmlhttp
var loadScreen
var whatDiv
var mode
loadScreen='<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"><tr><td align="center" valign="bottom"><img border="0" src="rnd_loadingAnimation.gif"></td></tr><tr><td align="center" valign="top"><span class="loadingText">Loading...</span></td></tr></table>';

function showLoading(myDiv) {
	document.getElementById(whatDiv).innerHTML=loadScreen;
}

function showCtC(myDiv, myUrl)
{
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
{
alert ("Your browser does not support AJAX!");
return;
}
whatDiv=myDiv;

var url=myUrl;
xmlhttp.onreadystatechange=this.stateChanged;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}

function stateChanged()
{
	if (xmlhttp.readyState==4)
		{
		document.getElementById(whatDiv).innerHTML=xmlhttp.responseText;
		}
	else
	{
	showLoading(whatDiv);
	}
}

function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
{
// code for IE7+, Firefox, Chrome, Opera, Safari
return new XMLHttpRequest();
}
if (window.ActiveXObject)
{
// code for IE6, IE5
return new ActiveXObject("Microsoft.XMLHTTP");
}
return null;
}
