﻿function OnMouseOverAndOnMousemOut(obj, value) {
    if (value == 0) {
        obj.className = "menu_td_1";
    } if (value == 1) {
        obj.className = "menu_td";
    }
}

function proOnMouseOverAndOnMousemOut(obj, value) {
    if (value == 0) {
        obj.className = "pro_tdover";
    } if (value == 1) {
        obj.className = "pro_tdout";
    }
}

function OnMouseOverAndOnMousemOut2(id, value) {
    if (value == 0) {
        document.getElementById(id).className = 'menu_td_1';
    } if (value == 1) {
        document.getElementById(id).className = 'menu_td';
    }
}

function proOnMouseOverAndOnMousemOut2(id, value) {
    if (value == 0) {
        document.getElementById(id).className = "pro_tdover";
    } if (value == 1) {
        document.getElementById(id).className = "pro_tdout";
    }
}

function menuControl(show) {
    window.event.cancelBubble = true;
    var objID = event.srcElement.id;
    var index = objID.indexOf("_");
    var mainID = objID.substring(0, index);
    var numID = objID.substring(index + 1, objID.length);
    if (mainID == "menubar") {
        if (show == 1) {
            eval("showMenu(" + "menu_" + numID + ")");
        }
        else {
            eval("hideMenu(" + "menu_" + numID + ")");
        }
    }
}

var nbottom = 0, speed = 5;
function displayMenu(obj) {
    obj.style.clip = "rect(0 100% " + nbottom + "% 0)";
    nbottom += speed;
    if (nbottom <= 100) {
        timerID = setTimeout("displayMenu(" + obj.id + "),70");
    }
    else clearTimeout(timerID);
}
function showMenu(obj) {
    obj.style.display = "block";
    obj.style.clip = "rect(0 0 0 0)";
    nbottom = 5;
    displayMenu(obj);
}
function hideMenu(obj) {
    nbottom = 0;
    obj.style.display = "none";
}
function keepMenu(obj) {
    obj.style.display = "block";
}

function keepMenu2(obj)
{
	
}
