/*
 Copyright (C) 2000  e.magination network, llc.  All Rights Reserved.
   Feel free to reuse or modify this code,
   provided this header remains in tact
   http://www.emagination.com
   Jibba Jabba strikes again.
*/

//Timeouts are only used for Netscape because of 
//synchronization problems.

DynLayer.prototype.group = null;
function groupLayers(ary) {
	for (var i in ary) {
		eval(ary[i].replace(/Div$/,'')).group = ary;
		eval(ary[i].replace(/Div$/,'')).initialized = true;
	}
}//groupLayers

delay = 100;
timeoutID = new Array();
function showMenu(aryMenuLayer) {
	if (this.initialized) {
		var objLayer = this;
		var strLayerID = objLayer.id;
		if (is.ns4) clearTimeout(timeoutID[strLayerID]);
		for (var i in objLayer.group) {
			eval(objLayer.group[i].replace(/Div$/,'')).hide();
		}
		objLayer.show();
		//for NS, mouseover occurs before mouseout, 
		//so need to clear timeout from onmouseout.
		if (is.ns4) setTimeout('clearTimeout(timeoutID["'+strLayerID+'"])',10);
	}
}//showMenu

function hideMenu() {
	if (this.initialized) {
		var objLayer = this;
		var strLayerID = objLayer.id;
		if (is.ns4) timeoutID[strLayerID] = setTimeout(strLayerID.replace(/Div$/,'')+'.hide()', delay);
		else eval(strLayerID.replace(/Div$/,'')).hide();
	}
}//hideMenu

DynLayer.prototype.showMenu = showMenu;
DynLayer.prototype.hideMenu = hideMenu;