var lastelement="";
var uagent = navigator.userAgent;
var appver = navigator.appVersion.substring(0,1);

function showTip(ctrl, tiptext) {
	var tipdiv;
	

	if (uagent.indexOf("MSIE") != -1) {
		if (appver > 3) {
			// in IE all we need to do is set the "title" attribute
			ctrl.title = tiptext;	
		}
	} else {
		if ((uagent.indexOf("Mozilla") != -1) && (appver > 3)) {
			tipdiv = document.layers["tooltip"];

			// set the tooltip text
			tipdiv.document.open();
			tipdiv.document.write("<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=2 bordercolor=black><TR><TD BGCOLOR=FFFFCC>");
			tipdiv.document.write("<FONT FACE=Verdana, Arial, Helvetica SIZE=-2>");
			tipdiv.document.write(tiptext);
			tipdiv.document.write("</FONT>");
			tipdiv.document.write("</TD></TR></TABLE>");
			tipdiv.document.close();

			// set the tooltip location and show it
			tipdiv.top = ctrl.y + 20; 
			tipdiv.left = ctrl.x + 10;
			tipdiv.visibility = "show";
		}
	}
}

function hideTip() {
	if ((uagent.indexOf("MSIE") == -1) && (uagent.indexOf("Mozilla") 
!= -1) && (appver > 3)) {
		// only do this for NN4+
		document.layers["tooltip"].visibility = "hidden";
	}
}
