
// Module version: 1.01.01

// This Software is Copyright Electronic Publication Solutions Ltd. All Rights Reserved.
// Unauthorised use without permission is strictly prohibited.


// IN PAGE BEFORE BODY TAG: <div id="theToolTip" style="HEIGHT: 10px; LEFT: 0px; POSITION: absolute; TOP: 0px; WIDTH: 10px; Z-INDEX: 1000"></div>



function hideToolTip() {
	
			theToolTip.style.visibility="hidden";
			theToolTip.style.left = 1;
			theToolTip.style.top = 1;
	
}


function showToolTip(object, e, tipContent, tipWidth, displaytime)
{

	backcolor = '#ffffdf';
	bordercolor = '#000000';
	textcolor = '#000000';
	
	fontfamily = 'MS Sans Serif, Arial, Helvetica, sans-serif';
	fontsize = '11px';
	
	paragraphspacing = 5;
	
	if (!tipWidth) tipWidth = 300;
	if (!displaytime) displaytime = 0;


	tipContent = tipContent.replace(/<p>/gi, '<p style="margin-top: '+paragraphspacing+'px; margin-bottom: 0px; ">');
	tipContent = tipContent.replace(/<\/p>/gi, '');
	
				
			theToolTip.innerHTML='<table style="font-family: ' + fontfamily + '; font-size: ' + fontsize + '; border: '+bordercolor+'; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; background-color: '+backcolor+'" width="'+tipWidth+'" border="0" cellspacing="1" cellpadding="1"><tr><td><font style="font-family: ' + fontfamily + '; font-size: ' + fontsize + '; color: '+textcolor+'">'+unescape(tipContent)+'</font></td></tr></table> ';

			if ((e.y + theToolTip.clientHeight + 16) > document.body.clientHeight)
				{	
					theToolTip.style.top = (e.y - theToolTip.clientHeight - 20) + document.body.scrollTop;
				}
			else
			{
			theToolTip.style.top=document.body.scrollTop+event.clientY+20;
			}


			if ((e.x + theToolTip.clientWidth) > (document.body.clientWidth + document.body.scrollLeft))
				{	
					theToolTip.style.left = (document.body.clientWidth + document.body.scrollLeft) - theToolTip.clientWidth-10;
				}
			else
			{
			theToolTip.style.left=document.body.scrollLeft+event.clientX;
			}
			theToolTip.style.visibility="visible";
			if (displaytime > 0) {
				window.setTimeout("hideToolTip()", displaytime);
			}
	
}


