function changeTab(id)
{
	document.getElementById("tab_content_0").style.display 	= "none";
	document.getElementById("tab_0").style.color 			= "#284b91";
	document.getElementById("tab_0").style.backgroundColor 	= "#e4f2fe";
	
	for(var i=0; i<position; i++) {
		document.getElementById("tab_content_" + show[i]).style.display = "none";
		document.getElementById("tab_" + show[i]).style.color 			= "#284b91";
		document.getElementById("tab_" + show[i]).style.backgroundColor = "#e4f2fe";
	}
	
	document.getElementById("tab_content_" + id).style.display 	= "block";
	document.getElementById("tab_" + id).style.color 			= "#ffffff";
	document.getElementById("tab_" + id).style.backgroundColor 	= "#284b91";
	currentPosition = id;
}

function mouseOutTab(id)
{
	if(currentPosition!=id)
	{
		document.getElementById("tab_" + id).style.color 			= "#284b91";
		document.getElementById("tab_" + id).style.backgroundColor 	= "#e4f2fe";
	}
}
	
function mouseOverTab(id)
{
	if(currentPosition!=id)
	{
		document.getElementById("tab_" + id).style.color 			= "#ffffff";
		document.getElementById("tab_" + id).style.backgroundColor 	= "#284b91";
	}
}


// pt tooltips
this.tooltip = function()
{	
	xOffset = 10;
	yOffset = 20;		
	$("div.tooltip").hover(function(e){											  
		this.t = this.title;
		this.title = "";									 
		$("body").append("<p id='tooltip'>"+ this.t +"</p>");
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		$("#tooltip").remove();
    });	
	$("div.tooltip").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")

			.css("left",(e.pageX + yOffset) + "px");
	});	
	
	$("a.tooltip").hover(function(e){											  
		this.t = this.title;
		this.title = "";									 
		$("body").append("<p id='tooltip'>"+ this.t +"</p>");
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		$("#tooltip").remove();
    });	
	$("a.tooltip").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")

			.css("left",(e.pageX + yOffset) + "px");
	});			
};
$(document).ready(function()
{
	tooltip();
});
// end tooltips

