/* Otvirani pop oken s obrazkem a nebo strankou */

 function otvaraj(c,width,height,hidescrollbars){
  window.open(c,'','width='+width+',height='+height+',top=15,left=15,location=no,menubar=no,personalbar=no,resizable=yes,scrollbars='+(hidescrollbars?'no':'yes'));
 }


 function otvarajObrozki(c,width,height,hidescrollbars){
   win = window.open(c,'','width='+width+',height='+height+',top=15,left=15,location=no,menubar=no,personalbar=no,resizable=yes,scrollbars='+(hidescrollbars?'no':'yes'));
  var html=""; html+='<!doctype html public "-//w3c//dtd html 4.0 transitional//en">';html+='<html>';
  html+='<head>';
  html+='</head>';
  html+='<body style="padding:0px;margin:0px;">';
  html+='<img src="'+c+'" />';
  html+='</body>';
  html+='</html>';
  win.document.write(html);
  win.document.close();
 }

/* Nabehne obrazek po najetí na odkaz */

function topPosition(obj){
        return obj.offsetTop + ((obj==document.body) ? 0 : topPosition(obj.offsetParent));
}

function cl_mover (ev) {
        if (window.event) {ev = window.event}
        var tt = document.getElementById("tt");
        tt.style.left = (ev.clientX + document.body.scrollLeft) + "px";
        tt.style.top = (topPosition(this) + 21) + "px";//
}

function cl_min (ev) {
        if (window.event) {ev = window.event}
        var tt = document.getElementById("tt");
        var img = tt.firstChild;
        img.src = "image/" + this.thid + ".jpg";
        img.width = this.thw;
        img.height = this.thh;
        tt.style.left = (ev.clientX + document.body.scrollLeft) + "px";
        tt.style.top = (ev.clientY + document.body.scrollTop + 10) + "px";
        tt.style.display = "block";
}

function cl_mout (ev) {
        if (window.event) {ev = window.event}
        var tt = document.getElementById("tt");
        tt.style.display = "none";
}

function lf(n,ev,f,w,h){
        n.thid = f;
        n.thw = w;
        n.thh = h;
        n.onmouseover = cl_min;
        n.onmousemove = cl_mover;
        n.onmouseout = cl_mout;
        n.onmouseover(ev);
}

