function offTimer() {
        if (document.timer) {
                window.clearTimeout(document.timer);
                document.timer = null;
        }
}

function show(obj) {
        document.getElementById('sub' + obj).style.display = 'block';
//        document.getElementById('item' + def).className = 'btn';
//        document.getElementById('item' + obj).className = 'btn2';
}

function hide() {
        if (document.vis_l3) {
                        document.getElementById(document.vis_l3).style.display = 'none';
                        document.vis_l3 = null;
                };
        document.getElementById('sub' + document.vis).style.display = 'none';
//        document.getElementById('item' + document.vis).className = 'btn';
//        document.getElementById('item' + def).className = 'btn2';
}
function on(obj) {
        offTimer();
        if (document.vis) {
                hide();
        }
        show(obj);
}

function off(obj) {
        document.vis = obj;
        document.timer = window.setTimeout('hide()', 300);
}

function preload(obj) {
        new Image().src = obj;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
};
