var currentDescription = "";
var currentID = 0;
var canOut = true;

function fetchEventDescription(eventID)
{
	return;

	if (currentID == eventID)
	{
		return;
	}

	currentID = eventID;
	canOut = false;
	currentDescription = $('eventdesc_' + eventID).innerHTML;
	new Ajax.Updater("eventdesc_"  + eventID, 'ajax/fetcheventdesc.php', { method: 'get' , parameters: {eventID: eventID}, onSuccess: setTimeout("canOut=true", 500) });
}

function restoreEventDescription()
{
	return;

	if (canOut)
	{
		$('eventdesc_' + currentID).innerHTML = currentDescription;
		canOut = true;
		currentID = 0;
	}
}

function showMenu()
{
	var menu = document.getElementById("gigguidesubmenu");
	var menuOption = findPos(document.getElementById("gigguidemenu"));

	menu.style.top = parseInt(menuOption[1] + 23) + "px";
	menu.style.left = parseInt(menuOption[0] - 6) + "px";
	menu.style.visibility = "visible";
}

function hideMenu()
{
	var menu = document.getElementById("gigguidesubmenu");

	menu.style.visibility = "hidden";
}

function dumper(object, showType)
{
	if (showType) alert("Dumping type " + showType);

	for (var thing in object)
	{
		if (showType == "" || showType == null)
		{
			console.debug("object[" + thing + "] : " + object[thing]);
		}
		else if (typeof object[thing] == showType)
		{
			console.debug("object[" + thing + "] : " + object[thing]);
		}
	}
}

function findPos(obj) {
	if (obj.x) return [obj.x, obj.y];

	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}