annotate client/digitallibrary/buttons/menu.js @ 107:85126da2ae21 vendor start

XUL: Digilib Buttons in chrome
author engler
date Tue, 13 May 2003 21:02:22 +0200
parents 2aa1205e3b71
children 4f1752d80560
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
107
85126da2ae21 XUL: Digilib Buttons in chrome
engler
parents: 14
diff changeset
1 function checkBrowser() {
85126da2ae21 XUL: Digilib Buttons in chrome
engler
parents: 14
diff changeset
2
85126da2ae21 XUL: Digilib Buttons in chrome
engler
parents: 14
diff changeset
3 this.ua = navigator.userAgent;
85126da2ae21 XUL: Digilib Buttons in chrome
engler
parents: 14
diff changeset
4 this.ver = navigator.appVersion;
85126da2ae21 XUL: Digilib Buttons in chrome
engler
parents: 14
diff changeset
5 this.dom = ( document.getElementById );
85126da2ae21 XUL: Digilib Buttons in chrome
engler
parents: 14
diff changeset
6 this.opera = ( this.dom ) && ( this.ua.toLowerCase().indexOf("opera") > -1 );
85126da2ae21 XUL: Digilib Buttons in chrome
engler
parents: 14
diff changeset
7 this.ie4 = ( document.all ) && ( !this.dom );
85126da2ae21 XUL: Digilib Buttons in chrome
engler
parents: 14
diff changeset
8 this.ie5 = ( this.ver.indexOf("MSIE 5") > -1 ) && ( this.dom );
85126da2ae21 XUL: Digilib Buttons in chrome
engler
parents: 14
diff changeset
9 this.ie6 = ( this.ver.indexOf("MSIE 6") > -1 ) && ( this.dom );
85126da2ae21 XUL: Digilib Buttons in chrome
engler
parents: 14
diff changeset
10 this.ns4 = ( document.layers ) && ( !this.dom );
85126da2ae21 XUL: Digilib Buttons in chrome
engler
parents: 14
diff changeset
11 this.ns6 = ( this.dom ) && ( parseInt(this.ver) >= 5 ) && ( !this.opera );
85126da2ae21 XUL: Digilib Buttons in chrome
engler
parents: 14
diff changeset
12 this.ns = this.ns4 || this.ns6;
85126da2ae21 XUL: Digilib Buttons in chrome
engler
parents: 14
diff changeset
13 this.ie = this.ie4 || this.ie5 || this.ie6;
85126da2ae21 XUL: Digilib Buttons in chrome
engler
parents: 14
diff changeset
14
85126da2ae21 XUL: Digilib Buttons in chrome
engler
parents: 14
diff changeset
15 return this;
85126da2ae21 XUL: Digilib Buttons in chrome
engler
parents: 14
diff changeset
16 }
14
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
17
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
18 browser = new checkBrowser();
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
19
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
20 function changeBc(obj, color){
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
21 var div;
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
22
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
23 if (color == '' && browser.ns4) color = null;
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
24
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
25 if (browser.ns4) div = document.layers[obj];
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
26 else if (browser.dom) div = document.getElementById(obj).style;
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
27 else if (browser.ie) div = document.all[obj].style;
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
28
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
29 if (browser.dom || browser.ie) div.backgroundColor = color;
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
30 if (browser.ns4) div.bgColor = color;
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
31 }
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
32
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
33 function makeArray(n){
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
34 this.length = n;
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
35 for (var i = 0; i < n; i++) {
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
36 this[i] = new Image();
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
37 }
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
38
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
39 return this;
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
40 }
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
41
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
42 function preloadImages() {
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
43 over = new makeArray(document.images.length);
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
44 away = new makeArray(document.images.length);
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
45
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
46 for (i = 0; i < document.images.length; i++) {
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
47 currName = document.images[i].src.slice(0, document.images[i].src.lastIndexOf('.')-1);
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
48 away[i].src = currName + "0.gif";
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
49 over[i].src = currName + "1.gif";
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
50 }
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
51 }
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
52
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
53 function overButton(n) {
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
54 currButton = document.images[n];
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
55
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
56 currButton.src = over[n].src;
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
57 if (showHelp) contextHelp(n);
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
58 }
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
59
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
60 function awayButton(n) {
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
61 currButton = document.images[n];
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
62
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
63 currButton.src = away[n].src;
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
64 }
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
65
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
66 function overItem(obj) {
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
67 changeBc("menu" + obj, '#770000');
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
68 clearTimeout(timeID);
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
69 }
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
70
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
71 function awayItem(obj) {
107
85126da2ae21 XUL: Digilib Buttons in chrome
engler
parents: 14
diff changeset
72 changeBc("menu" + obj, '#666666');
14
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
73 timeID = setTimeout("hideMenu()", 700);
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
74 }
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
75
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
76 var timeID = null;
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
77
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
78 function changeMark(obj) {
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
79 var object;
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
80
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
81 if (browser.ns4) object = document.layers["menu" + obj].document.images[0];
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
82 else if (browser.dom) object = document.getElementById("mark" + obj);
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
83 else if (browser.ie) object = document.all["mark" + obj];
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
84
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
85 var path = object.src.slice(0, object.src.lastIndexOf('/')+1);
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
86
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
87 object.src = (object.src.indexOf("nomark") > -1) ? path + "mark.gif" : path + "nomark.gif";
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
88 }
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
89
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
90 function showMenu(obj) {
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
91 menu(obj, true);
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
92 }
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
93
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
94 function menu(obj, show) {
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
95 var currObj = "menu" + obj;
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
96 var idx = 0;
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
97 while(true) {
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
98 if (browser.ns4 && document.layers[currObj]) document.layers[currObj].visibility = (show) ? "show" : "hide";
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
99 else if (browser.dom && document.getElementById(currObj)) document.getElementById(currObj).style.visibility = (show) ? "visible" : "hidden";
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
100 else if (browser.ie && document.all[currObj]) document.all[currObj].style.visibility = (show) ? "visible" : "hidden";
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
101 else break;
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
102
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
103 currObj = "menu" + obj + (++idx);
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
104 }
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
105 if (!show) activeMenu = '';
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
106 else activeMenu = obj;
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
107
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
108 timeID = setTimeout("hideMenu()", 2000);
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
109 }
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
110
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
111 function hideMenu() {
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
112 if (activeMenu != '') menu(activeMenu, false);
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
113 clearTimeout(timeID);
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
114 }
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
115
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
116 var activeMenu = '';
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
117
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
118
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
119 // just to be sure, that no buffer overflow can arrive
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
120 var semaphor = true;
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
121
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
122 function contextHelp(n) {
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
123
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
124 if (helpWindow.closed) {
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
125 changeMark(31);
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
126 changeHelp();
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
127 return;
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
128 }
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
129
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
130 if ((navigator.appVersion.indexOf("Macintosh") < 0) && semaphor) {
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
131 semaphor = false;
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
132 var help = helpText[n].split("|");
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
133
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
134 helpWindow.focus();
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
135 helpWindow.document.open();
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
136 helpWindow.document.write('<html><head><title>Context Help</title>');
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
137 helpWindow.document.write('<style type="text/css">');
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
138 helpWindow.document.write('.title {font-family: Verdana, sans-serif, Arial; font-size: 12px; font-weight: bold; color: #FFFFFF}');
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
139 helpWindow.document.write('.text {font-family: Verdana, sans-serif, Arial; font-size: 10px; color: #000000}');
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
140 helpWindow.document.write('</style></head><body bgcolor="#CCCCCC" leftmargin="7" topmargin="7" marginwidth="7" marginheight="7" onload="opener.semaphor = true;">');
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
141 helpWindow.document.write('<table width="99%" border="0" cellspacing="0" cellpadding="3"><tr><td bgcolor="#666666" class="title">');
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
142 helpWindow.document.write(help[0] + '</tr><tr><td class="text">');
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
143 helpWindow.document.write(help[1] + '</tr></td></table></body></html>');
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
144 helpWindow.document.close();
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
145
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
146 // stupid workaround because of netscape 6, that doesen't know the opener property
107
85126da2ae21 XUL: Digilib Buttons in chrome
engler
parents: 14
diff changeset
147 // this workaround is still ok because netscape 6 has eventbuffer checks so no overflow
85126da2ae21 XUL: Digilib Buttons in chrome
engler
parents: 14
diff changeset
148 if (browser.ns6) {
14
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
149 semaphor = true;
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
150 }
107
85126da2ae21 XUL: Digilib Buttons in chrome
engler
parents: 14
diff changeset
151
85126da2ae21 XUL: Digilib Buttons in chrome
engler
parents: 14
diff changeset
152 // next stupid workaround because of opera 6, that somehow don't start the 'onLoad'-
85126da2ae21 XUL: Digilib Buttons in chrome
engler
parents: 14
diff changeset
153 // attribute in the body tag (the helpwindow does not finish loading)
85126da2ae21 XUL: Digilib Buttons in chrome
engler
parents: 14
diff changeset
154 if (browser.opera) {
85126da2ae21 XUL: Digilib Buttons in chrome
engler
parents: 14
diff changeset
155 setTimeout("semaphor = true;", 50);
85126da2ae21 XUL: Digilib Buttons in chrome
engler
parents: 14
diff changeset
156 }
85126da2ae21 XUL: Digilib Buttons in chrome
engler
parents: 14
diff changeset
157
14
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
158 }
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
159
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
160 }
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
161
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
162 function openContextHelp() {
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
163 if (navigator.appVersion.indexOf("Macintosh") > -1) {
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
164 openContextHelpMac();
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
165 return;
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
166 }
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
167
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
168 semaphor = false;
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
169
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
170 var winWidth = 270;
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
171 var winHeight = 130;
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
172
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
173 var xScreen = 0.9*(screen.width-winWidth);
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
174 var yScreen = 0.8*(screen.height-winHeight);
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
175
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
176 helpWindow = window.open("", "ContextHelp", "width=" + winWidth + ",height=" + winHeight + ",screenX=" + xScreen + ",screenY=" + yScreen + ",left=" + xScreen + ",top=" + yScreen);
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
177
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
178 helpWindow.focus();
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
179 helpWindow.document.open();
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
180 helpWindow.document.write('<html><head><title>Context Help</title>');
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
181 helpWindow.document.write('<style type="text/css">');
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
182 helpWindow.document.write('.title {font-family: Verdana, sans-serif, Arial; font-size: 12px; font-weight: bold; color: #FFFFFF}');
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
183 helpWindow.document.write('.text {font-family: Verdana, sans-serif, Arial; font-size: 10px; color: #000000}');
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
184 helpWindow.document.write('</style></head><body bgcolor="#CCCCCC" leftmargin="7" topmargin="7" marginwidth="7" marginheight="7">');
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
185 helpWindow.document.write('<table width="99%" border="0" cellspacing="0" cellpadding="3"><tr><td bgcolor="#666666" class="title">');
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
186 helpWindow.document.write('Context Help</tr><tr><td class="text">');
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
187 helpWindow.document.write('Move over any button to get some more information about its function</tr></td></table></body></html>');
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
188 helpWindow.document.close();
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
189
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
190 // for some safety reason help-requests have to be blocked while opening the window
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
191 setTimeout("semaphor = true;", 200);
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
192 }
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
193
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
194 // because macs have a strange window focus behaviour we have to go a special
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
195 // way for them - just opening a window that contains all button-descriptions
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
196 function openContextHelpMac() {
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
197
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
198 var winWidth = 270;
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
199 var winHeight = 600;
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
200
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
201 var xScreen = 0.9*(screen.width-winWidth);
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
202 var yScreen = 0.8*(screen.height-winHeight);
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
203
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
204 helpWindow = window.open("", "ContextHelp", "width=" + winWidth + ",height=" + winHeight + ",screenX=" + xScreen + ",screenY=" + yScreen + ",left=" + xScreen + ",top=" + yScreen + ",scrollbars");
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
205
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
206 helpWindow.focus();
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
207 helpWindow.document.open();
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
208 helpWindow.document.write('<html><head><title>Context Help Macintosh</title>');
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
209 helpWindow.document.write('<style type="text/css">');
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
210 helpWindow.document.write('.title {font-family: Verdana, sans-serif, Arial; font-size: 12px; font-weight: bold; color: #FFFFFF}');
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
211 helpWindow.document.write('.text {font-family: Verdana, sans-serif, Arial; font-size: 10px; color: #000000}');
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
212 helpWindow.document.write('</style></head><body bgcolor="#CCCCCC" leftmargin="7" topmargin="7" marginwidth="7" marginheight="7">');
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
213 helpWindow.document.write('<table width="99%" border="0" cellspacing="0" cellpadding="3">');
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
214
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
215 for (n = 0; n < helpText.length; n++) {
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
216
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
217 help = helpText[n].split("|");
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
218 helpWindow.document.write('<tr><td bgcolor="#666666" class="title">');
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
219 helpWindow.document.write(help[0] + '</tr><tr><td class="text">');
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
220 helpWindow.document.write('<p>' + help[1] + '<br>&nbsp;</p></tr></td>');
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
221 }
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
222 helpWindow.document.write('</table></body></html>');
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
223 helpWindow.document.close();
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
224 }
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
225
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
226
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
227 function closeContextHelp() {
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
228 if (helpWindow != '' && !helpWindow.closed) {
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
229 helpWindow.close();
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
230 }
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
231 helpWindow = '';
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
232 }
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
233
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
234 function changeHelp() {
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
235 showHelp = !showHelp;
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
236 showHelp ? openContextHelp() : closeContextHelp();
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
237 }
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
238
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
239
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
240 // variable containing the contextwindow
2aa1205e3b71 First import of client module
robcast
parents:
diff changeset
241 var helpWindow = '';