var sh_popuptimeout = null;
var g_iEventCount = 0;
var g_EventArray = new Array;

var iCurrentEventCount = 0;
var iCurrentX = 0;
var iCurrentY = 0;
var scrolltimer = null;
var loop = false;
//  ########  TRACKS MOUSE POSITION FOR POPUP PLACEMENT
//var isNav = (navigator.appName.indexOf("Netscape") !=-1);
var isIE = (navigator.userAgent.indexOf("MSIE") !=-1);
var sh_customCommentDesc = "Other";

function sh_datediff(sh_eventdate)
{
	var sh_evtdt=sh_eventdate;
	
	sh_eventyr=sh_evtdt.substring(6);
	sh_eventdt=sh_evtdt.substring(3,5);
	sh_eventmt=sh_evtdt.substring(0,2);
	

	var sh_currentTime = new Date();
	var sh_year = sh_currentTime.getYear();
	if (sh_year < 1000)
		sh_year+=1900;
	var sh_daymonth=sh_currentTime.getDate()
	if (sh_daymonth<10)
		sh_daymonth="0"+sh_daymonth;
	var sh_day = sh_currentTime.getDay();
	
	var sh_month = sh_currentTime.getMonth() + 1;
	if (sh_month<10)
		sh_month="0"+sh_month;
	
	var sh_currentyr = new Date(sh_year,sh_month,sh_daymonth);
	var sh_eventdate1 = new Date(sh_eventyr,sh_eventmt,sh_eventdt);
	
	var sh_noofdays=Math.floor((sh_currentyr-sh_eventdate1)/ (1000 * 60 * 60 * 24));

	return sh_noofdays;
	
	
	//alert(Math.floor((new Date()-new Date(2006,07,31))/ (1000 * 60 * 60 * 24)))
	
	
}



function handlerMM(e)
{
	
	iCurrentX = (!isIE) ? e.pageX : (document.documentElement && document.documentElement.scrollLeft) ? event.clientX + document.documentElement.scrollLeft : event.clientX + document.body.scrollLeft;
	
	iCurrentY = (!isIE) ? e.pageY : (document.documentElement && document.documentElement.scrollTop) ? event.clientY + document.documentElement.scrollTop : event.clientY + document.body.scrollTop;

	//HidePopup();
	return true;
}

if(!isIE)
{
	document.captureEvents(Event.MOUSEMOVE);
}

document.onmousemove = handlerMM;

function ShowPopup(iEvent)
{}

function ShowPopup2()
{

}

function HidePopup()
{

}
function HidePopup2()
{
	
	
}

function EventInfo(Coords, Source, Type, Date, CompanyId, EventId, Label) 
{
	this.sCoords = Coords;
	this.sSource = Source; 
	this.sType = Type; 
	this.sDate = Date; 
	this.sCompanyId = CompanyId; 
	this.sEventId = EventId;
	this.sLabel = Label; 
}

function AddEvent(Coords, Source, Type, Date, Label, CompanyId, EventId) 
{
	
	g_EventArray[g_iEventCount] = new EventInfo(Coords, Source, Type, Date, Label, CompanyId, EventId);
	g_iEventCount++;
	

}
