function hover()
{
	if(document.getElementById("nav"))
	{
		var sfEls = document.getElementById("nav").getElementsByTagName("li");
		for (var i=0; i<sfEls.length; i++)
		{
			sfEls[i].onmouseover = function()
			{
				this.className += " over";
			}
			sfEls[i].onmouseout = function()
			{
				this.className = this.className.replace(new RegExp(" over\\b"), "");
			}
		}
	}
}

function hoverer(ulname) {
    function mouseOver() {
        this.className += ' hover';
    }
    function mouseOut() {
        this.className = this.className.replace(/ *hover\b/g, '');
    }
    var navroot = document.getElementById &&
        document.getElementById(ulname);
    if (document.all && navroot && navroot.currentStyle ) {
        var navroot = document.getElementById(ulname);
        var lis=navroot.getElementsByTagName("li");
        for (var i=0; i<lis.length; i++) {
            lis[i].onmouseover=mouseOver;
            lis[i].onmouseout=mouseOut;
        }
    }
}