    <?php
/*
 * PIMPED APACHE-STATUS
 * 
 * view: ORIGINAL server-status
 */


$content='
    
    <script>
        function showwebserver(id){
            divWebserver=\'.h2 \';
            $(divWebserver + \' > h3\').hide();
            $(divWebserver + \' > .h3\').hide();
            $(divWebserver + \' > \'+id).show(); 
            $(divWebserver + \' > \'+id+\' + div.h3\').show(); 
            return false;
        }
    </script>    
';
$sJsOnReady.='
	// On Click Event
	$(".h2 ul.tabs li").click(function() {

		// $("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this.parentNode).find("li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
                /*
		$(".tab_content").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active ID content
                */
		return false;
	});    
        
        // activate first tab
        $(".h2 div ul.tabs li a").filter(":first").trigger("click");
        
';

$sMenuServer='';
if (count($aSrvStatus)>1){
    foreach ($aSrvStatus as $sHost=>$aData){
        $sMenuServer.='<li><a href="#" onclick="return showwebserver(\'#h3'.md5($sHost).'\');">'.$sHost.'</a></li>';
    }
    $content.='<div><ul class="tabs">'.$sMenuServer.'</ul></div><div style="clear: both"></div>';
}
foreach($aSrvStatus as $sServer=>$aData){
    $content.='<h3 id="h3'.md5($sServer).'">'.$sServer.'</h3><div class="h3">'.
        ''.$aData['orig'].'
        </div>';
}

echo $content;

?>