// JavaScript Document
var atopMenu = "false";
var atopSubmenu = "false";
var currentMenu = "";
function showMenu(menu,left){
	document.getElementById(menu).style.left = Math.round(left)+'px';
	document.getElementById(menu).style.display="inline";
	if(currentMenu != "" && currentMenu != menu){
		document.getElementById(currentMenu).style.display = "none";
		atopSubmenu == "false";
	}
	currentMenu = menu;
}
function hideMenu(menu){
	if(atopMenu == "false" && atopSubmenu == "false"){
		document.getElementById(menu).style.display="none";
	}
}
function timeout(menu)
{
	setTimeout("hideMenu('"+menu+"')", 50)
}
function setAtopMenu(variable){
	atopMenu = variable;
}
function setAtopSubmenu(variable){
	atopSubmenu = variable;
}

function goToDay(vars,month,day,year){
	window.location = 'fullpagecalendar.php?IDs='+vars+'&month='+month+'&day='+day+'&year='+year;
}


var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the FSCommand messages in a Flash movie.
function page_title_DoFSCommand(command, arg) {
	var page_titleObj = isInternetExplorer ? document.all.page_title : document.page_title;
	eval(command);
}
// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub page_title_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call page_title_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}

function squirtFlash(source,width,height){
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+width+'" height="'+height+'">');
	document.write('<param name="wmode" value="transparent" />');
	document.write('<param name="movie" value="'+source+'">');
	document.write('<param name="quality" value="high">');
	document.write('<embed wmode="transparent" src="'+source+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"></embed>');
	document.write('</object>');
}

function enterkey(frm,e)
{
	var keycode;
	if (window.event) keycode = window.event.keyCode;
	else if (e) keycode = e.which;
	if (keycode == 13) frm.submit();
}

function announceExpand(id){
	if(document.getElementById('ann'+id).style.display == 'none'){
		document.getElementById('ann'+id).style.display = 'inline';
	} else {
		document.getElementById('ann'+id).style.display = 'none';
	}
}

function include(fileUrl) {
   var script = document.createElement("script");
   var head = document.getElementsByTagName('head').item(0); 
   script.src = fileUrl;
   head.appendChild(script); 
}

