function showTab(tabName, num)
{
    var tabControl = document.getElementById(tabName);
    if (tabControl == null)
        return;
    var indexControl = document.getElementById(tabName + "_activeTab");
    if (indexControl == null)
        return;
    var index = parseInt(indexControl.value);
    if (index >= 0 && index != num)
    {
        var control = document.getElementById(tabName + "Div_" + index);
        var tab = document.getElementById(tabName + "Tab_" + index);
        if (control != null)
            control.style.display = "none";
        if (tab != null)
            tab.className = tabControl.getAttribute("inactiveClass");

        control = document.getElementById(tabName + "Div_" + num);
        tab = document.getElementById(tabName + "Tab_" + num);
        if (control != null)
            control.style.display = "block";
        if (tab != null)
            tab.className = tabControl.getAttribute("activeClass");
            
        indexControl.value = num;
        
        if (V8HasAttribute(tabControl, "isPostBack") && tabControl.getAttribute("isPostBack") == "true")
            __doPostBack(tabName, "");
        return true;
    }
}

