﻿
/*

* Custom Tab Navigation Menu
* Developer: William Diaz
* Date: 09/14/2009

*/

function DeployTabContent(tabid, tab)
    {


        try {

            var i
            var control, controlelement;
            var title;
            this.tabs = document.getElementById('controltabs').getElementsByTagName("a") //Get all tab links within container


            for (var i = 0; i < this.tabs.length; i++) {
                document.getElementById(this.tabs[i].getAttribute("rel")).style.display = 'none';
                this.tabs[i].className = "tabs-nav";
            }


            //Display the tab content and set the tab to selected
            document.getElementById(tabid).style.display = 'inline';

            if (isNaN(tab)) {
                tab.className = "tabs-selected";
            }
            else {
                //Set the class name to the tab selected
                this.tabs[tab - 1].className = "tabs-selected";
            }

        }
        catch (err) {
            //Handle errors here
        }
        
    }


   
    function showMSG() {
        alert('message-test');
    }