var menu_array = new Array('menu_2', 'menu_24', 'menu_30');var t = null;

function newBg(idCell) {
eval('document.all.'+idCell+'.style.background = "#96b7d7"');
eval('document.getElementById("' + idCell + '").background = "#96b7d7"');
}
function backBg(idCell) {
eval('document.all.'+idCell+'.style.background = "#c7dbec"');
eval('document.getElementById("' + idCell + '").style.background = "#c7dbec"');
}

function newBg2(idCell) {
eval('document.all.'+idCell+'.style.background = "#f3bf7f"');
eval('document.getElementById("' + idCell + '").background = "#f3bf7f"');
}
function backBg2(idCell) {
eval('document.all.'+idCell+'.style.background = "#f3dbc6"');
eval('document.getElementById("' + idCell + '").style.background = "#f3dbc6"');
}


function getRealLeft(el) {
    xPos = el.offsetLeft;
    tempEl = el.offsetParent;
    while (tempEl != null) {
        xPos += tempEl.offsetLeft;
        tempEl = tempEl.offsetParent;
    }
    return xPos;
}

function getRealTop(el) {
    yPos = el.offsetTop;
    tempEl = el.offsetParent;
    while (tempEl != null) {
        yPos += tempEl.offsetTop;
        tempEl = tempEl.offsetParent;
    }
    return yPos;
}

function displayAbsPos(id) {
var el = document.all ? document.all(id) :
document.getElementById ? document.getElementById(id) : null;
if (el) {
var trueX = getRealLeft(el);
}
return trueX
}


	function simple_hide (id_name) {
		t = setTimeout("document.all['" + id_name + "'].style.visibility = 'hidden'", 1000);
	}

	function show_one (id_name, table_name) {
		var x = displayAbsPos(table_name);
		x = x - 1;
		eval("document.all['" + id_name + "'].style.left = " + x + "");
		eval("document.all['" + id_name + "'].style.visibility = 'visible'");
		clearTimeout(t);
	}

	function show_menu (id_name, table_name) {
	  var x = displayAbsPos(table_name);
	  x = x - 1;
	  clearTimeout(t);
		for (i = 0; i< menu_array.length; i++) {
			if (menu_array[i] == id_name) {
				eval("document.all['" + id_name + "'].style.left = " + x + "");
				eval("document.all['" + id_name + "'].style.visibility = 'visible'");
			}
			else {
				eval("document.all['" + menu_array[i] + "'].style.visibility = 'hidden'");
			}
		}
	}

	function hide_menu (id_name) {
//		eval("document.all['" + id_name + "'].style.visibility = 'hidden'");
		if (document.all[id_name].style.visibility == 'visible') {
			//document.write(id_name);
			t = setTimeout("document.all['" + id_name + "'].style.visibility = 'hidden'", 1000);
		}
	}

	function hideAll () {
		for (i = 0; i< menu_array.length; i++) {
				eval("document.all['" + menu_array[i] + "'].style.visibility = 'hidden'");
		}
	}
