/**
	REQUIRED FILES: classParser.js
	DESCRIPTION:
		"Hot" area that toggles the display property of a table, div, etc.
		When mouse is within the hot area, the associated element is displayed and floats near the mouse.
		A floating element's style attribute must be set to display:none in the HTML page so that
		it is hidden when the page is loading.
	PARAM:
		sElementId - the id attribute of the floating element
		nInfoBoxWidth - (optional) defaults to 200px
	SYNTAX:
		new--HotSpot-sElementId-300
**/

/* ---------- CONFIGURE HERE ----------*/
	var HotSpot_offsetX = 15; // [integer] X distance (in pixel) from mouse
	var HotSpot_offsetY = 15; // [integer] Y distance (in pixel) from mouse


/* ---------- DO NOT EDIT BELOW THIS LINE ----------*/
/* CONSTRUCTOR FUNCTION */
	function HotSpot(sElementId, nInfoBoxWidth)
	{
		if (typeof(nInfoBoxWidth) == 'undefined')
			nInfoBoxWidth = 200;
		document.getElementById(sElementId).style.position = 'absolute';
		document.getElementById(sElementId).style.width = nInfoBoxWidth + 'px';
		this.onmousemove = function()
		{
			var nInnerWidth = 0;
			if (self.innerHeight)
				nInnerWidth = self.innerWidth;
			else if (document.documentElement && document.documentElement.clientHeight)
				nInnerWidth = document.documentElement.clientWidth;
			else if (document.body)
				nInnerWidth = document.body.clientWidth;
			
			with(document.getElementById(sElementId).style)
			{
				if ((parseInt(_xmouse) + parseInt(nInfoBoxWidth) + parseInt(HotSpot_offsetX)) < nInnerWidth)
					left = _xmouse + HotSpot_offsetX + 'px';
				else
					left = _xmouse - HotSpot_offsetX - nInfoBoxWidth + 'px';
				top = _ymouse + HotSpot_offsetY + 'px';
				display = 'block';				
			}
		}
		this.onmouseout = function()
		{
			document.getElementById(sElementId).style.display = 'none';
		}
	}
	
/* BEGIN MOUSE TRACKER */
	var _xmouse = 0; // GLOBAL VAR THAT HOLDS MOUSE X POSITION
	var _ymouse = 0; // GLOBAL VAR THAT HOLDS MOUSE Y POSITION
	document.onmousemove = function(e)
	{
		if (typeof(window.event) != 'undefined')
		{
			var scroll_left = 0;
			var scroll_top = 0;

			if (document.documentElement && document.documentElement.scrollLeft && document.documentElement.scrollLeft != 0)
				scroll_left = document.documentElement.scrollLeft;
			if (document.documentElement && document.documentElement.scrollTop && document.documentElement.scrollTop != 0)
				scroll_top = document.documentElement.scrollTop;

			if (document.body && document.body.scrollLeft && document.body.scrollLeft != 0)
				scroll_left = document.body.scrollLeft;
			if (document.body && document.body.scrollTop && document.body.scrollTop != 0)
				scroll_top = document.body.scrollTop;

			_xmouse = event.clientX + scroll_left;
			_ymouse = event.clientY + scroll_top;
		}
		else
		{
			_xmouse = e.pageX;
			_ymouse = e.pageY;
		}
	}
/* END MOUSE TRACKER */