rem: for (var i = 0; i < window.frames.length; capwin(window.frames[i++])); 
add: if(document.all) { for (var i = 0; i < window.frames.length; capwin(window.frames[i++])); } 
context: Dialog._geckoOpenModal = function(url, action, init) {    var file = url.substring(url.lastIndexOf('/') + 1, url.lastIndexOf('.'));    var x,y;    switch(file) {        case "insert_image": x = 730; y = 540; break;        case "dlg_ins_smile": x = 330; y = 300; break;        case "dlg_ins_char": x = 480; y = 270; break;        case "select_color": x = 238; y = 188; break;        case "insert_table": x = 420; y = 240; break;        case "link_std":     x = 420; y = 210; break;        case "insert_image_std": x = 450; y = 230; break;        case "createanchor": x = 300; y = 130; break;        default: x = 50; y = 50;    }    var lx = (screen.width - x) / 2;    var tx = (screen.height - y) / 2;    var dlg = window.open(url, "ha_dialog", "toolbar=no,menubar=no,personalbar=no, width="+ x +",height="+ y +",scrollbars=no,resizable=no, left="+ lx +", top="+ tx +"");    Dialog._modal = dlg;    Dialog._arguments = init;    // capture some window's events    function capwin(w) {        HTMLArea._addEvent(w, "click", Dialog._parentEvent);        HTMLArea._addEvent(w, "mousedown", Dialog._parentEvent);        HTMLArea._addEvent(w, "focus", Dialog._parentEvent);    };    // release the captured events    function relwin(w) {        HTMLArea._removeEvent(w, "click", Dialog._parentEvent);        HTMLArea._removeEvent(w, "mousedown", Dialog._parentEvent);        HTMLArea._removeEvent(w, "focus", Dialog._parentEvent);    };    capwin(window);    // capture other frames    for (var i = 0; i < window.frames.length; capwin(window.frames[i++]));    // make up a function to be called when the Dialog ends.    Dialog._return = function (val) {        if (val && action) {            action(val);        }        relwin(window);        // capture other frames        for (var i = 0; i < window.frames.length; relwin(window.frames[i++]));        Dialog._modal = null;    };};
meta: 2641	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2641/361b68b34aa2eb50751c5bf3b891367f2b0f2e5e/dialog.js/clean/lib/editor/dialog.js