

topset=65;
marginx=20;
var fakX=2770/300


var minibr=300
var minihj=688

var zoombr=650
var zoomhj=600

var framebr=Math.round(zoombr/fakX)
var framehj=Math.round(zoomhj/fakX)



function start() {
document.getElementById("mini").style.width=minibr+"px"
document.getElementById("mini").style.height=minihj+"px"

document.getElementById("B").style.width=framebr+"px"
document.getElementById("B").style.height=framehj+"px"

}



function klip(x,y) {
x=x-325/fakX-marginx
y=y-300/fakX-topset
document.getElementById("A").style.clip="rect("+(y*fakX)+topset+"px "+(zoombr+x*fakX+marginx)+"px "+(zoomhj+topset+y*fakX+minihj)+"px "+(x*fakX+marginx)+"px)"
document.getElementById("A").style.top=-y*fakX+"px"
document.getElementById("A").style.left=-x*fakX+"px"
}

function vis(x,y) {

document.getElementById("B").style.top=y-framehj/2+"px"
document.getElementById("B").style.left=x-framebr/2+"px"
}

function get(x,y) {

document.getElementById("B").style.visibility="visible"


//x=event.x+document.body.scrollLeft
//y=event.y+document.body.scrollTop







if(x>(marginx) && x<(minibr+marginx) && y<(minihj+topset) && y>(topset)) {

if(x<(marginx+framebr/2)) {
x=marginx+framebr/2
}
if(x>(minibr+marginx-framebr/2)) {
x=minibr+marginx-framebr/2
}


if(y<(topset+framehj/2)) {
y=topset+framehj/2
}
if(y>(minihj+topset-framehj/2)) {
y=minihj+topset-framehj/2
}



start();
vis(x,y)
}
}



function going(x,y,page) {

//x=event.x+document.body.scrollLeft-marginx
//y=event.y+document.body.scrollTop-topset



location.href=page+'.asp?'+x+","+y


}


