// Jquery Functions


var pageUrl = new Array(); 
pageUrl[1] = "index.php?id=2"; 
pageUrl[2] = "index.php?id=4"; 
pageUrl[3] = "index.php?id=5"; 
pageUrl[4] = "index.php?id=6";         
pageUrl[5] = "index.php?id=2";         
pageUrl[6] = "index.php?id=8";         
pageUrl[7] = "index.php?id=9";         
 
function loadTab(id) 
{ 
	if (pageUrl[id].length > 0) 
    { 
		jQuery.get(pageUrl[id],{sid: Math.random()},function(data){
			
			 	$("#tabcontent").css("display", "none"); 
	        	$("#tabcontent").empty().append(data); 
	        	$("#tabcontent").fadeIn("slow");
		});
    } 
 

}
$(document).ready(function() 
{  
	$("#menu a").click(function(){ $("#menu a").removeClass("selected"); $(this).addClass("selected"); }); 
    $("#tab1").click(function(){ loadTab(1); }); 
    $("#tab2").click(function(){ loadTab(2); }); 
    $("#tab3").click(function(){ loadTab(3); }); 
    $("#tab4").click(function(){ loadTab(4); }); 
    $("#tab5").click(function(){ loadTab(5); }); 
    $("#tab6").click(function(){ loadTab(6); }); 
    $("#tab7").click(function(){ loadTab(7); }); 
   
  
});



function getAvailWidth(){
	var theWidth;
	if (window.innerWidth) {
		theWidth=window.innerWidth;
	}
	else if (document.documentElement && document.documentElement.clientWidth) {
		theWidth=document.documentElement.clientWidth;
	}
	else if (document.body) {
		theWidth=document.body.clientWidth;
	}
	return theWidth;
}