//http://www.hotscripts.com/

var itemWidth=220;var offsetfrommouse=[15,15];var displayduration=0;var currentimageheight=100;

function gettooltipobj()
{
	if(document.getElementById)
		return document.getElementById("tooltipimageid").style
	else if(document.all)
		return document.all.tooltipimagid.style
}
function gettooltipobjnostyle()
{
	if(document.getElementById)
		return document.getElementById("tooltipimageid")
	else if(document.all)
		return document.all.tooltipimagid
}



function showtooltip(img,txt)
{
	image='<img src="/fx/'+img+'.jpg" border="0" style="float:left; margin:4px; padding:3px; margin-left:0px; padding-left:0px; ">';
	document.onmousemove=followmouse;
	newHTML='<div style="position:relative; overflow:hidden; border: 2px solid #d8e3e7; background-color: #f8f8f8; width: '+itemWidth+'px; height: 75px; font-size:9px; padding:3px; margin:3px; text-align:justify; font-family:sans-serif;" align="center">'+image+txt+'...</div>';
	gettooltipobjnostyle().innerHTML=newHTML;
	gettooltipobj().visibility="visible";
}
	
function hidetooltip()
{
	gettooltipobj().visibility="hidden"
	document.onmousemove=""
	gettooltipobj().left="-500px"
}

function truebody()
{
	return(!window.opera&&document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body
}

function followmouse(e)
{
	var xcoord=offsetfrommouse[0]
	var ycoord=offsetfrommouse[1]
	var docwidth=document.all?truebody().scrollLeft+truebody().clientWidth-25:pageXOffset+window.innerWidth-25
	var docheight=document.all?Math.min(truebody().scrollHeight,truebody().clientHeight):Math.min(document.body.offsetHeight,window.innerHeight)
	if(typeof e!="undefined")
	{xcoord+=e.pageX;if((docheight-e.pageY)<(currentimageheight+20))
	ycoord+=e.pageY-Math.max(0,(20+currentimageheight+e.pageY-docheight-truebody().scrollTop));else
	ycoord+=e.pageY;}
	else if(typeof window.event!="undefined")
	{xcoord+=truebody().scrollLeft+event.clientX
	if(docheight-event.clientY<(currentimageheight+20))
	ycoord+=event.clientY+truebody().scrollTop-Math.max(0,(20+currentimageheight+event.clientY-docheight));else
	ycoord+=truebody().scrollTop+event.clientY;}
	if(xcoord+220>docwidth)
	xcoord=xcoord-itemWidth-25;gettooltipobj().left=xcoord+"px"
	gettooltipobj().top=ycoord+"px"
}
