var oPopup = window.createPopup();
function showToolTips(content, posX, posY, pWidth, pHeight){
	var oPopupBody = oPopup.document.body;
	oPopupBody.innerHTML = content;	
	oPopup.show(posX, posY, pWidth, pHeight, document.body);	
}
	
function hideToolTips(){				
	oPopup.hide();
}			

function findPos(obj, mode) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			if(mode == 0)
				curtop += obj.offsetTop
			else
				curtop += obj.scrollTop
			
		}
	}
	return [curleft,curtop];
}

function showWaitingDialog(){
	var Msg;
	Msg =	"<table style='WIDTH: 200px; border: 1px solid #666666'>";
	Msg +=	"<tbody><tr>";
	Msg +=	"<td align='center' ";
	Msg +=	"style='text-align: center; font-family: Verdana, sans-serif, Arial; font-weight: bold;	font-size: 10px; color: #666666;'";
	Msg +=	">Now loading...</td>";
    Msg +=	"</tr><tr>";
    Msg +=	"<td></td>";
 	Msg +=	"</tr></tbody></table>";           
    showToolTips(Msg, (screen.availWidth/2) - (200/2), (screen.availHeight/2) - (75), 200, 75);    
}

function hideWaitingDialog(){
	hideToolTips();
}