<!--
// Usage:
// <DIV id=popUP style="POSITION: absolute; Z-INDEX: 1"></DIV>
// <SCRIPT LANGUAGE=JavaScript SRC=popup.js TYPE="text/javascript"></SCRIPT>
// <IMG SRC=# onmouseover="popup(WIDTH,X,Y,'CONTENT');return true;" onmouseout="hide();return true;">

var x=0;var xx=0;
var y=0;var yy=0;
var show=0;

ns = (document.layers)? true:false
ie4 = (document.all)? true:false
ie5 = false;

if (ie4) {if (navigator.userAgent.indexOf('MSIE 5')>0) {ie5 = true;}}
if (navigator.platform.substring(0,3).toUpperCase() == "MAC" && (ie4 || ie5) ) {mac = true;} else {mac = false;}

if ( (ns) || (ie4) ) {
    	if (ns) over = document.popUP;
    	if (ie4) over = popUP.style;
    	document.onmousemove = mouseMove;
    	if (ns) document.captureEvents(Event.MOUSEMOVE);
}

function shownow(obj) {if (ns) {obj.visibility = "show";} else if (ie4) {obj.visibility = "visible";}}
function hidenow(obj) {if (ns) {obj.visibility = "hide";} else if (ie4) {obj.visibility = "hidden";}}

function moveTo(obj,lx,ly) {obj.left = lx;obj.top = ly;}

function hide() {
	if (mac) {return;}
	if ( (ns) || (ie4) )  {show = 0;hidenow(over);}
}

function popup(width,xin,yin,text) {
	if (mac) {return;}
	xx=xin;
	yy=yin;
	txt = "<TABLE WIDTH="+width+" BORDER=0 CELLPADDING=1 CELLSPACING=0 BGCOLOR=#333399><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 BGCOLOR=#FFFFCC CELLSPACING=0><TR><TD VALIGN=TOP><FONT FACE=\"Verdana,Arial,Helvetica\" COLOR=#000000 SIZE=1>"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>"
	if (ns) {var lll = document.popUP.document;lll.write(txt);lll.close();}
	else {if (ie4) {document.all["popUP"].innerHTML = txt;}}
	if ( (ns) || (ie4) ) {if (show == 0) {moveTo(over,xx,yy);shownow(over);show = 1;}}
}

function mouseMove(e) {
	if (ns) {x=e.pageX; y=e.pageY;}
	if (ie4) {x=event.x; y=event.y;}
	if (ie5) {x=event.x+document.body.scrollLeft; y=event.y+document.body.scrollTop;}
	if (show) {moveTo(over,x+xx,y+yy);}
}
//-->
