   function init(){
        var tabs = Array();
        tabs[0] = 'fragments/Clubs.html';
        tabs[1] = 'fragments/Camps.html';
        tabs[2] = 'fragments/Birthdays.html';
        tabs[3] = 'fragments/FieldTrips.html';
        tabs[4] = 'fragments/FamilyNight.html';
        tabs[5] = 'fragments/Assemblies.html';
        tabs[6] = 'fragments/watch.html';   
       
       var startTab = gup('tab');
       if(startTab == "")
           startTab = 0;

	   changeTab(startTab, tabs[startTab]);       
   }
   
   function gup( name ){  
       name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");  
       var regexS = "[\\?&]"+name+"=([^&#]*)";  
       var regex = new RegExp( regexS );  
       var results = regex.exec( window.location.href );  
       if( results == null )    
           return "";  
       else    
           return results[1];
   }
   
   function changeTab(tabNumber,programLink){
       for(i = 0; i < 7; i++){
           var tab = document.getElementById('tab[' + i + ']');
           if(i == tabNumber){
               tab.className = 'tabselected';
               new Ajax.Request('/' + programLink ,   
               {     method:'get',
                onSuccess: function(transport){       
                    var response = transport.responseText;       
                    var contentCell = document.getElementById('content');
                    contentCell.innerHTML = response;
                         
                    }     
                }        
               );
           }else{
               tab.className = 'tab';
           }
       }
   }
   
   function highlight(tabNumber){
       var tab = document.getElementById('tab[' + tabNumber + ']');
       if(tab.className != 'tabselected')
           tab.className = 'tabhighlighted';        
   }
   
   function unhighlight(tabNumber){
       var tab = document.getElementById('tab[' + tabNumber + ']');
       if(tab.className != 'tabselected')
           tab.className = 'tab';
   }