var mod_showCoords_win = null; var mod_showCoords_elName = "showCoords"; var mod_showCoords_frameName = ""; var mod_showCoords_img_on = new Image(); mod_showCoords_img_on.src = ""; var mod_showCoords_img_off = new Image(); mod_showCoords_img_off.src = ""; var mod_showCoords_img_over = new Image(); mod_showCoords_img_over.src = ""; function init_mod_showCoords(ind){ mb_button[ind] = document.getElementById(mod_showCoords_elName); mb_button[ind].img_over = mod_showCoords_img_over.src; mb_button[ind].img_on = mod_showCoords_img_on.src; mb_button[ind].img_off = mod_showCoords_img_off.src; mb_button[ind].status = 0; mb_button[ind].elName = mod_showCoords_elName; mb_button[ind].fName = mod_showCoords_frameName; mb_button[ind].go = new Function ("mod_showCoords_run()"); mb_button[ind].stop = new Function ("mod_showCoords_disable()"); } function mod_showCoords_run(){ window.frames[mod_showCoords_target].document.onmousemove = mod_showCoords_display; window.frames[mod_showCoords_target].document.onclick = mod_showCoords_click; } function mod_showCoords_disable(){ window.frames[mod_showCoords_target].document.onclick = null; window.frames[mod_showCoords_target].document.onmousemove = null; window.status = ""; } function mod_showCoords_click(e){ mod_showCoords_win = window.open("","","width=150, height=100"); mod_showCoords_win.document.open("text/html"); if(ie){ clickX = window.frames[mod_showCoords_target].event.clientX; clickY = window.frames[mod_showCoords_target].event.clientY; } else{ clickX = e.pageX; clickY = e.pageY; } var pos = makeClickPos2RealWorldPos(mod_showCoords_target, clickX, clickY); mod_showCoords_win.document.write((Math.round(pos[0]*100)/100) + " / " + (Math.round(pos[1]*100)/100)); mod_showCoords_win.document.close(); mod_showCoords_win.focus(); } function mod_showCoords_display(e){ if(ie){ clickX = window.frames[mod_showCoords_target].event.clientX; clickY = window.frames[mod_showCoords_target].event.clientY; } else{ clickX = e.pageX; clickY = e.pageY; } var pos = makeClickPos2RealWorldPos(mod_showCoords_target, clickX, clickY); window.status = pos[0] + " / " + pos[1]; }