1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
|
var child = new Object();
child.win = null;
var reloadtimer = null
var resizer = null;
var resized = null;
var resizex = 0;
var resizey = 0;
if (navigator.appName.indexOf('Netscape') >= 0) {
if (navigator.appVersion.substr(0,1) < 5) {
isW3C = false;
isIE = false;
sEvent='e';
sKey='.which';
yRef='.top';
xRef='.left';
xOff='.clip.width';
yOff='.clip.height';
xEvent='.pageX';
yEvent='.pageY';
dS='document.';
sD='';
sHideV="'hide'";
sShowV="'show'";
dRef='self';
hRef='.innerHeight';
wRef='.innerWidth';
xSRef='.screenX';
ySRef='.screenY';
xPos=dRef+'.pageXOffset';
yPos=dRef+'.pageYOffset';
eSrc='.target';
} else {
isW3C = true;
isIE = false;
sEvent='e';
sKey='.which';
yRef='.top';
xRef='.left';
xOff='.offsetWidth';
yOff='.offsetHeight';
xEvent='.pageX';
yEvent='.pageY';
dS='document.';
sD='.style';
sHideV="'hidden'";
sShowV="'visible'";
dRef='self';
hRef='.innerHeight';
wRef='.innerWidth';
xSRef='.screenX';
ySRef='.screenY';
xPos=dRef+'.pageXOffset';
yPos=dRef+'.pageYOffset';
eSrc='.target';
}
}
else {
isIE = true;
isW3C = 0;
sEvent='window.event';
sKey='.keyCode';
yRef='.pixelTop';
xRef='.pixelLeft';
xOff='.offsetWidth';
yOff='.offsetHeight';
xEvent='.clientX';
yEvent='.clientY';
dS='';
sD='.style';
sHideV="'hidden'";
sShowV="'visible'";
dRef='document.body';
hRef='.clientHeight';
wRef='.clientWidth';
xPos=dRef+'.scrollLeft';
yPos=dRef+'.scrollTop';
xSRef='.screenLeft';
ySRef='.screenTop';
eSrc='.srcElement';
}
function setLayout() {
updateLayout();
}
function updateLayout() {
var yy = eval(yPos);
yy += Math.max(64 - yy, 0);
moveLayerY(getLayer('tasks'),yy);
setTimeout('updateLayout()',100);
}
function setResize(f,w) {
document.resized = (f) ? f : doResize;
document.resizex = getDisplayWidth();
document.resizey = getDisplayHeight();
if (isIE){
document.resizer = (w) ? w : null;
window.onresize = armResize;
}
else{
window.onresize = document.resized;
}
}
function armResize(e) {
if(document.resizer) document.resizer(e);
document.onmouseover = document.resized;
}
function doResize(e) {
if(!(document.resizex == getDisplayWidth() && document.resizey == getDisplayHeight())){
var newurl = window.location.href.replace(/\?.*$/, '');
document.onmouseover = null;
window.location.replace(newurl+'?ppg='+getResizedLines(e));
}
}
function getResizedLines(e) {
var h = (isW3C || document.all) ? eval(dRef+hRef) : e.height;
return Math.max(Math.floor((h - 66) / getIndexHeight()) - 1, 2);
}
function getDisplayWidth() {
return eval(dRef+wRef);
}
function getDisplayHeight() {
return eval(dRef+hRef);
}
function getWindowX() {
return eval('window'+xSRef);
}
function getWindowY() {
return eval('window'+ySRef);
}
function showElement(o) {
eval('o'+sD+'.visibility = '+sShowV);
}
function hideElement(o) {
eval('o'+sD+'.visibility = '+sHideV);
}
function isElementDisplayed(o) {
var d = eval('o'+sD+'.display');
return (d == 'block');
}
function displayElement(o) {
eval('o'+sD+'.display = "block"');
}
function concealElement(o) {
eval('o'+sD+'.display = "none"');
}
function getScrollAbove() {
return(eval(yPos));
}
function getScrollLeft() {
return(eval(xPos));
}
function layerWalk(l,t) {
var o;
for(var i = 0; i < l.length; i++){
o = eval('l[i]'+t);
if(o) return o;
o = layerWalk(l[i].document.layers,t);
if(o) return o;
}
return null;
}
function getImage(id) {
if(isW3C)
return document.getElementById(id);
else if(isIE)
return document.all[id];
else if(window.document.images[id])
return window.document.images[id];
else
return layerWalk(window.document.layers,'.document.images.'+id);
}
function getImageX(o) {
if(isIE || isW3C){
var x = o.offsetLeft;
for(var p = o.offsetParent; p != null; p = p.offsetParent)
x += p.offsetLeft;
return x;
}
else
return o.x;
}
function getImageY(o) {
if(isIE || isW3C){
var y = o.offsetTop;
for(var p = o.offsetParent; p != null; p = p.offsetParent)
y += p.offsetTop;
return y;
}
else
return o.y;
}
function getLayer(id) {
if(isW3C)
return document.getElementById(id);
else if(isIE)
return document.all[id];
else if(window.document.layers[id])
return window.document.layers[id];
else
return layerWalk(window.document.layers,'.document.layers.'+id);
}
function getElementWidth(l){
return l.width;
}
function getLayerHeight(l){
return eval('l'+yOff);
}
function getLayerWidth(l){
return eval('l'+xOff);
}
function getLayerX(l) {
return eval('l'+sD+xRef);
}
function getLayerY(l) {
return eval('l'+sD+yRef);
}
function moveLayerX(l,left) {
eval ('l'+sD+xRef+'='+left);
}
function moveLayerY(l,top) {
eval ('l'+sD+yRef+'='+top);
}
function moveLayer(l,left,top) {
moveLayerX(l,left);
moveLayerY(l,top);
}
function setLayerText(l,t) {
if(isIE || isW3C){
l.innerHTML = t;
}
else{
l.document.open();
l.document.write(t);
l.document.close();
}
}
function getEvent(e) {
return eval(sEvent);
}
function getEventElement(e) {
return eval('getEvent(e)'+eSrc);
}
function getEventX(e) {
return eval('getEvent(e)'+xEvent);
}
function getEventY(e) {
return eval('getEvent(e)'+yEvent);
}
function getKeyCode(e) {
return eval('getEvent(e)'+sKey);
}
function getControlKey(e) {
if(isW3C || isIE){
return getEvent(e).ctrlKey;
}
else{
return (e.modifiers & Event.CONTROL_MASK) != 0;
}
}
function getKeyStr(e) {
return String.fromCharCode(getKeyCode(e)).toLowerCase();
}
function focuschild() {
var rv = false;
var ourif = 'child.win.focus(); rv = true;';
var ourelse = 'child.win = null; window.onfocus = null;';
if(isIE && js_version >= 1.3){
eval('try {'+ourif+'} catch (all) {'+ourelse+'}');
}
else{
eval('if((child.win == null) || (child.win.closed)){'+ourelse+'}else{'+ourif+'}');
}
return rv;
}
function cOpen(u,n,a,w,h) {
if(!focuschild()){
var xWin = getWindowX(), yWin = getWindowY();
var wPage = getDisplayWidth(), hPage = getDisplayHeight();;
var x = Math.min(window.screen.width - wPage, Math.max(0, xWin + ((wPage - w)/2)));
var y = Math.min(window.screen.height - hPage, Math.max(0, yWin + ((hPage - h)/2)));
var f = a ? a+',' : '';
var now = new Date();
child.win = window.open(u,n+now.getTime(),f+'width='+w+',height='+h+',screenX='+x+',screenY='+y+',top='+y+',left='+x);
window.onfocus = focuschild;
}
return child.win;
}
function cnOpen(u,n,a,w,h) {
var xOffset = (window.screen.width - w)/2, yOffset = (window.screen.height - h)/2;
window.open(u,n,a+',width='+w+',height='+h+',screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset);
}
function composeMsg(f,d,k) {
var s = 'compose.tcl', replace = 0;
switch(f) {
//case 'reply' : if(confirm('Include all recipients in Reply') == true) c = '?style=ReplyAll&uid='+d ; else c = '?style=Reply&uid='+d ; break;
case 'reply' : s='reply.tcl'; c = '?style=ReplyAll&uid='+d+'&cid='+k ; break;
case 'fwd' : c = '?style=Forward&uid='+d+'&cid='+k ; break;
case 'mailto' : c = '?to='+d+'&cid='+k ; break;
case 'nickto' : c = '?nickto='+d+'&cid='+k ; replace = 1; break;
default : c = '?cid='+k ; break;
}
if(!replace)
cOpen(s+c, 'compose', 'scrollbars=yes,resizable=yes', 800, 560);
else
window.location.href = s + c;
return false;
}
function isanum(s) {
if(s.length == 0)
return false;
for(var i = 0; i < s.length; i++)
if(s.charCodeAt(i) < 48 || s.charCodeAt(i) > 57)
return false;
return true;
}
function confOpen(s) {cOpen(s,'config','scrollbars=yes',800,560); return false;}
function abookOpen(s) {cOpen(s,'addrbook','scrollbars=yes,resizable=yes',800,560); return false;}
function helpOpen(s) {cOpen(s,'help','scrollbars=yes,resizable=yes',600,600); return false;}
function aeOpen(s) {cOpen(s, 'addredit', 'scrollbars=yes,resizable=yes', 700, 500); return false}
function taOpen(s) {cOpen(s, 'takeaddr', 'scrollbars=yes,resizable=yes', 700, 500); return false}
function quitOpen(s) {cOpen(s, 'quit', '', 420, 200); return false}
function doReload(ival) {
if((child.win == null) || (child.win.closed)){
var newurl = window.location.href.replace(/\?.*$/, '');
window.location.replace(newurl+'?reload=1');
}
else{
var i = getImage('logo');
if(i){
var now = new Date();
var t = new String();
t += now.getYear();
t += now.getMonth();
t += now.getDate();
t += now.getHours();
t += now.getMinutes();
t += now.getSeconds();
i.src = location.href.replace(/(.*)\/[^\/]*\.tcl.*/,'$1/ping.tcl/'+t+'/'+ival+'/'+(t - (t % ival))+'.gif');
}
}
}
function reloadTimer(s) {
reloadtimer = window.setInterval('doReload('+s+')', s * 1000);
}
function wp_escape(s) {
var t = escape(s);
t = t.replace(/\+/, '%2b');
return t;
}
function flipCheck(eid){
var cb = window.document.getElementById(eid);
if(cb) cb.checked = !cb.checked;
return false;
}
|