// JavaScript Document

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

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 include(fileUrl) {
   var script = document.createElement("script");
   var head = document.getElementsByTagName('head').item(0); 
   script.src = fileUrl;
   head.appendChild(script); 
}

function showOverlay(title,url){
	document.getElementById('grayOverlay').style.display = 'inline';
	document.getElementById('overlayTitle').innerHTML = '<div class="floatRight bold" onClick="document.getElementById(\'grayOverlay\').style.display = \'none\';" onMouseOver="this.style.cursor=\'pointer\';" onMouseOut="this.style.cursor=\'normal\';">X</div>'+title;
	document.getElementById('overlayFrame').src = url;
}

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

