// JavaScript file

/**
*	Loads the specified content, replaces existing center content. Changes the style of the selected object, resets styles of
*	non-selected objects.
*/
function replaceContent(strEl, strScript)
{
	//alert(strEl+'!! '+strScript);
	objAjax = new AjaxClass();
	elReplace = document.getElementById(strEl);	
	
	/**
	* Code the onreadystatechange function to action the returned request object. The states are
	*	State 	Description 
	*	0 		The request is not initialized 
	*	1 		The request has been set up 
	*	2 		The request has been sent 
	*	3 		The request is in process 
	*	4 		The request is complete 
	*/
	objAjax.xmlHttp.onreadystatechange=function()
	{
		if(objAjax.xmlHttp.readyState==4)
		{
			elReplace.innerHTML=objAjax.xmlHttp.responseText;
			
			//alert(objAjax.xmlHttp.responseText);
		}
	} 
	/**
	* Call the open and send methods on the xmlHttp object, with a Get request and the src of img.php
	*/
	objAjax.commit('GET', strScript);
}

