/* magic numbers */
var xOffSet = 20;
var yOffSet = -130;
var pageWidth = 1150;

/* this function shows the toolTip when  user moves the mouse over the link */
function showToolTip(event, msg, strId) {

var winWidth = f_clientWidth();

//	if ( !msg ) msg = "Click to View Details";
	if ( !strId ) strId = "toolTip";
	/* get the mouse left position */
	x = event.clientX + f_scrollLeft() + xOffSet - 
		( winWidth < pageWidth ? 0 : (winWidth - pageWidth)/ 2 );  // adjust for outer olive "frame"
	/* get the mouse top position  */
	y = event.clientY + f_scrollTop() + yOffSet;
	/* display the toolTip */
	var toolTip = document.getElementById(strId)
	if ( msg ) toolTip.innerHTML = msg;
	/* set the toolTip's left */
	toolTip.style.left = x+"px";
	/* set the toolTip's top */
	toolTip.style.top = y+"px";
	/* display it */
	toolTip.style.display="block";
}
/* this function hides the toolTip when  user moves the mouse out of the link */
function hideToolTip(strId) {
	if ( !strId ) strId = "toolTip";
	document.getElementById(strId).style.display="none";
}

/* next 5 f()s from http://www.softcomplex.com/docs/get_window_size_and_scrollbar_position.html 
     first two could replace similar f() in global.js */
/*
function f_clientHeight() {
	return f_filterResults (
		window.innerHeight ? window.innerHeight : 0,
		document.documentElement ? document.documentElement.clientHeight : 0,
		document.body ? document.body.clientHeight : 0
	);
}
*/
function f_clientWidth() {
	return f_filterResults (
		window.innerWidth ? window.innerWidth : 0,
		document.documentElement ? document.documentElement.clientWidth : 0,
		document.body ? document.body.clientWidth : 0
	);
}
function f_scrollLeft() {
	return f_filterResults (
		window.pageXOffset ? window.pageXOffset : 0,
		document.documentElement ? document.documentElement.scrollLeft : 0,
		document.body ? document.body.scrollLeft : 0
	);
}
function f_scrollTop() {
	return f_filterResults (
		window.pageYOffset ? window.pageYOffset : 0,
		document.documentElement ? document.documentElement.scrollTop : 0,
		document.body ? document.body.scrollTop : 0
	);
}
function f_filterResults(n_win, n_docel, n_body) {
	var n_result = n_win ? n_win : 0;
	if (n_docel && (!n_result || (n_result > n_docel)))
		n_result = n_docel;
	return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}
