/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * These codes're created by NVA.                                *
 * Mobile: +84982888725	email: vietanh.vianninhtoquoc@gmail.com  *
 * Copyright © 2K6 ANVICO.,LTD. All right reversed.              *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * They're easy & free to use.                                   *
 * Please "DO NOT delete these lines" when you use them.         *
 * HCMC.VietNam (06.07.06-18:22PM).                              *
 * Hope this useful for you.                                     *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
ContentInfo = "";
tipWidth = 210;
var mouse_X;
var mouse_Y;
var tip_active = 0;

function update_tip_pos(){
		document.getElementById('ToolTip').style.left = mouse_X + 20;
		document.getElementById('ToolTip').style.top  = mouse_Y;
}

var ie = document.all?true:false;
if (!ie) document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = getMouseXY;

function getMouseXY(e) {
if (ie) { // grab the x-y pos.s if browser is IE
mouse_X = event.clientX + document.body.scrollLeft;
mouse_Y = event.clientY + document.body.scrollTop;
}
else { // grab the x-y pos.s if browser is NS
mouse_X = e.pageX;
mouse_Y = e.pageY;
}
if (mouse_X < 0){mouse_X = 0;}
if (mouse_Y < 0){mouse_Y = 0;}
if(tip_active){update_tip_pos();}
}

function EnterContent(TContent){
ContentInfo = 
'<table style=\"BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid\" '+
							' width='+tipWidth+' >\n'+
							'<tbody>\n'+
									'<tr>\n'+
										'<td align=\"left\" bgcolor=\"LightYellow\" class=\"mainText\">\n'+
											TContent+
									'</tr>\n'+
								'</tbody>\n'+
							'</table>\n';
}


function tip_it(which, TContent, _tipWidth){
if(_tipWidth!=null)
tipWidth = _tipWidth;
	if(which){
		update_tip_pos();
		tip_active = 1;
		document.getElementById('ToolTip').style.visibility = "visible";
		EnterContent(TContent);
		document.getElementById('ToolTip').innerHTML = ContentInfo;
	}else{
		tip_active = 0;
		tipWidth = 210;
		document.getElementById('ToolTip').style.visibility = "hidden";
	}
}
