var maxLev = 10, arrPila = Array(maxLev);
var intTimeoutShowID = 0, intTimeoutHideID = 0, intLapsoBuffer = 200, intLapsoOcult = 3000;
for(i = 0;i < maxLev;i++) arrPila[i] = 0;

function fnBuffer(){
	if(intTimeoutShowID) window.clearTimeout(intTimeoutShowID);
	var id = parseInt(arguments[0]), nivel = parseInt(arguments[1]);
	intTimeoutShowID = window.setTimeout("fnShowHideLy(" + id + "," + nivel + ");", intLapsoBuffer); }

function fnShowHideLy(){
	var id = arguments[0], i, nivel = arguments[1];
	if(isNaN(parseInt(nivel))) nivel = 0 ;
	for(i = nivel;i < maxLev;i++){
		if(arrPila[i]){
			var objLy = document.getElementById("Ly" + arrPila[i]);
			if(objLy.style.visibility != "hidden") objLy.style.visibility = "hidden"; } }
	arrPila[nivel] = id;
	if(arrPila[nivel]){
		var objLy = document.getElementById("Ly" + arrPila[nivel]);
		if(objLy.style.visibility != "visible") objLy.style.visibility = "visible"; }
	for(i = nivel + 1;i < maxLev;i++) arrPila[i] = 0; }
	
function fnOverMn(){
	fnCancelOcult();
	fnRoll(arguments[0], "#E7E7E7"); }

function fnOutMn(){
	fnOcult();
	fnRoll(arguments[0], "#D8D8D8"); }
	
function fnOcult(){
	intTimeoutHideID = window.setTimeout("fnShowHideLy(0, 0);", intLapsoOcult); }

function fnCancelOcult(){
	if(intTimeoutHideID) window.clearTimeout(intTimeoutHideID);	}

function fnRoll(){
	var objTDTemp = arguments[0], strColor = arguments[1], strTempID = new String(objTDTemp.id), strID, objTD;
	var objRE = new RegExp("lbl|sub"), strID = strTempID.replace(objRE, "");
	try {
		objTD = document.getElementById("lbl" + strID);
		objTD.style.backgroundColor = strColor;
		objTD = document.getElementById("sub" + strID);
		objTD.style.backgroundColor = strColor;} 
	catch(err) {} }

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];} } }