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 = ""; var mod_showCoords_div_mapObj = null; function init_mod_showCoords_div(ind){ mod_showCoords_div_mapObj = getMapObjByName(mod_showCoords_div_target ); 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(){ mod_showCoords_div_mapObj.getDomElement().onmousemove = mod_showCoords_div_display; mod_showCoords_div_mapObj.getDomElement().onclick = mod_showCoords_div_click; } function mod_showCoords_div_disable(){ mod_showCoords_div_mapObj.getDomElement().onclick = null; mod_showCoords_div_mapObj.getDomElement().onmousemove = null; if(document.getElementById("dependentDiv")){ writeTag("","dependentDiv",""); } } function mod_showCoords_div_click(e){ var click = mod_showCoords_div_mapObj.getMousePosition(e); if (click === null) { return; } var pos = mod_showCoords_div_mapObj.convertPixelToReal(click); mod_showCoords_div_fix = "Selection: " + pos.x + " / " + pos.y; mod_showCoord_write(pos); } function mod_showCoords_div_display(e){ var click = mod_showCoords_div_mapObj.getMousePosition(e); if (click === null) { return; } var pos = mod_showCoords_div_mapObj.convertPixelToReal(click); mod_showCoord_write(pos); } function mod_showCoord_write(pos){ var str = "" + pos.x + " / " + pos.y + ""; if(mod_showCoords_div_fix != ""){ str += "
" + mod_showCoords_div_fix + "
"; } $("#dependentDiv").html(str); }