var hideInterval;
reloadMe = false;

function hover_row(row) {
	cells = row.getElementsByTagName("td")
	for (var i=0; i<cells.length; i++) {
		cells[i].style.backgroundColor='#d3cbbf';
	}

	document.body.style.cursor = 'pointer';
}
function clear_row(row) {
	cells = row.getElementsByTagName("td")
	for (var i=0; i<cells.length; i++) {
		cells[i].style.backgroundColor='';
	}

	document.body.style.cursor = '';
}
function OpenMenu(e,date,strdate) {
	var IE = document.all?true:false;
	if (IE) {
		mousex = window.event.x + document.body.scrollLeft;
		mousey = window.event.y + document.body.scrollTop;
	} else {
		mousex = e.pageX;
		mousey = e.pageY;
	}

	div_menu = getElement("events_menu_div");
	div_menu.style.display = '';
	if (!IE) div_menu.style.left = mousex-160;
	div_menu.style.top = mousey;

	div_menu_header = getElement("events_menu_header_div");
	div_menu_header.innerHTML = strdate;

	window.frames['events_menu'].location = "events_menu.php?date=" + date; // + "#0900";
}
function Menu_MouseOut() {
	hideInterval = setInterval('HideMenu()',1000);
}
function Menu_MouseOver() {
	clearInterval(hideInterval);
}
function HideMenu() {
	clearInterval(hideInterval);
	getElement("events_menu_div").style.display = 'none';
}
function HideAddEvent() {
	getElement("add_event_div").style.display = 'none';
}
function ShowAddEvent(date,id) {
	var IE = document.all?true:false;

	div_add_event = getElement("add_event_div");
	div_menu = getElement("events_menu_div");

	div_add_event.style.display = '';
	if (!IE)
		div_add_event.style.left = 170+(div_menu.style.left.substring(0,div_menu.style.left.length-2)*1);
	div_add_event.style.top = div_menu.style.top;

	if (date != "")
		window.frames['add_event'].location = "add_event.php?date=" + date;
	else
		window.frames['add_event'].location = "add_event.php?id=" + id;
}
