// JScript source code

        //array of divs

        var aryDivs = new Array();
        aryDivs[0] = "tcontent1";
        aryDivs[1] = "tcontent2";
        aryDivs[2] = "tcontent3";

        //array of tabs

        var aryTabs = new Array();
        aryTabs[0] = "limited";
        aryTabs[1] = "hotel";
        aryTabs[2] = "dest";


        function switchDivAndClass(inTabId, inContentId){

            //SNIPPET - btnField.className

            

            var thisDiv = document.getElementById(inContentId);
            var thisTab = document.getElementById(inTabId);

            

            //-------------------------------------------------------------

            // SHOW ACTIVE DIV

            

            //hide any divs which are currently displaying

            for(i = 0; i < aryDivs.length; i++)
            {
                    if(document.getElementById(aryDivs[i]).style.display == "block")
                    {
                        document.getElementById(aryDivs[i]).style.display = "none";
                    }
            }

            

            //show active div

            if(thisDiv != null)
            {
                    thisDiv.style.display = "block";
            }

            

            //-------------------------------------------------------------

            // SHOW ACTIVE TAB

            

            //hide any tabs which are currently displaying

            for(i = 0; i < aryTabs.length; i++)
            {
                    if(document.getElementById(aryTabs[i]).style.backgroundPosition == "0px -39px")
                    {
                        document.getElementById(aryTabs[i]).style.backgroundPosition = "0px 0px";
                    }

            }

            

            //show active div

            if(thisTab != null)
            {
                    thisTab.style.backgroundPosition = "0px -39px";
            }
        }

        

