
function home_showHomePage()
 { 
      var action_file_path = "home/index.php";
       var actioncmd = "";

       var url = action_file_path+actioncmd;
       url=url+"&sid="+Math.random();
                  
       //get the content to display using ajax
        $.ajax({
            method: "get",url:url,
            beforeSend: function()
            {
             showSpinner('div_main_content_area');
            },
            complete: function()
            {
            }, 
            success: function(html)
            { //alert(html);
            $("#div_main_content_area").html(html);
            }
     }); //close $.ajax()
 }//home_showHomePage()






 function home_initTabber(div_name)
 {

    /* Optional: Temporarily hide the "tabber" class so it does not "flash"
       on the page as plain HTML. After tabber runs, the class is changed
       to "tabberlive" and it will appear. */
    //   document.write('<style type="text/css">.'+div_name+'{display:none;}<\/style>');

    /*==================================================
      Set the tabber options (must do this before including tabber.js)
      ==================================================*/
    var tabberOptions =
        {

      'onLoad': function(argsObj)
      {
        var t = argsObj.tabber;
        var i;
        
        //show the cookied tab
        t.tabShow(i);
        
        //load content - in case there is no content showing
        //in the tab
        home_showModuleTabContent(i,t.tabs[i].headingText);

      },
  /* Optional: code to run when the user clicks a tab. If this
     function returns boolean false then the tab will not be changed
     (the click is canceled). If you do not return a value or return
     something that is not boolean false, */
      'onClick':function(argsObj)
      {
       // var c = argsObj.tabber.cookie;
        var i = argsObj.index; /* Which tab was clicked (0 is the first tab) */

        var t = argsObj.tabber; /* Tabber object */
        var id = t.id; /* ID of the main tabber DIV */

        if (id == 'tabber_home')
        {
           home_showModuleTabContent(i,t.tabs[i].headingText);
         // return confirm('Switch to '+t.tabs[i].headingText+'?\nEvent type: '+e.type);
        }

      },
  /* Optional: set an ID for each tab navigation link */
  'addLinkId': true

    };



    /* Since we specified manualStartup=true, tabber will not run after
       the onload event. Instead let's run it now, to prevent any delay
       while images load.
    */
    tabberAutomatic(tabberOptions);

 }//home_initTabber()



 //this function loads and shows homepage tab content for a particular module
 //given the module navigation name
    //IMPORTANT NOTE : WHEN YOU CHANGE THE ORDER OF MODULES
    //ON THIS FUNCTION, MAKE SURE YOU CHANGE THE ORDER
    //IN THE JAVASCRIPT CODE IN  showHomePage()
    //FOUND IN home/classes/home_ui.php!!!!!!
 function home_showModuleTabContent(tab_num,module_nav_name)
 {//alert("for tab num "+tab_num);
       var action_file_path = "home/index.php";
       var actioncmd = "?show_module_tab_content_request=1"+
           "&&module_nav_name="+module_nav_name;

       var url = action_file_path+actioncmd;
       url=url+"&sid="+Math.random();
       
       var div_module_tab_content_id;

       switch(tab_num)
       {
           case 0:
               {
                div_module_tab_content_id  = "div_tour_module_tab_content_id";
                break;
               }

           case 1:
               {
                div_module_tab_content_id  =
                    "div_project_module_tab_content_id";
                break;
               }

           case 2:
               {
                div_module_tab_content_id  =
                    "div_accomodation_module_tab_content_id";
                break;
               }

           case 3:
               {
                div_module_tab_content_id  =
                    "div_car_module_tab_content_id";
                break;
               }
       }

      var content_length =($("#"+div_module_tab_content_id).html()).length;
       //alert(content_length);
      //alert($("#"+div_module_tab_content_id).html());
      //when the above divs were created, we cleared them of any content
      //except the one which is loaded when the tabber is loaded
      //so that here we can accurately check if a tab is not already loaded
      if(content_length!=0)
          {
              return;
          }

       //get the content to display using ajax
       $.ajax(
       {
            method: "get",
            url:url,
            beforeSend: function()
            {
              showSpinner(div_module_tab_content_id);
           //  $("#"+div_module_tab_content_id).
             //    html("Please wait... ");
            },
            complete: function()
            {
            },
            success: function(module_tab_content)
            {//alert(module_tab_content);
              $("#"+div_module_tab_content_id).html(module_tab_content);
            }
       }); //close $.ajax()

       
 }//showModuleTabContent()



