function createAjaxObject()
{
	var ro;
	if(window.ActiveXObject)
	{
		ro =  new ActiveXObject("Microsoft.XMLHTTP");
	}
	else
	{
		ro =  new XMLHttpRequest();
	}
	return ro;
}

function getServerResponse(url, custom)
{
	var http = createAjaxObject();

	var str = "no response";
	if(http)
	{
		http.onreadystatechange = function()
		{
			
			if(http.readyState == 4)
			{
				if(http.status == 200)
				{
					custom(http.responseText);
					str = http.responseText;
					http = null;
				}
				else
				{
					str = "problem retrieving data";
				}
			}
		}
		http.open("GET",url,true);
		http.send(null);
	}
	else
	{
		return "couldnt get an ajax object";
	}

	return str;
}
var ee;
var winW = 630, winH = 460;
function initiate_popup(eventid,e)
{
	ee=e;
	getServerResponse("cats/"+eventid,popup_detail);
}
function popup_detail(txt)
{
	var popup = document.getElementById("event_detail");
	if(popup)
	{
		if(!ee)
		{
			ee = window.event;
		}
		popup.style.visibility = "visible";
		popup.innerHTML = txt;
		
	}
}
function hide_popup()
{
	document.getElementById("event_detail").style.visibility = "hidden";
	document.getElementById("event_detail").innerHTML = "";
}
      
function get_height()
{
if (parseInt(navigator.appVersion)>3) {
 if (navigator.appName=="Netscape") {
  winW = window.innerWidth;
  winH = window.innerHeight;
 }
 if (navigator.appName.indexOf("Microsoft")!=-1) {
  winW = document.body.offsetWidth;
  winH = document.body.offsetHeight;
 }
}

}



