
function _showTip(tipId)
{
var tipDiv = null;
if (gTipDisplay[tipId] == false){
return;
}
tipDiv = document.getElementById(tipId);
if (tipDiv == null){
return;
}
if (tipDiv.style == null){
return;
}
tipDiv.style.display="block";
var imgBounds = GetElementBounds(document.getElementById("pxn8_image"));
tipDiv.style.top= imgBounds.y + 10 + "px";
tipDiv.style.left=imgBounds.x + 10 + "px";
var shadow = document.getElementById("tipshadow");
if (shadow){
}
else{
shadow = document.createElement("div");
document.body.appendChild(shadow);
}
shadow.id = "tipshadow";
shadow.style.backgroundColor = "black";
var opacity = 50;
shadow.style.opacity = opacity/100;
shadow.style._moz_opacity = opacity/100;
shadow.style.filter = "alpha(opacity:" + opacity + ")";
var tipBounds = GetElementBounds(tipDiv);
shadow.style.position = "absolute";
shadow.style.top = tipBounds.y + 3 + "px";
shadow.style.left = tipBounds.x + 3 + "px";
shadow.style.width = tipBounds.width+ "px";
shadow.style.height = tipBounds.height + "px";
}
function showTip(element, event,elementId)
{
var tipId = null;
if (elementId){
tipId = elementId + "_tip";
}else{
tipId = element.id + "_tip";
}
gTipDisplay[tipId] = true;
setTimeout("_showTip('" + tipId + "');",550);
}
var gTipDisplay = [];
function hideTip(element, event,elementId)
{
var tipDiv = null;
var tipId = null;
if (elementId){
tipId = elementId + "_tip";
}else{
tipId = element.id + "_tip";
}
gTipDisplay[tipId] = false;
tipDiv = document.getElementById(tipId);
if (tipDiv){
tipDiv.style.display="none";
}
var shadow = document.getElementById("tipshadow");
if (shadow){
document.body.removeChild(shadow);
}
}
function GetElementBounds(elt)
{
var x = null;
var y = null;
if(elt.style.position == "absolute") {
x = parseInt(elt.style.left);
y = parseInt(elt.style.top);
} else {
var pos = GetElementPosition(elt); x = pos.x;
y = pos.y;
} return {x: x, y: y, width: elt.offsetWidth, height: elt.offsetHeight};
} 
