// Main background color (the large area)
	if (typeof fcolor == 'undefined') { var fcolor = "#c4ccbe";}
	
// Border color and color of caption
	if (typeof backcolor == 'undefined') { var backcolor = "#c4ccbe";}
	
// Text color
	if (typeof textcolor == 'undefined') { var textcolor = "#c4ccbe";}
	
// Color of the caption text
	if (typeof capcolor == 'undefined') { var capcolor = "#c4ccbe";}
	
// Color of "Close" when using Sticky
	if (typeof closecolor == 'undefined') { var closecolor = "#FFFFFF";}
	
// Width of the popups in pixels
	if (typeof width == 'undefined') { var width = "0";}
	
// How thick the border should be in pixels
	if (typeof border == 'undefined') { var border = "5";}
	
// How many pixels to the right/left of the cursor to show the popup
	if (typeof offsetx == 'undefined') { var offsetx = 200;}
	
// How many pixels to the below the cursor to show the popup
	if (typeof offsety == 'undefined') { var offsety = -350;}

function setleft() {
	offsetx = 40;
	}
function setright() {
	offsetx = -0;
	}

var x = 0;
var y = 0;
var snow = 0;
var sw = 0;
var cnt = 0;
var dir = 1;
var tr = 1;
var over = 1;

var IE = document.all?true:false
// If NS -- that is, !IE -- then set up for mouse capture
if (!IE) document.captureEvents(Event.MOUSEMOVE)
// Set-up to use getMouseXY function onMouseMove
document.onmousemove = mouseMove;
// Temporary variables to hold mouse x-y pos.s
var tempX = 0
var tempY = 0

function overinit() {
	over = overDiv.style;
}

// Caption popup right
function drc(text, title) {
	dtc(1,text,title);
}


// Caption popup
function dtc(d,text, title) {
	txt = "<TABLE WIDTH="+width+" BORDER=0 CELLPADDING="+border+" CELLSPACING=0 BGCOLOR=\""+backcolor+"\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=1 CELLSPACING=0 BGCOLOR=\""+fcolor+"\"><TR><TD><SPAN ID=\"PST\"><b><FONT FACE=\"Verdana,Arial,Helvetica\" COLOR=\""+textcolor+"\" SIZE=\"1\">"+text+"</FONT><SPAN></TD></TR></TABLE></TD></TR></TABLE>";
	layerWrite(txt);
	dir = d;
	disp();
}

// Common calls
function disp() {
		if (snow == 0) 	{
			if (dir == 2) { // Center
				moveTo(over,x+offsetx-(width/2),y+offsety);
			}
			if (dir == 1) { // Right
				moveTo(over,x+offsetx,y+offsety);
			}
			if (dir == 0) { // Left
				moveTo(over,x-offsetx-width,y+offsety);
			}
			showObject(over);
			snow = 1;
		}
}
	
function layerWrite(txt) {
	document.getElementById('overDiv').innerHTML = txt;
		if (tr) { trk(); }
}

function mouseMove(e) {
	var posx = 0;
	var posy = 0;
	if (!e) var e = window.event;
	if (e.pageX || e.pageY) 	{
		posx = e.pageX;
		posy = e.pageY;
	}
	else if (e.clientX || e.clientY) 	{
		posx = e.clientX + document.body.scrollLeft
			+ document.documentElement.scrollLeft;
		posy = e.clientY + document.body.scrollTop
			+ document.documentElement.scrollTop;
	}

//	document.getElementById('overDiv').innerHTML = posy;

	if (snow) {
		if (dir == 2) { // Center
			moveTo(over,posx+offsetx,posy+offsety);
		}
		if (dir == 1) { // Right
			moveTo(over,posx+offsetx,posy+offsety);
		}
		if (dir == 0) { // Left
			moveTo(over,posx+offsetx,posy+offsety);
		}
	}
}

function nd() {
	if ( cnt >= 1 ) { sw = 0 };
		if ( sw == 0 ) {
			snow = 0;
			hideObject(over);
		} else {
			cnt++;
		}
}

function trk() {
	tr = 0;
}

function showObject(obj) {
        document.getElementById('overDiv').style.visibility = "visible"
}

function hideObject(obj) {
       document.getElementById('overDiv').style.visibility = "hidden"
}

function moveTo(obj,xL,yL) {
		document.getElementById('overDiv').style.left = xL + 'px';
		document.getElementById('overDiv').style.top = yL + 'px';
//        obj.left = xL
//        obj.top = yL
}