//JavaScript Code // Globale Variable des Sliders var sliderOn="Off"; var slider_oben="Off"; //drag drop function for NS 4 var dragswitch=0 var nsx var nsy var nstemp var my_x=0; var my_y=0; goodBrowser = true; //also IE oder N6 if (document.layers) { goodBrowser = false; //also N4.7 } function drag_dropns(name){ document.releaseEvents(Event.MOUSEMOVE); temp=eval(name); temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP); temp.onmousedown=gons; temp.onmousemove=dragns; temp.onmouseup=stopns; } function gons(e){ temp.captureEvents(Event.MOUSEMOVE); nsx=e.x; nsy=e.y; my_x = e.pageX; my_y = e.pageY; //window.status=my_x+":"+my_y+"drag_drop_GO_NS"; } function dragns(e){ my_x = e.pageX; my_y = e.pageY; //window.status=my_x+":"+my_y+"drag_NS"; if (dragswitch == 1) { temp.moveBy(e.x-nsx,e.y-nsy); return false; } } function stopns(){ temp.releaseEvents(Event.MOUSEMOVE); document.captureEvents(Event.MOUSEMOVE); } //drag drop function for IE 4+ var dragapproved = false; function drag_dropie(){ my_x = window.event.x + document.body.scrollLeft; my_y = window.event.y + document.body.scrollTop; //window.status=my_x+":"+my_y+"drag_drop_IE"; if (dragapproved==true) { document.all.showimage.style.pixelLeft = tempx + event.clientX - iex; document.all.showimage.style.pixelTop = tempy + event.clientY - iey; return false; } } function initializedragie(){ if(window.event){ iex=window.event.clientX; iey=window.event.clientY; tempx=showimage.style.pixelLeft; tempy=showimage.style.pixelTop; dragapproved=true; document.onmousemove=drag_dropie; }else{ dragapproved=true; document.onmouseup=abschaltenNS6; document.onmousemove=gons6; } //alert('iex:'+iex +'tempx: ' +tempx); } // Mal schauen function abschaltenNS6(){dragapproved=false;document.onmousemove=MoveHandler;} function gons6(e){ my_x = e.pageX; my_y = e.pageY; //window.status="drag_drop_GO_NS6x"; if (dragapproved==true) { //window.status='dragapproved==true'; document.getElementById('showimage').style.left = my_x-40; document.getElementById('showimage').style.top = my_y -10; return false; } } if (document.all) { document.onmouseup = new Function("dragapproved=false"); } ////drag drop functions end here function hidebox(){ if (goodBrowser) { document.getElementById('showimage').style.visibility = "hidden"; } else { document.showimage.visibility = "hide"; } } function MoveHandler(e) { //alert('dasjkfgkjdsaf'); my_x = e.pageX; my_y = e.pageY; //window.status = my_x + ":" + my_y + "MoveHandlerNetscape"; if(sliderOn == "On") { slide_zeiger('unten'); } if(slider_oben == "On") { slide_zeiger('oben'); } return true; } // just save mouse position for animate() to use function MoveHandlerIE(){ my_x = window.event.x + document.body.scrollLeft; my_y = window.event.y + document.body.scrollTop; //window.status = my_x + ":" + my_y + "MoveHandlerIE - NS6"; if(sliderOn == "On") { slide_zeiger('unten'); } if(slider_oben == "On") { slide_zeiger('oben'); } } if (document.all) { document.onmousemove = MoveHandlerIE; } else { document.captureEvents(Event.MOUSEMOVE); document.onmousemove = MoveHandler; } function cometome(titel,text){ var pxx=10; var pyy=15; if (my_x<=50) { pxx=0; pyy=15; } if(goodBrowser) { document.getElementById('showimage').style.left = 400; document.getElementById('showimage').style.top = 150; } else { document.showimage.moveTo((400),(150)); } showbox(titel,text); } function showbox(titel,text){ if (goodBrowser) { document.getElementById('showimage').style.visibility = "visible"; } else { document.showimage.visibility = "show"; } writeinbox(titel,text); } function writeinbox(titel,text){ if (goodBrowser) { var inhalt = '
' + text + '
'; document.getElementById('showimage').innerHTML = inhalt; } else { var inhalt = '
' + titel + '
+ text +
'; document.showimage.document.open(); document.showimage.document.write(inhalt); document.showimage.document.close(); } }