// ------------------------
//Detect if the user is using IE on Windows.
var isIE=0;
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) { isIE=1; }

function createPopUp( ) {
	//opacity = tt_n6? '-moz-opacity:0.85;' : isIE? 'filter:Alpha(opacity=85);' : 'opacity:0.85;';
	opacity = isIE? 'filter:Alpha(opacity=80);' : '-moz-opacity:0.85;';
	document.write( "<div id='popup' class='popupcss' style='" + opacity + "'></div>" );
}

function findObj( obj ) {
	var theObj = "";
	if ( document.getElementById ) {
		theObj = document.getElementById( obj );
	} else if ( document.layers ) {
		theObj = document.layers[ obj ];
	} else if ( document.all ) {
		theObj = document.all.item( obj );
	}
	return theObj;
}

function findLeft( obj ) {
	var curLeft = 0;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			curLeft += obj.offsetLeft;
			obj = obj.offsetParent;
		}
	} else if (obj.x) {
		curLeft += obj.x;
	}
	return curLeft;
}

function findTop( obj ) {
	var curTop = 0;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
		 	curTop += obj.offsetTop;
		 	obj = obj.offsetParent;
		}
	} else if (obj.x) {
		curTop += obj.y;
	}
	return curTop;
}

function hideDates( ) {
	thePopUp = findObj( "popup" );
	thePopUp.innerHTML = "";
	if ( ! thePopUp.style ) {
		thePopUp.visibility = "hidden";
		thePopUp.top = "-10px";
		thePopUp.left = "-10px";
	} else {
		thePopUp.style.visibility = "hidden";
		thePopUp.style.top = "-10px";
		thePopUp.style.left = "-10px";
	}
}

function showDates( parameter1, parameter2, parameter3 ) {
	var theCall = "";
	var cellOffset = Math.round(cellWidth/5*4);
	theCall = findObj( parameter3 );
	var thePopUp = "";
	thePopUp = findObj( "popup" );
	thePopUp.innerHTML = "<b>" + parameter1 + "</b><br>" + parameter2;
	if ( ! thePopUp.style ) {
		thePopUp.visibility = "visible";
		thePopUp.top = findTop(theCall) + cellOffset + "px";
		thePopUp.left = FindLeft(theCall) + cellOffset + "px";
	} else {
		thePopUp.style.visibility = "visible";
		thePopUp.style.top = findTop(theCall) + cellOffset + "px";
		thePopUp.style.left = findLeft(theCall) + cellOffset + "px";
	}
}