
var IE = document.all?true:false;
if (!IE) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = broadcastMouse;
var tempX = 0;
var tempY = 0;

function broadcastMouse(e)
{
 if (IE)
 {
  tempX = event.clientX + document.body.scrollLeft;
  tempY = event.clientY + document.body.scrollTop;
 }
 else
 {
  tempX = e.pageX;
  tempY = e.pageY;
 }
 if (tempX < 0)
 {tempX = 0;}
 if (tempY < 0)
 {tempY = 0;}
}

function showHelp(tooltipId)
{
    it = document.getElementById(tooltipId);
    if (self.innerWidth)
	{
		frameWidth = self.innerWidth;
		frameHeight = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientWidth)
	{
		frameWidth = document.documentElement.clientWidth;
		frameHeight = document.documentElement.clientHeight;
	}
	else if (document.body)
	{
		frameWidth = document.body.clientWidth;
		frameHeight = document.body.clientHeight;
	}
    
		it.style.width = '350px'
		if (frameWidth < (tempX + 400))
		{
			it.style.left = (frameWidth - 400) + 'px';
			it.style.top = tempY + 10 + 'px';
		}
		else
		{
			it.style.left = tempX + 5 + 'px';
			it.style.top = tempY + 5 + 'px';
		}
    
    it.style.visibility = 'visible';
}

function hideHelp(tooltipId)
{
    it = document.getElementById(tooltipId);
    it.style.visibility = 'hidden';
}


///////////////////////////////////////////////////////////////
// THE FOLLOWING IS EXCLUSIVELY FOR USE ON THE DAY AND
// WEEK VIEW FILTERING AND DATE PICKING IN THE EVENTS SECTION
///////////////////////////////////////////////////////////////
function showCalendarDiv(tooltipId, OpenTable, CloseTable)
{
    it = document.getElementById(tooltipId);
    theOpenTable = document.getElementById(OpenTable);
    theCloseTable = document.getElementById(CloseTable);
    
			it.style.left = tempX + 'px';
			it.style.top = tempY + 10 + 'px';
    
    it.style.visibility = 'visible';
    theOpenTable.style.display = 'none';
    theCloseTable.style.display = 'block';
}

function hideCalendarDiv(tooltipId, OpenTable, CloseTable)
{
    it = document.getElementById(tooltipId);
    theOpenTable = document.getElementById(OpenTable);
    theCloseTable = document.getElementById(CloseTable);
    
    it.style.visibility = 'hidden';
    theOpenTable.style.display = 'block';
    theCloseTable.style.display = 'none';
}
///////////////////////////////////////////////////////////////


///////////////////////////////////////////////////////////////
// THE FOLLOWING IS FOR USE IN DISPLAYING IMAGES OF 153px WIDTH
///////////////////////////////////////////////////////////////
function showImageHelp(tooltipId)
{
    it = document.getElementById(tooltipId);
    if (self.innerWidth)
	{
		frameWidth = self.innerWidth;
		frameHeight = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientWidth)
	{
		frameWidth = document.documentElement.clientWidth;
		frameHeight = document.documentElement.clientHeight;
	}
	else if (document.body)
	{
		frameWidth = document.body.clientWidth;
		frameHeight = document.body.clientHeight;
	}
    
		it.style.width = '153px'
		if (frameWidth < (tempX + 200))
		{
			it.style.left = (frameWidth - 200) + 'px';
			it.style.top = tempY + 10 + 'px';
		}
		else
		{
			it.style.left = tempX + 5 + 'px';
			it.style.top = tempY + 5 + 'px';
		}
    
    it.style.visibility = 'visible';
}