var tip_status=true
var lvu_cardtimeout=setTimeout('',500)
var x=false
function tipStatus(status){
tip_status=status}
function showTip(el,id,html,top_offset,left_offset,tip_width,cursor_follow,cursor_type,mousedelay,scrolling){
clearTimeout(lvu_cardtimeout)
if(!tip_status)return false
if(!(x=document.getElementById(id))){
x=document.createElement('div')
document.body.appendChild(x)
x.setAttribute('id',id)
x.style.zIndex='1000'
x.style.width=(tip_width)? parseInt(tip_width)+'px' : '240px'
x.style.position='absolute'
x.onmouseout=function(){lvu_cardtimeout=setTimeout(function(){hideTip(x.id);},mousedelay)}
x.onmouseover=function(){clearTimeout(lvu_cardtimeout)}
}else{
x=document.getElementById(id)}
x.innerHTML=html
cancel_button=document.createElement('div')
cancel_button.setAttribute('id','cancel_button')
cancel_button.onclick=function(){tipStatus(true);hideTip(''+id+'',1);}
x.appendChild(cancel_button)
x.style.display=(x.style._display)? x.style._display : 'block'
var el_h=(el_h=parseInt(el.style.height))? el_h : 0
var el_w=(el_w=parseInt(el.style.width))? el_w : 0
if(scrolling){
el=document.getElementById('lvu_scrollbox')
x.style.top=(getTop(el)+top_offset)+'px'
x.style.left=(getLeft(el)+left_offset)+'px'
}else{
x.style.top=(getTop(el)+el_h+top_offset)+'px'
x.style.left=(getLeft(el)+el_w+left_offset)+'px'}
if(cursor_type)el.cursor=cursor_type
return true}
function hideTip(id,force){
if(!tip_status&&force !=1)return false
var x=document.getElementById(id)
clearTimeout(lvu_cardtimeout)
x.style.display='none'
return true}
function myUnescape(txt){
return decodeURIComponent(txt)}
function getLeft(elem){
var x=0
if(elem.calcLeft)
return elem.calcLeft
var oElem=elem
while(elem){
if((elem.currentStyle)&&(!isNaN(parseInt(elem.currentStyle.borderLeftWidth)))&&(x!=0))
x+=parseInt(elem.currentStyle.borderLeftWidth)
x+=elem.offsetLeft
elem=elem.offsetParent}
oElem.calcLeft=x
return x}
function getTop(elem){
var x=0
if(elem.calcTop)
return elem.calcTop
var oElem=elem
while(elem){
if((elem.currentStyle)&&(!isNaN(parseInt(elem.currentStyle.borderTopWidth)))&&(x!=0))
x+=parseInt(elem.currentStyle.borderTopWidth)
x+=elem.offsetTop
elem=elem.offsetParent}
oElem.calcTop=x
return x}

