function ahah(url,pageid)
 {
	/* document.title = ' Loading...'; */
	if (window.XMLHttpRequest) 
	{
		req = new XMLHttpRequest();
	}
		else if (window.ActiveXObject) 
	{
		req = new ActiveXObject("Microsoft.XMLHTTP");
	}
	if (req != undefined)
	{
		req.onreadystatechange = function() 
		{
			ahahDone(url,pageid);
		};
		url = "./resources/html/" + url + ".html";
		req.open("GET", url, true);
		req.send("");
	}
}  

function ahahDone(url,pageid)
{
	if (req.readyState == 4)
	{ 
		// only if req is "loaded"
		if (req.status == 200) 
		{ 
			var $j = jQuery.noConflict();
			// only if "OK"
			$j('.content').fadeOut('slow', function() {});
			$j('.content').fadeIn('slow', function() {});
			setTimeout("document.getElementById('content').innerHTML = req.responseText;",500);
		} 
		else 
		{
			document.getElementById('content').innerHTML="Error:\n"+ req.status + "\n" +req.statusText;
		}
	}
}

function load(name) 
{
	ahah(name,name);
	return false;
}

function addScrollers()
{
	$('.textcontent').jScrollPane();
}
