/* Navigation fix for LI rollovers */

sfHover = function() 
{
	var sfEls = document.getElementById("globalNav").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"), "");
		}
	}
	var sfEls = document.getElementById("linksCol").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"), "");
		}
	}
	var sfEls = document.getElementById("adminControl").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);

PopupWin = null;
function OpenWindow( url, name, width, height ) 
{
	var scbars
	scbars = 0
	if (name == "courseView")
	{
		scbars = 1;
	}

	
	var params = "width=" + width + ",height=" + height + ",resizable="+ scbars +",scrollbars="+ scbars +",status=1";
	if ( PopupWin != null )
	{
		PopupWin = null;
		PopupWin = window.open( url, name, params );
		PopupWin.focus();
	}
	else
	{
		PopupWin = window.open( url, name, params );
	}
}