//------------------------------------------------------------------------------
//  SmartyMenus Javascript Library version 1.1
//  http://www.phpinsider.com/php/code/SmartyMenus/
//
//  Copyright(c) 2004-2005 New Digital Group, Inc.. All rights reserved.
//
//  SmartyMenus are an implementation of the Suckerfish Dropdowns
//  by Patrick Griffiths and Dan Webb.
//  http://htmldog.com/articles/suckerfish/dropdowns/
//
//  This library is free software; you can redistribute it and/or modify it
//  under the terms of the GNU Lesser General Public License as published by
//  the Free Software Foundation; either version 2.1 of the License, or (at
//  your option) any later version.
//
//  This library is distributed in the hope that it will be useful, but WITHOUT
//  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
//  License for more details.
//------------------------------------------------------------------------------


//function addArrowSys(source)
//{
//    if (document.getElementById("nav_sys") != null)
//    {
//		var sfEls = document.getElementById("nav_sys").getElementsByTagName("LI");
//
//	    for (var i=0; i<sfEls.length; i++)
//	    {
//	    	if (sfEls[i].className == "parent")
//	    	{
//	    		newArrowDiv = document.createElement('div');
//	    		newArrowDiv.className = "Arrow";
//	    		newArrowImg = document.createElement('img');
//	    		// newArrowImg.src = 'theme/uel.emerald.tpl/img/all/arrowLTR.gif';
//	    		newArrowImg.src = source;
//	    		newArrowImg.border = 0;
//	    		newArrowImg.align = "absmiddle";
//	    		newArrowDiv.innerHTML = "&nbsp;";
//	    		newArrowDiv.appendChild(newArrowImg);
//	    		sfEls[i].appendChild(newArrowDiv);
//	    	}
//    	}
//    }
//}
//
//
//function addArrowApp(source)
//{
//    if (document.getElementById("nav") != null)
//    {
//		var sfEls = document.getElementById("nav").getElementsByTagName("LI");
//
//	    for (var i=0; i<sfEls.length; i++)
//	    {
//	    	if (sfEls[i].className == "parent")
//	    	{
//	    		newArrowDiv = document.createElement('div');
//	    		newArrowDiv.className = "Arrow";
//	    		newArrowImg = document.createElement('img');
//	    		// newArrowImg.src = 'theme/uel.emerald.tpl/img/all/arrowLTR.gif';
//	    		newArrowImg.src = source;
//	    		newArrowImg.border = 0;
//	    		newArrowImg.align = "absmiddle";
//	    		newArrowDiv.innerHTML = "&nbsp;";
//	    		newArrowDiv.appendChild(newArrowImg);
//	    		sfEls[i].appendChild(newArrowDiv);
//	    	}
//    	}
//    }
//}


function disableMenuItems(mnu)
{
    if (document.getElementById(mnu) != null)
    {
		var sfElsA = document.getElementById(mnu).getElementsByTagName("A");

		for (var j=0; j<sfElsA.length; j++)
		{
		   	if (sfElsA[j].href.indexOf("_lnk_") >= 0)
		   	{
		   		sfElsA[j].className = " mnuOff";
		   		sfElsA[j].href = "#";
		   		//sfElsA[j].innerHTML += " (off)";
	    	}
	    }
    }
}


//IEHoverPseudo = function() {
//
//	var navItems = document.getElementById("nav").getElementsByTagName("li");
//
//	for (var i=0; i<navItems.length; i++) {
//		if(navItems[i].className == "parent") {
//			navItems[i].onmouseover=function() { this.className += " over"; }
//			navItems[i].onmouseout=function() { this.className = "parent"; }
//		}
//	}
//
//}
//
//if (document.all) { //MS IE
//if (window.attachEvent)
//  window.attachEvent("onload", IEHoverPseudo);
//else { //IE 5.2 Mac does not support attachEvent
//  var old = window.onload;
//  window.onload = function() { if (old) old(); IEHoverPseudo(); }
//}
//}

sfHover = function() {
    if (document.getElementById("nav") != null)
    {
    	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"), "");
	        }
	    }
    }
    if (document.getElementById("nav_sys") != null)
    {
	    var sfEls = document.getElementById("nav_sys").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"), "");
	        }
	    }
    }

}
if (document.all) { //MS IE
    if (window.attachEvent)
        window.attachEvent("onload", sfHover);
    else { //IE 5.2 Mac does not support attachEvent
        var old = window.onload;
        window.onload = function() { if (old) old(); sfHover(); }
    }
}



