//********************************************************************************************//' TSMouseOverHelp.js//' This Script Library is the intellectual property of Teamwork Solutions, Inc.//' Permission to use is granted AS-IS for use in applications provided this //' disclaimer remains in place.////' For information on licensing or updates of this JavaScript Library, please contact://'//'          Scott Good or Steve Branam//'          Teamwork Solutions, Inc.//'          1880 MacKenzie Drive//'          Suite 201//'          Columbus, OH  43220//'//'          614-457-7100//'          614-457-8200 (fax)//'		   http://www.teamsol.com//'//' Copyright 1992-2006 Teamwork Solutions, Inc.//' All rights reserved worldwide.//********************************************************************************************/////////////////////////////////////////////////////////////////////////////////// tsMouseOverHelp function and class definition// This library may be freely used and modified as // long as these comments at or near the top remain// http://www.henrynewberry.com/////////////////////////////////////////////////////////////////////////////////var tsmoObjects = new Array()			// Holds all the objects for this page//this is the function that is called from the HTML where teh mouseover label is to be placed.// Paremters are:// 	label = The text that appears on the page//	content = the popup message that appears (may include HTML tags)//	poHeight = OPTIONAL - Height of the popup frame - defaults to fit to content//	poWidth = OPTIONAL - Width of the popup frame - defaults to fit to content//	poClass = OPTIONAL Class used with the popup frame - defaults to tsMouseOverHelp// 	moClass = OPTIONAL Class used with the mouseover link - defaults to tsMouseOverLink.function tsMouseOverHelp(label, content, poHeigth, poWidth, poClass, moClass) {		idx = tsmoObjects.length;		var lh = (poHeigth) ? poHeigth : 0;	var lw = (poWidth) ? poWidth : 0;	var poc = (poClass) ? poClass : "tsMouseOverHelp"	var moc = (moClass) ? moClass : "tsMouseOverLink"	var sname = "tsmoHelpSpan_" + idx	tsmoObjects[idx] = new tsmoHelp(label, content, lh, lw, poc, moc, idx, sname);		var outHtml = ""	outHtml += "<span id=\"" + sname + "\" ";	outHtml += "style=\"display:none; position:absolute; z-index:300\" ";	outHtml +=  "class=\"" + poc + "\">" + unescape(content) + "</span>";			outHtml += "<a href=\"javascript:tsmohnull()\" ";	outHtml += "class=\"" + moc + "\" ";	outHtml += "onMouseOver=\"tsmoObjects[" + idx + "].display(this, event)\" ";	outHtml += "onMouseOut=\"tsmoObjects[" + idx + "].hide()\">" + unescape(label) + "</a>";		document.write(outHtml)}// This is the Class definition for the Mouse Over Help Processfunction tsmoHelp(inplabel, inpcontent, poHeight, poWidth, inppoClass, inpmoClass, inpidx, inpspName) {	this.label = unescape(inplabel)	this.content = unescape(inpcontent)		this.display = tsmoHelpDisplay	this.hide = tsmoHelpHide	this.height = (poHeight) ? poHeight : 0;	this.width = (poWidth) ? poWidth : 0;	this.poClass = (inppoClass) ? inppoClass : "tsMouseOverHelp"	this.moClass = (inpmoClass) ? inpmoClass : "tsMouseOverLink"	this.spName = (inpspName) ? inpspName : "tsmoHelpSpan_" + inpidx	this.isactive = 0;}// This function is a method of the tsmoHelp classfunction tsmoHelpDisplay(srcobj, evt) {	if (this.isactive) return;	var cursor = tsgetPosition(evt)	//var tsmospan = document.getElementById("tsmoHelpSpan")	var tsmospan = document.getElementById(this.spName)	//tsmospan.innerHTML = "<span>" + this.content + "</span>"	offset=15;	tsmospan.style.top=cursor.y + offset;	tsmospan.style.left=cursor.x + offset;	if (this.height) { tsmospan.style.height = this.height }	if (this.width) { tsmospan.style.width = this.width }	tsmospan.style.display= "block";	this.isactive = 1;}// This function is a method of the tsmoHelp classfunction tsmoHelpHide() {	//var tsmospan = document.getElementById("tsmoHelpSpan")	var tsmospan = document.getElementById(this.spName)	tsmospan.style.display= "none";	this.isactive = 0;}// This function is a provides an onClick event for the link...function tsmohnull() {}// This function is used to determine the current position of the cursor so the popup can be properly located.// Parameter is the event that is calling this method...// Copied from: Beau’s Blog at: http://hartshorne.ca/2006/01/23/javascript_cursor_position/function tsgetPosition(e) {	e = e || window.event;	var cursor = {x:0, y:0};	if (e.pageX || e.pageY) {		cursor.x = e.pageX;		cursor.y = e.pageY;	} else {		docel = document.documentElement		docbod = document.body		cursor.x = e.clientX + (docel.scrollLeft || docbod.scrollLeft) - docel.clientLeft;		cursor.y = e.clientY + (docel.scrollTop || docbod.scrollTop) - docel.clientTop;	}	return cursor;}
