

var ns4up = (document.layers) ? 1 : 0;
var ie4up = (document.all) ? 1 : 0;

var kbild="images/start_klein.jpg",kbreite=770, khoehe=251; // kleines bild
var gbild="images/start_gross.jpg",gbreite=1400, ghoehe=456; // großes Bild

var breite_lupe=150	; // größe der Lupe
var hoehe_lupe=231

var zoom=1		; //	Faktor [1= x2] [1.5=x3] [2=x4] [2.4=x5] usw



var xp=0 + (Weite-805)/2 + 5		; // Hier die Position des Bildes eingeben Modifiziert: abhängig von Weite
var yp=165
			; // Ab hier nichts mehr ändern
var faktor=(gbreite*zoom)/kbreite
var Xmm=0, Ymm=0
if (ns4up) {
document.write("<layer id=\"b2\" top="+yp+" left="+xp+" z-index=1><img SRC=\""+kbild+"\" NOSAVE width="+kbreite+" height="+khoehe+"><\/layer>\n")
document.write("<layer id=\"b1\" top="+yp+" left="+xp+" z-index=2><img SRC=\""+gbild+"\" NOSAVE width="+gbreite*zoom+" height="+ghoehe*zoom+"><\/layer>\n")
}
if (ie4up) {
document.write("<div id='b2' style=\"position:absolute; top:"+yp+"px; left:"+xp+"px;\"><img SRC=\""+kbild+"\" NOSAVE width="+kbreite+" height="+khoehe+"><\/div>\n")
document.write("<div id='b1' style=\"position:absolute; top:"+yp+"px; left:"+xp+"px;\"><img SRC=\""+gbild+"\" NOSAVE width="+gbreite*zoom+" height="+ghoehe*zoom+"><\/div>\n")
}
function handlerMM(e){ 
Xmm = (ns4up) ? e.pageX : event.clientX;
Ymm = (ns4up) ? e.pageY : event.clientY;
}
if (ns4up) {
document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove = handlerMM;
if (ns4up) {calc_ns()}
if (ie4up) {calc_ie()}
function calc_ns() {
x=Xmm-xp, y=Ymm-yp
if (x>=0 && y>=0 && x<=kbreite && y<=khoehe) {
document.layers.b1.left=xp-x*(faktor-1)
document.layers.b1.top=yp-y*(faktor-1)
document.layers.b1.clip.left=x*faktor-(breite_lupe/2)
document.layers.b1.clip.top=y*faktor-(hoehe_lupe/2)
document.layers.b1.clip.right=x*faktor+(breite_lupe/2)
document.layers.b1.clip.bottom=y*faktor+(hoehe_lupe/2)
} else {
document.layers.b1.clip.left=0
document.layers.b1.clip.top=0
document.layers.b1.clip.right=0
document.layers.b1.clip.bottom=0
}
setTimeout("calc_ns()",10)
}
function calc_ie() {
x=Xmm-xp, y=Ymm-yp
if (x>=0 && y>=0 && x<=kbreite && y<=khoehe) {
document.all.b1.style.pixelLeft=xp-x*(faktor-1)
document.all.b1.style.pixelTop=yp-y*(faktor-1)
document.all.b1.style.clip="rect("+(y*faktor-(hoehe_lupe/2))+" "+(x*faktor+(breite_lupe/2))+" "+(y*faktor+(hoehe_lupe/2))+" "+(x*faktor-(breite_lupe/2))+")"
} else {
document.all.b1.style.clip="rect(0 0 0 0)"
}
setTimeout("calc_ie()",10)
}
