function showEvent(id)
{
	xmlHttp = GetXmlHttpObject();
	if (xmlHttp == null) { alert ("Your browser does not support AJAX!"); return; }

	var url = "calendar_eventinfo.php?id=" + id;
	xmlHttp.onreadystatechange = function() {
		if(xmlHttp.readyState >= 0 && xmlHttp.readyState <= 3) show('ML_Loading');
		else if(xmlHttp.readyState == 4)
		{
			//hide('ML_Loading');
			document.getElementById('EventInfo').innerHTML = xmlHttp.responseText;
			show('EventInfo');
			//alert(xmlHttp.responseText);
		}
	};
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function GetXmlHttpObject()
{
	// Firefox, Opera 8.0+, Safari
	try { xmlHttp=new XMLHttpRequest(); }
	catch (e)
	{
		// Internet Explorer 6.0+
		try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); }
		catch (e)
		{
			//Internet Explorer 5.5+
			try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); }
			catch (e) { alert("Your browser does not support AJAX!"); return false; }
		}
	}
	return xmlHttp;
}

function show(i) { document.getElementById(i).style.display = "block"; }
function hide(i) { document.getElementById(i).style.display = "none"; }

function init()
{
	/*
	w = document.body.clientWidth ? document.body.clientWidth : window.innerWidth;
	h = document.body.clientHeight ? document.body.clientHeight : window.innerHeight;
	*/
	
	w = document.documentElement.clientWidth;
	h = document.documentElement.clientHeight;
	
	if(document.getElementById('ML_Loading'))
	{
		document.getElementById('ML_Loading').style.width = w + 'px';
		document.getElementById('ML_Loading').style.height = h + 'px';
	}
	
	if(document.getElementById('EventInfo'))
	{
		document.getElementById('EventInfo').style.left = parseInt((w - 480) / 2) + "px";
		document.getElementById('EventInfo').style.top = parseInt((h - 320) / 2) + "px";
	}
}