function notAvailable(x)
{
	// Stub out a menu function in admin.
}

function imgOn(imgName) 
{
    if(document.getElementById(imgName))
    {
        document.getElementById(imgName).src = "GUI/"+ imgName + "_over.gif";
    }
}
function imgOff(imgName) 
{
    if(document.getElementById(imgName))
    {
        document.getElementById(imgName).src = "GUI/"+ imgName + ".gif"; 
    }
}

function imgOnAdmin(imgName) 
{
    if(document.getElementById(imgName))
    {
        document.getElementById(imgName).src = "../GUI/"+ imgName + "_over.gif";
    }
}
function imgOffAdmin(imgName) 
{
    if(document.getElementById(imgName))
    {
        document.getElementById(imgName).src = "../GUI/"+ imgName + ".gif"; 
    }
}

function imgOnVirtual(imgName, rootVirtualPath) 
{
    if(document.getElementById(imgName))
    {
        document.getElementById(imgName).src = rootVirtualPath + "GUI/"+ imgName + "_over.gif";
    }
}

function imgOffVirtual(imgName, rootVirtualPath) 
{
    if(document.getElementById(imgName))
    {
        document.getElementById(imgName).src = rootVirtualPath + "GUI/"+ imgName + ".gif"; 
    }
}

function imgOnOrOffFullPath(imgName, imgLocaltion) 
{
    if(document.getElementById(imgName))
    {
        document.getElementById(imgName).src = imgLocaltion;
    }
}

function imgOnM(img, ID)
{
	document.getElementById(img + ID).src = "gui/" + img + "_i.gif";
}


function imgOffM(img, ID)
{
	document.getElementById(img + ID).src = "gui/" + img + "_o.gif";
}


// Cross-browser function to add a function to the onload event.
function AddOnload(myfunc)
{
	if(window.addEventListener)	// FireFox
	{
		window.addEventListener('load', myfunc, false);
	}
	else if(window.attachEvent)	// IE
	{
		window.attachEvent('onload', myfunc);
	}
	else if (window.onload)
	{
		var func = window.onload; 
		window.onload = function()
		{
			func();
			myfunc();
		}
	}
	else
	{
		window.onload = myfunc();
	}
}



sfHover = function() {
	var sfElsNB = document.getElementById("navbar");
	if (!sfElsNB)
	{
		return;
	}
	var sfEls = sfElsNB.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);