﻿function turnhomeicon(state) {
    document.getElementById('homeicon1').src = 'App_Themes/0/i/h/home_panel_button1' + state + '.gif';
    document.getElementById('homeicon2').src = 'App_Themes/0/i/h/home_panel_button2' + state + '.gif';
}

function turntab(e, bz, gourl) {
    if (gourl) {
        
    }

    if (window._mbc_home_tab) {
        window._mbc_home_tab.style.display = 'none';
    } else {
        document.getElementById('tab0').style.display = 'none';
    }
    
    if (window._mbc_home_tabhead) {
        if (window._mbc_home_tabhead.e == 'tab0') {
            turnhomeicon('b');
        } else {
            document.getElementById(window._mbc_home_tabhead.e + 'h').className = 'tab' + window._mbc_home_tabhead.bz + '_0';
        }
    } else {
        turnhomeicon('b');
    }

    var tab = document.getElementById(e);
    tab.style.display = 'block';
    window._mbc_home_tab = tab;
    
    if (e == 'tab0') {
        turnhomeicon('');
    } else {
        document.getElementById(e + 'h').className = 'tab' + bz + '_1';
        //s.className = 'tab' + bz + '_1';
    }
    window._mbc_home_tabhead = { e:e, bz:bz };
}