/*
**	Javascript Functions for
**	The Volunteer Center of Morgan County
**
**	(C)2008 Pedantic Webspaces - All Rights Reserved
*/

var MenuTimer;
var MenuTarget;

function initMenu()
{
    var sfEls = document.getElementById("menu").getElementsByTagName("a");
	str = document.URL
    for (var i=0; i<sfEls.length; i++)
	{
		if( sfEls[i].href == str ) // Self
		{
			sfEls[i].style.color = "#ffee88";
		}
		else
		{
			sfEls[i].onmouseover = function(evt){initColorFade(this.id,'ffffff','ffee88',2);};
			sfEls[i].onmouseout = function(evt){initColorFade(this.id,'ffee88','ffffff',8);};
		}
	}
}

sfHover = function() {
    var sfEls = document.getElementById("menu").getElementsByTagName("li");
    for (var i=0; i<sfEls.length; i++) {
        sfEls[i].onmouseover=function() {
            this.className+=" hover";
        }
        sfEls[i].onmouseout=function() {
            this.className=this.className.replace(new RegExp(" hover\\b"), "");
        }
    }
}

if (window.attachEvent) window.attachEvent("onload", sfHover);
initMenu();