try{if(mod_help_color){}}catch(e){mod_help_color = '#cc33cc';} try{if(mod_help_thickness){}}catch(e){mod_help_color = 3;} var mod_help_elName = "help"; var mod_help_str = ""; var mod_help_img_on = new Image(); mod_help_img_on.src = ""; var mod_help_img_off = new Image(); mod_help_img_off.src =""; var mod_help_img_over = new Image(); mod_help_img_over.src = ""; function init_help(ind){ mb_button[ind] = document.getElementById(mod_help_elName); mb_button[ind].img_over = mod_help_img_over.src; mb_button[ind].img_on = mod_help_img_on.src; mb_button[ind].img_off = mod_help_img_off.src; mb_button[ind].status = 0; mb_button[ind].elName = mod_help_elName; mb_button[ind].go = new Function ("mod_help_click()"); mb_button[ind].stop = new Function ("mod_help_disable()"); } function mod_help_click(){ if(!document.getElementById('mod_help_img')){ //create html tags mod_help_set(); //request help string mb_ajax_post("../php/mod_help.php?gui_id=", null, mod_help_set_str); return; } mod_help_set_str(mod_help_str, "success"); } function mod_help_disable(){ document.getElementById('mod_help_img').innerHTML = ''; document.getElementById('mod_help_img').style.width = '0px'; document.getElementById('mod_help_img').style.height = '0px'; document.getElementById('mod_help_draw').innerHTML = ''; mb_disableThisButton(mod_help_elName); } function mod_help_set(){ var helpimg = document.createElement('div'); var tmp = document.body.appendChild(helpimg); tmp.id = 'mod_help_img'; tmp.style.position = 'absolute'; tmp.style.zIndex = '1000'; tmp.style.top = '0px'; tmp.style.left = '0px'; tmp.style.width = '1px'; tmp.style.height='1px'; var helpdraw = document.createElement('div'); var tmp = document.body.appendChild(helpdraw); tmp.id = 'mod_help_draw'; tmp.style.position = 'absolute'; tmp.style.zIndex = '999'; tmp.style.top = '0px'; tmp.style.left = '0px'; tmp.style.width = '0px'; tmp.style.height='0px'; return true; } function mod_help_set_str(str, status){ mod_help_str = str; document.getElementById('mod_help_img').innerHTML = mod_help_str; mod_help_update(); mod_help_draw(); } function mod_help_update(){ //try to update tab coords try{ for(var j=0;j< tabs.count(); j++){ var ta = tabs.get(j); var area = document.getElementById("helpArea_"+ta.module); if(area) area.coords = tabs.getCoords(ta.module); } } catch(e){ } } function mod_help_draw(){ var canvas = new jsGraphics('mod_help_draw'); canvas.setStroke(parseInt(mod_help_thickness)); canvas.setColor(mod_help_color); var my = document.getElementsByName("mod_help_imagemap")[0]; for(var i=0; i