var ablak=null
function findPosX(obj){
    var curleft=0
    if(obj.offsetParent){
        while(obj.offsetParent){
            curleft+=obj.offsetLeft
            obj=obj.offsetParent
        }
    }else if(obj.x) curleft+=obj.x
    return curleft
}
function findPosY(obj){
    var curtop=0
    if(obj.offsetParent){
        while(obj.offsetParent){
            curtop+=obj.offsetTop
            obj=obj.offsetParent
        }
    }else if(obj.y) curtop+=obj.y
    return curtop
}
var inmenu=false
var lastmenu=0
function showmenu(o1,o2){
    inmenu=true
    oldmenu=lastmenu
    lastmenu=o2
    if(oldmenu) erase(oldmenu)
    document.getElementById(o2).style.visibility="visible"
    document.getElementById(o2).style.top=findPosY(document.getElementById(o1))+15
    document.getElementById(o2).style.left=findPosX(document.getElementById(o1))+60
}
function erase(o2){
    if(inmenu&&lastmenu==o2) return;
    document.getElementById(o2).style.visibility="hidden"
}
function timer(o2){
    inmenu=false
    window.setTimeout("erase('"+o2+"')",350)
}
function marad(o1,o2,m,c){
    inmenu=true
    lastmenu=o2
    document.getElementById(m).style.background=c
}
function megy(o2,m,oc){
    timer(o2)
    document.getElementById(m).style.background=oc
}
var newablak=null
function winOpen(url,n,width,height){
    var sw=screen.width;
    var sh=screen.height;
    var left=sw?(sw-width)/2:0;
    var top=sh?(sh-height)/2:0;
    newablak=window.open(url,n,"width="+width+",height="+height+",top="+top+",left="+left+",resizable=1,location=0,statusbar=1,toolbar=0,scrollbars=1");
}

