var ua=navigator.userAgent
var dx=30
var dy=30
if (ua.indexOf("MSIE")>=0 && ua.indexOf("Opera")==-1) isIE=true
else isIE=false
function Show(n,ev){
div=document.getElementById(n)
if(div.innerHTML=='')return
obj=div.style
if(isIE) srcEl=window.event.srcElement
else srcEl=ev.target
p=srcEl.coords.indexOf(",")
x=parseInt(srcEl.coords.substring(0,p))
y=srcEl.coords.substring(p+1)
p=y.indexOf(",")
y=parseInt(y.substring(0,p))
img=document.getElementById('zemelapis')
x+=getCoordinates(img).x+dx
y+=getCoordinates(img).y+dy

obj.display='block'

var rightedge=document.body.clientWidth-x
var bottomedge=document.body.clientHeight-y
if(rightedge<div.offsetWidth)obj.left=x-div.offsetWidth-dx-18
else obj.left=x
if(bottomedge<div.offsetHeight)obj.top=y-div.offsetHeight-dy
else obj.top=y
//obj.visibility='visible'
}
function Hide_t(n){
obj=document.getElementById(n)
//obj.style.visibility="hidden"
obj.style.display="none"
}
function Hide(n){
Hide_t(n)
//setTimeout('Hide_t("'+n+'")',100)
}
function getCoordinates(obj){
var newObj=new Object()
newObj.x=obj.offsetLeft
newObj.y=obj.offsetTop
Parent=obj.offsetParent
while(Parent!=null){
newObj.y+=Parent.offsetTop
newObj.x+=Parent.offsetLeft
Parent=Parent.offsetParent
}
return newObj
}
