
var mouseX, mouseY;


function getMousePosition(e) {
	try {
		if (!e) e = window.event;
		if (e.pageX)
			mouseX = e.pageX;
		else if (e.clientX)
			mouseX = e.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft);
		else
			mouseX = null;			
		if (e.pageY)
			mouseY = e.pageY;
		else if (e.clientY)
			mouseY = e.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);
		else
			mouseY = null;
	} catch(e) {
		// This is here so that the page doesn't throw errors when there is no
		// document.  That seems to happen in IE when the mouse is moving while the
		// page is loading.
	}
}

function getInfo(page,divid,vars) 
	{
		if(divid == "aboutinfo") {
			aid = vars.substring(4,6);
			for(i=1; i<=3; i++) {
				document.getElementById("n"+i).style.fontWeight = "normal";
				document.getElementById("n"+i).style.backgroundColor = "#eee";
				document.getElementById("n"+i).style.borderBottom = "none";
			}
			document.getElementById(aid).style.backgroundColor = "white";
			document.getElementById(aid).style.fontWeight = "bold";
			document.getElementById(aid).style.borderBottom = "solid 1px #fff";
		}
		URL = page;		
		var INTcontentType = "application/x-www-form-urlencoded; charset=UTF-8";
		try { ajaxObj = new ActiveXObject("Msxml2.XMLHTTP"); }
		catch (e) 
		{
			try { ajaxObj = new ActiveXObject("Microsoft.XMLHTTP"); }
			catch (e) { ajaxObj = new XMLHttpRequest(); }
		}	
		ajaxObj.open("POST", URL, true);
		ajaxObj.setRequestHeader("Content-Type", INTcontentType);
		ajaxObj.send(vars);	
		ajaxObj.onreadystatechange = function () 
		{
			if (ajaxObj.readyState == 4) { document.getElementById(divid).innerHTML = ajaxObj.responseText; }
		}
		document.getElementById(divid).style.display = "block";
	}

function closeElem(elemid) {
	document.getElementById(elemid).style.display = "none";
}

function changeColor(elemid) {
	for(i=1; i<=4; i++) document.getElementById('news_item'+i).style.backgroundColor = "#ffffff";
	document.getElementById(elemid).style.backgroundColor = "#F8FAA3";		
}

