// Show an alert type tooltip with obj centered, text, and the following optionional parameteres width, height, and timeToDisapear
function showAlertToolTip(obj, text, tooltipWidth, tooltipHeight, timeToDisapear) {
	var textTip = '';
	var maxWidth = '';
	var maxHeight = '';
	
	if(tooltipWidth == 'undefined' || tooltipWidth == null || tooltipWidth == 0) {
		maxWidth = 300;
	}
	if(tooltipHeight == 'undefined' || tooltipHeight == null || tooltipHeight == 0) {
		maxHeight = 35;
	}
	
	textTip = text;
	textTip = '<TABLE CLASS="appContent" ALIGN="center" BORDER="0" WIDTH="' + maxWidth + '" HEIGHT="'+ maxHeight + '">';
	textTip += '<TR><TD ALIGN="left" CLASS="messageArea"><IMG SRC="../intranet/images/Misc_Information.gif" WIDTH="30" HEIGHT="30" BORDER="0" ALIGN="absmiddle">&nbsp;';
	textTip += text;
	textTip += '</TD></TR>';
	textTip += '</TABLE>';
	Tip(textTip, ABOVE, false, FIX, [obj, ((obj.offsetWidth / 2) - (maxWidth / 2)), 0 - maxHeight], CLICKCLOSE, true, CLOSEBTN, false, CENTERMOUSE, true, STICKY, true, SHADOW, true, SHADOWWIDTH, 2, PADDING, 0, OPACITY, 100, TEXTALIGN, 'center', SHADOWCOLOR, '#e1e2e3');

	if(timeToDisapear != 'undefined' || timeToDisapear != null || timeToDisapear != 0) {
		window.setTimeout("UntipToolTip()", timeToDisapear);
	}
}
// function to KILL the toolTip window
function UntipToolTip() {
	tt_HideInit();
}
// Custom function to show the GTT toolTip balloon
function displayCustomToolTip(formHtml, obj, pointer, objX, objY, opacity, clickClose, tableWidth, tableVAlign) {
	var currTableVAlign = 'bottom';
	var currTableWidth = 100;
	var currObjX = -58;
	var currObjY = 5;
	var currOpacity = 97;
	var html = '';
	var currPointer = 'Down';
	var currClickClose = false;

	if(tableVAlign != 'undefined' && tableVAlign != null) currTableVAlign = tableVAlign;
	if(tableWidth != 'undefined' && tableWidth != null) currTableWidth = tableWidth;
	if(objX != 'undefined' && objX != null) currObjX = objX;
	if(objY != 'undefined' && objY != null) currObjY = objY;
	if(opacity != 'undefined' && opacity != null) currOpacity = opacity;
	if(pointer != 'undefined' && pointer != null) currPointer = pointer;
	if(clickClose != 'undefined' && clickClose != null) currClickClose = clickClose;

	html += '<TABLE CELLPADDING="0" CELLSPACING="0" WIDTH="300px" HEIGHT="475px" BORDER="0" CLASS="appContent">';
	html += '<TR><TD VALIGN="' + currTableVAlign + '">';
		html += '<TABLE CLASS="appContent" CELLPADDING="0" CELLSPACING="0" WIDTH="' + currTableWidth + '%" BORDER="0">';
		// Show the pointer up in table pointing for the object
		if(currPointer == 'Up') {
			html += '<TR><TD COLSPAN="3" STYLE="padding: 0px 0px 0px 0px;">';
				html += '<IMG SRC="../intranet/images/toolTipBallonPointUp.png" STYLE="position: relative; float: right; width: 30px; height: 30px;">';
			html += '</TD></TR>';
		}
		// put tr with button to exit tooltip
		html += '<TR style="background-color: #5C5C5C;"><TD COLSPAN="3" VALIGN="top" ALIGN="right" HEIGHT="12px" STYLE="padding: 0px 0px 0px 0px; margin: 0px 0px 0px 0px;">';
			html += '<DIV style="margin: 2px 2px 2px 1px; padding: 0px 0px 0px 0px; background-color: #950000; font-size: 12px; text-align: center; font-weight: bold; color: white; width: 20px; height: 14px; cursor: pointer;" ONMOUSEOVER="this.style.backgroundColor = \'#D20000\';" ONMOUSEOUT="this.style.backgroundColor = \'#950000\';" ONCLICK="tt_HideInit();">';
				html += 'X';
			html += '</DIV>';
		html += '</TD></TR>';

		// Set row to enable table with the content of the form
		html += '<TR style="background-color: #BBBBBB;"><TD></TD><TD>';
			// table with form
			html += formHtml;	
		html += '</TD><TD></TD></TR>';

		// Put footer round corners
		html += '<TR><TD STYLE="padding: 0px 0px 0px 0px;" ALIGN="right" VALIGN="top">';
			html += '<IMG SRC="../intranet/images/toolTipLeftCorner.png">';
		html += '</TD><TD WIDTH="96%" HEIGHT="5px" style="background-color: #BBBBBB;"></TD><TD STYLE="padding: 0px 0px 0px 0px;" ALIGN="left" VALIGN="top">';
			html += '<IMG SRC="../intranet/images/toolTipRightCorner.png">';
		html += '</TD></TR>';
		
		if(currPointer == 'Down') {
			// Show the pointer down in table pointing for the object
			html += '<TR><TD COLSPAN="3" STYLE="padding: 0px 0px 0px 0px;">';
				html += '<IMG SRC="../intranet/images/toolTipBallonPointDown.png" STYLE="position: relative; left: 75px; width: 30px; height: 30px;">';
			html += '</TD></TR>';
		}
		html += '</TABLE>';
	html += '</TD></TR>';
	html += '</TABLE>';

	// Put all html code into var that will link to the API of the toolTips
	textTip = html;

	// Now this is the call of the function of the API of toolTips to show the toolTip
	Tip(textTip, FIX, [obj, currObjX, currObjY], ABOVE, true, OFFSETY, -15, CLOSEBTN , false, CLICKCLOSE, currClickClose, CENTERMOUSE, true, STICKY, true, SHADOW, false, OPACITY, currOpacity, BORDERWIDTH, 0, BGCOLOR, '', BORDERCOLOR, '#777d86', SHADOWCOLOR, '');
}