var mod_showCoords_div_win = null; var mod_showCoords_div_elName = "showCoords_div"; var mod_showCoords_div_frameName = ""; var mod_showCoords_div_img_on = new Image(); mod_showCoords_div_img_on.src = ""; var mod_showCoords_div_img_off = new Image(); mod_showCoords_div_img_off.src = ""; var mod_showCoords_div_img_over = new Image(); mod_showCoords_div_img_over.src = ""; var mod_showCoords_div_fix = ""; function init_mod_showCoords_div(ind){ mb_button[ind] = document.getElementById(mod_showCoords_div_elName); mb_button[ind].img_over = mod_showCoords_div_img_over.src; mb_button[ind].img_on = mod_showCoords_div_img_on.src; mb_button[ind].img_off = mod_showCoords_div_img_off.src; mb_button[ind].status = 0; mb_button[ind].elName = mod_showCoords_div_elName; mb_button[ind].fName = mod_showCoords_div_frameName; mb_button[ind].go = new Function ("mod_showCoords_div_run()"); mb_button[ind].stop = new Function ("mod_showCoords_div_disable()"); } function mod_showCoords_div_run(){ window.frames[mod_showCoords_div_target].document.onmousemove = mod_showCoords_div_display; window.frames[mod_showCoords_div_target].document.onclick = mod_showCoords_div_click; } function mod_showCoords_div_disable(){ window.frames[mod_showCoords_div_target].document.onclick = null; window.frames[mod_showCoords_div_target].document.onmousemove = null; if(document.getElementById("dependentDiv")){ writeTag("","dependentDiv",""); } } function mod_showCoords_div_click(e){ if(ie){ clickX = window.frames[mod_showCoords_div_target].event.clientX; clickY = window.frames[mod_showCoords_div_target].event.clientY; } else{ clickX = e.pageX; clickY = e.pageY; } var pos = makeClickPos2RealWorldPos(mod_showCoords_div_target, clickX, clickY); mod_showCoords_div_fix = "Selection: " + pos[0] + " / " + pos[1]; mod_showCoord_write(pos[0],pos[1]); } function mod_showCoords_div_display(e){ if(ie){ clickX = window.frames[mod_showCoords_div_target].event.clientX; clickY = window.frames[mod_showCoords_div_target].event.clientY; } else{ clickX = e.pageX; clickY = e.pageY; } var pos = makeClickPos2RealWorldPos(mod_showCoords_div_target, clickX, clickY); mod_showCoord_write(pos[0],pos[1]); } function mod_showCoord_write(x,y){ if(document.getElementById("dependentDiv")){ var str = x + " / " + y; if(mod_showCoords_div_fix != ""){ str += "
" + mod_showCoords_div_fix + "
"; } writeTag("","dependentDiv", str); } }