﻿var LI_Const = "LI", DIV_Const = "div", Empty_Const = "";

startList = function() {
    try{
        if (document.getElementById) {
            for(j=0;j<MenuIDs.length;j++){
                navRoot = document.getElementById(MenuIDs[j]);
                for (i=0; i<navRoot.childNodes.length; i++) {
                    node = navRoot.childNodes[i];
                    if (node.nodeName==LI_Const) {
                        node.onmouseover=function() {over(this, j);}
                        node.onmouseout=function()  {out(this, j);}
                    }
                }
            }
        }
    }catch(e){}
}
XBrowserAddHandler(window,'load','startList')

function over(obj, MenuIDIndex){
	obj.className += " expandedli";
    var ulList = obj.getElementsByTagName(DIV_Const);
    if(ulList.length > 1){
	    ulList[1].className += " Show";
	}
}

function out(obj, MenuIDIndex){
	obj.className = obj.className.replace(/\s*expandedli/gi, Empty_Const);
    var ulList = obj.getElementsByTagName(DIV_Const);
    if(ulList.length > 1)
	    ulList[1].className =  ulList[1].className.replace(/\s*Show/gi, Empty_Const);
}