/******************************************************************************
 * Tool tips dhtml
 * name			: virtua-tooltips.js
 * version		: 1.0
 * date			: 03.10.2002
 * author		: Greg Dini <greg.dini@virtua.ch>
 * author		: Yannick Burky <yannick.burky@virtua.ch>
 * usage		: tool tips
 * package		: tool tips
 ******************************************************************************
 * edit
 *****************************************************************************/
 
/**
 * configuration
 **/
bordersize		= 0;	
borderstyle		= "dotted";
bordercolor		= "#000000";
fontsize		= "12px";
backgroundcolor = "#FFFFFF";
padding			= 1;
positionx		= 75;
positiony		= 146;
autowidth		= false;
layerwidth		= 181; // ignored if autowidth is true
autoheight		= true;
layerheight		= 100; // ignored if autoheight is true

/**
 * show tool tip
 * current		: object
 * num			: array index of desired text
 **/
function showtip(current,num)
	{
	if(tip!="undefined" && tip!=null) {
		if (document.layers) // Netscape 4.0+
			{
			theString = "<DIV CLASS='ttip'>"+tip[num]+"</DIV>";
			document.tooltip.document.write(theString);
			document.tooltip.document.close();
			if(!autowidth)
				document.tooltip.width	= layerwidth;
			if(!autoheight)
				document.tooltip.height = layerheight;
			document.tooltip.left			= event.pageX+positionx+4;
			document.tooltip.top			= event.pageY+positiony+2;
			document.tooltip.visibility		= "show";
			}
		else if(document.getElementById) // Netscape 6.0+ and Internet Explorer 5.0+
			{
			elm					= document.getElementById("tooltip");
			elml				= current;
			elm.innerHTML		= tip[num];
			if(!autowidth)
				elm.style.width	= layerwidth;
			if(!autoheight)
				elm.style.height = layerheight;
			else
				elm.style.height = elml.style.height;
			elm.style.top		= parseInt(elml.offsetTop+elml.offsetHeight+positiony);
			elm.style.left		= parseInt(elml.offsetLeft+elml.offsetWidth+positionx);
			elm.style.visibility = "visible";
			}
		else if(document.all) // Internet Explorer 4.0
			{
			elm					= document.all["tooltip"];
			elml				= current;
			elm.innerHTML		= tip[num];
			if(!autowidth)
				elm.style.width	= layerwidth;
			if(!autoheight)
				elm.style.height = layerheight;
			else
				elm.style.height = elml.style.height;
			elm.style.top		= parseInt(elml.offsetTop+elml.offsetHeight+positiony);
			elm.style.left		= parseInt(elml.offsetLeft+elml.offsetWidth+positionx);
			elm.style.visibility = "visible";
			}
		}
	}

/**
 * hide tool tip
 **/
function hidetip()
	{
	if(tip!="undefined" && tip!=null) {
		if (document.layers) // Netscape 4.0+
			document.tooltip.visibility	= "hidden";
		else if(document.getElementById) // Netscape 6.0+ and Internet Explorer 5.0+
			elm.style.visibility = "hidden";
		else if(document.all) // Internet Explorer 4.0
			elm.style.visibility = "hidden";
		}
	}

// write DIV
//document.write('<div id="tooltip" style="position:absolute;visibility:hidden;z-index:99;border:'+bordersize+'px '+borderstyle+' '+bordercolor+';font-family: Arial, Helvetica, sans-serif; font-size: 11px;color: #1a1b87;layer-background-color:'+backgroundcolor+';background-color:'+backgroundcolor+';padding:'+padding+'px"></div>');

// write STYLE
/*  This is for Netscape 4.0+ broswsers so that the border will display.  If you want to modify the background color this is where you would do it for NS4.0+.  To modify the color for IE and NS6 do so in the style tag in the div below */
document.write('<STYLE>.ttip {border:'+bordersize+'px '+borderstyle+' '+bordercolor+';font-size:'+fontsize+';layer-background-color:'+backgroundcolor+';background-color:'+backgroundcolor+'}</STYLE>');

/* Exemple of use :
	this part must be placed into html page in a script-tag
	
	var tip = new Array;
	tip[0] = "Visit Dynamic Drive<br> for DHTML Scripts!";
	tip[1] = "Visit JavaScript Kit for Great<br> Scripts, Tutorials and Forums!";
	tip[2] = "Visit Request Code for FREE JavaScripts!";
	tip[3] = "Click here for some excellent<br>Java applets and tutorials";

   Exemple of link use :
   
   <a href="http://www.htmlgoodies.com" onMouseover="showtip(this,3)" onMouseOut="hidetip()">Freewarejava</a>
*/


