/* Hides or shows left & right sidebars as needed */



document.write('<style type="text/css">#index_right{display:none}</style>'); // Part 1 - To avoid flicker when hiding unused DIVs. 
document.write('<style type="text/css">#container_menu{display:none}</style>'); // Part 2 - To avoid flicker when hiding unused DIVs. 
document.write('<style type="text/css">#index_content{display:none}</style>'); // Part 3 - To avoid flicker when hiding unused DIVs. 



    $(document).ready(function() {
        //Put the contents of the div into a variable:
        var htmlStr = $("#index_right").html();   
         //Change the margins on #index_content if the variable test empty
          if (     htmlStr  ==""   ){
                $("#index_content").css("width","600px");
           }

//Hide empty sidebars 
        $("div:empty").remove();


// show the remaining divs without flickr. Header & footer are never hidden


        $('#index_right').css('display','block'); //Part 2 of avoiding the jquery flickr issue - display what was prev. hidden
        $('#container_menu').css('display','block'); //Part 2 of avoiding the jquery flickr issue - display what was prev. hidden
        $('#index_content').css('display','block'); //Part 2 of avoiding the jquery flickr issue - display what was prev. hidden


  });
