ttshowdelay = 250;
tthidedelay = 0;
ttpadx = 4;
ttpady = 12;

var mo, mo2;
canshow = false;
oldcontent = "";

if (!document.all) {
	document.captureEvents(Event.MOUSEMOVE|Event.MOUSEOUT|Event.MOUSEOVER);
	document.onmousemove = getmousepos;
}

function getmousepos(e) { 
	if (!e) e = window.event;
	if (e) {
		if (e.pageX || e.pageY) {
			mousex = e.pageX;
			mousey = e.pageY;
		} else if (e.clientX || e.clientY) {
			mousex = e.clientX + document.body.scrollLeft;
			mousey = e.clientY + document.body.scrollTop;
		}	
	}
	realx = mousex;
	realy = mousey;
}
function showtooltip(content) {
	if (mo2) window.clearTimeout(mo2);
	document.getElementById("tooltip").style.left = realx + ttpadx;
	document.getElementById("tooltip").style.top = realy + ttpady;
	if (content != oldcontent) {
		document.getElementById("tt_content").innerHTML = content;
		fixtt();
	}
	if (document.getElementById("tooltip").style.visibility=="hidden") document.getElementById("tooltip").style.visibility="visible";
	oldcontent = content;
}

function mytooltip(ct) {
	getmousepos();
	if (mo2) window.clearTimeout(mo2);
	if (canshow) {
		if (ttshowdelay > 0) {
			if (mo) window.clearTimeout(mo);
			mo = window.setTimeout("showtooltip('"+ct+"')",ttshowdelay);
		} else {
			showtooltip(ct);
		}
	}
}
function notooltip() {
	canshow = false;
	if (mo) window.clearTimeout(mo);
	mo2 = window.setTimeout("document.getElementById('tooltip').style.visibility='hidden'",tthidedelay);
}



function getRealLeft(el){
	xPos = document.getElementById(el).offsetLeft;
	tempEl = document.getElementById(el).offsetParent;
	while (tempEl != null) {
		xPos += tempEl.offsetLeft;
		tempEl = tempEl.offsetParent;
	}
	return xPos;
}

function getRealTop(el){
	yPos = document.getElementById(el).offsetTop;
	tempEl = document.getElementById(el).offsetParent;
	while (tempEl != null) {
		yPos += tempEl.offsetTop;
		tempEl = tempEl.offsetParent;
	}
	return yPos;
}

function getpos(isID){
	if (isID) {
		trueX = getRealLeft(isID);
		trueY = getRealTop(isID);
		return Array(trueX,trueY);
	}
	return false;
}

function fixtt() {
	document.getElementById("tt_top").style.width = 1;
	document.getElementById("tt_bottom").style.width = 1;
	document.getElementById("tt_left").style.height = 1;
	document.getElementById("tt_right").style.height = 1;

	try {
		c = document.getElementById("tt_content");
	}
	catch(e) {
		c = false;
	}
	if (c) {
		w = c.offsetWidth + 1;
		h = c.offsetHeight + 1;
		document.getElementById("tt_top").style.width = w;
		document.getElementById("tt_bottom").style.width = w;
		document.getElementById("tt_left").style.height = h;
		document.getElementById("tt_right").style.height = h;
	}
}


document.write('	<DIV ID="tooltip" STYLE="position:absolute;left:0;top:0;visibility:hidden;z-index:999;">');
document.write('		<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0>');
document.write('			<TR>');
document.write('				<TD><IMG CLASS="png" SRC="/_img/tt1.png" WIDTH=11 HEIGHT=12></TD>');
document.write('				<TD><IMG CLASS="png" SRC="/_img/tt2.png" WIDTH=11 HEIGHT=12 ID="tt_top"></TD>');
document.write('				<TD><IMG CLASS="png" SRC="/_img/tt3.png" WIDTH=9 HEIGHT=12></TD>');
document.write('			</TR>');
document.write('			<TR>');
document.write('				<TD><IMG CLASS="png" SRC="/_img/tt8.png" WIDTH=11 HEIGHT=13 ID="tt_left"></TD>');
document.write('				<TD ID="tt_content" BGCOLOR="#f8f8f8" STYLE="padding-right:4px">&nbsp;</TD>');
document.write('				<TD><IMG CLASS="png" SRC="/_img/tt4.png" WIDTH=9 HEIGHT=13 ID="tt_right"></TD>');
document.write('			</TR>');
document.write('			<TR>');
document.write('				<TD><IMG CLASS="png" SRC="/_img/tt7.png" WIDTH=11 HEIGHT=9></TD>');
document.write('				<TD><IMG CLASS="png" SRC="/_img/tt6.png" WIDTH=11 HEIGHT=9 ID="tt_bottom"></TD>');
document.write('				<TD><IMG CLASS="png" SRC="/_img/tt5.png" WIDTH=9 HEIGHT=9></TD>');
document.write('			</TR>');
document.write('		</TABLE>');
document.write('	</DIV>');
