1 // From Ted's Mozilla page: http://ted.mielczarek.org/code/mozilla/index.html
2 // Modified by Jason for Evergreen to push in the main (auth) window reference
10 if(xwin) // for some reason onload gets called when the browser refreshes???
14 document.getElementById('ta').select();
20 xwin = window.open('about:blank', 'xulwin', 'chrome,all,resizable=yes,width=400,height=400');
25 function toggleBrowser(show)
27 document.getElementById("split").collapsed = !show;
28 document.getElementById("content").collapsed = !show;
29 document.getElementById("open").collapsed = !show;
34 var textarea = document.getElementById("ta");
36 // either this is the first time, or
37 // they closed the window
38 if(xwin == null || (xwin instanceof Window && xwin.document == null)) {
40 xwin = document.getElementById("content");
44 if (old != textarea.value || newwin) {
47 var dataURI = "data:application/vnd.mozilla.xul+xml," + encodeURIComponent(old);
48 if(xwin instanceof Window)
49 xwin.document.location = dataURI;
51 xwin.setAttribute("src",dataURI);
53 try { xwin.contentWindow.mw = mw; } catch(E) {}
54 try { xwin.mw = mw; } catch(E) {}
56 timeout = window.setTimeout(update, 500);
59 function resetTimeout()
62 window.clearTimeout(timeout);
64 timeout = window.setTimeout(update, 500);