// JavaScript Document

// Detect if the browser is IE or not.
// If it is not IE, we assume that the browser is NS.
//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 = getMouseXY;

// Temporary variables to hold mouse x-y pos.s
//var tempX = 0;
//var tempY = 0;

var IE = document.all?true:false;
if (!IE) document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = getMouseXY;
var tempX = 0;
var tempY = 0;

function getMouseXY(e) {
	if (IE) { // grab the x-y pos.s if browser is IE
		tempX = event.clientX + document.body.scrollLeft;
		tempY = event.clientY + document.body.scrollTop;
	}
	else {  // grab the x-y pos.s if browser is NS
		tempX = e.pageX;
		tempY = e.pageY;
	}  
	if (tempX < 0){tempX = 0;}
	if (tempY < 0){tempY = 0;}  
	return true;
}

function hiddenDIV(id, width, height, title, text) {

	// Properties for the hiddenDIV object
	this.obj = document.getElementById(id);
	this.objContent = document.getElementById(id+"_content");
	this.objTitle = document.getElementById(id+"_title");
	this.width = width + "px";
	this.height = height + "px";
	this.id = id;
	this.text = text;
	this.title = title;
	this.top = tempY - 50 + "px";
	this.left = (document.body.clientWidth/2) - parseInt(width) + (width/2) + "px";

	// Methods for the hiddenDIV object
	this.makeDIV = function () {
			this.obj.style.width = this.width;
			this.obj.style.height = this.height;
			this.objContent.innerHTML = this.text;
			this.objTitle.innerHTML = this.title;
			this.obj.style.top = this.top;
			this.obj.style.left = this.left;
		};
	this.hideDIV = function() { this.obj.style.visibility = "hidden"; };
	this.showDIV = function() { this.obj.style.visibility = "visible"; };

	// Constructor
	this.makeDIV();
	this.hideDIV();
}
	

