
// global variables //
var m_mainDivId = "divRecent";
function StopMarquee() {
    document.getElementById('mrqRecent').scrollAmount=0;
}
function StartMarquee() {
    document.getElementById('mrqRecent').scrollAmount=1;
}
        
// new functions (ajax) //
function GetXmlHttpObject()
{
	var xmlHttp=null;
	try {
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e) {
		// Internet Explorer
		try {
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e) {
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
    return xmlHttp;
}

function GetRecentContent(url)
{   
	var xmlHttp = GetXmlHttpObject();
	if(xmlHttp == null) {
		return;
	}
	xmlHttp.onreadystatechange=function() {
		processRequest(xmlHttp);
	}
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function processRequest(req) 
{    
	if (req.readyState == 4) {        
		if (req.status == 200) {
			document.getElementById(m_mainDivId).innerHTML=req.responseText;			
		} 
		else {
			document.getElementById(m_mainDivId).innerHTML="";//"There was a problem retrieving data : "+req.statusText;
		}
	}
}
