//Script created by Jim Young (www.requestcode.com)
//Submitted to JavaScript Kit (http://javascriptkit.com)
//Visit http://javascriptkit.com for this script

//Set the tool tip message you want for each link here.
           
	 function showtip(current,e,title, content, reverse, showclose)
			{
			 if (document.layers) // Netscape 4.0+
					{
					 theString="<div>"+getToolTipTable(content, title)+"</div>"
					 document.tooltip.document.write(theString)
					 document.tooltip.document.close()
					 document.tooltip.left=e.pageX+14
					 document.tooltip.top=e.pageY+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=getToolTipTable(content, title, showclose);
						 elm.style.height=elml.style.height;
						 elm.style.top=parseInt(findPosY(elml)-20) + 'px';
						 elm.style.left=parseInt(findPosX(elml)+170) + 'px';
						 if(reverse==1)	{
							 elm.style.left=parseInt(findPosX(elml)-300) + 'px';
						 }
						 elm.style.visibility = "visible"
						}
				 }
			}

	function hidetip(){
	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"
			 }
		} 
	}

	function getToolTipTable (content, title ,showclose)	{
		var closebox;
		if(showclose==1)	{
			closebox='<a href="#" onclick="hidetip();"><img src="images/search_x.gif" border="0" alt=""></a>&nbsp;';
		}
		else	{ closebox='';}
		tip_table= '<div style="border:solid 1px black;width:280px;"><div class="tiptitle"><div style="padding:3px;">'+ closebox + title +'</div></div>'+
							 '<div class="tipcontent"><div style="padding:3px;">'+ content +'</div></div></div>';

		return tip_table;

	}

function findPosX(obj)
{
	var curleft = 0;
	if (document.getElementById || document.all)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (document.layers)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj)
{
	var curtop = 0;
	if (document.getElementById || document.all)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (document.layers)
		curtop += obj.y;
	return curtop;
}


