﻿   function setActiveTab(tabContainerObj)    
    {
    
         //  get all of the tabs from the container
        var tabs = tabContainerObj.get_tabs();
    
        //  loop through each of the tabs and attach a handler to
        //  the tab header's mouseover event
        for(var i = 0; i < tabs.length; i++)
        {
            var tab = tabs[i];            
            $addHandler(tab.get_headerTab(), 'mouseover', Function.createDelegate(tab, function(){tabContainerObj.set_activeTab(this);}));
        }       
        
    }    
   
   
    //Gets the master page javascript pageload event & then adds on the default page load event (without overriding it)
    function addLoadEvent(func)
    {   
        var oldonload = window.onload;   
        if (typeof window.onload != 'function')
        {   
            window.onload = func;
        }
        else
        {
            window.onload = function()
            {
                if (oldonload)
                    {oldonload();}   
                func();
            }
        }   
    } //end of addLoadEvent   

        
