minor bug fix
[openemr.git] / library / overlib_mini.js
blob3cb511e79ed48319cfc7a9e731f2ce4540515d59
1 // <script language="javascript">
2 //\//////////////////////////////////////////////////////////////////////////////////
3 //\  overLIB 3.50  --  This notice must remain untouched at all times.
4 //\  Copyright Erik Bosrup 1998-2001. All rights reserved.
5 //\  THIS IS A VERY MODIFIED VERSION. DO NOT EDIT OR PUBLISH. GET THE ORIGINAL!
6 var INARRAY=1;
7 var CAPARRAY=2;
8 var STICKY=3;
9 var BACKGROUND=4;
10 var NOCLOSE=5;
11 var CAPTION=6;
12 var LEFT=7;
13 var RIGHT=8;
14 var CENTER=9;
15 var OFFSETX=10;
16 var OFFSETY=11;
17 var FGCOLOR=12;
18 var BGCOLOR=13;
19 var TEXTCOLOR=14;
20 var CAPCOLOR=15;
21 var CLOSECOLOR=16;
22 var WIDTH=17;
23 var BORDER=18;
24 var STATUS=19;
25 var AUTOSTATUS=20;
26 var AUTOSTATUSCAP=21;
27 var HEIGHT=22;
28 var CLOSETEXT=23;
29 var SNAPX=24;
30 var SNAPY=25;
31 var FIXX=26;
32 var FIXY=27;
33 var FGBACKGROUND=28;
34 var BGBACKGROUND=29;
35 var PADX=30;// PADX2 out
36 var PADY=31;// PADY2 out
37 var FULLHTML=34;
38 var ABOVE=35;
39 var BELOW=36;
40 var CAPICON=37;
41 var TEXTFONT=38;
42 var CAPTIONFONT=39;
43 var CLOSEFONT=40;
44 var TEXTSIZE=41;
45 var CAPTIONSIZE=42;
46 var CLOSESIZE=43;
47 var FRAME=44;
48 var TIMEOUT=45;
49 var FUNCTION=46;
50 var DELAY=47;
51 var HAUTO=48;
52 var VAUTO=49;
53 var CLOSECLICK=50;
54 var CSSOFF=51;
55 var CSSSTYLE=52;
56 var CSSCLASS=53;
57 var FGCLASS=54;
58 var BGCLASS=55;
59 var TEXTFONTCLASS=56;
60 var CAPTIONFONTCLASS=57;
61 var CLOSEFONTCLASS=58;
62 var PADUNIT=59;
63 var HEIGHTUNIT=60;
64 var WIDTHUNIT=61;
65 var TEXTSIZEUNIT=62;
66 var TEXTDECORATION=63;
67 var TEXTSTYLE=64;
68 var TEXTWEIGHT=65;
69 var CAPTIONSIZEUNIT=66;
70 var CAPTIONDECORATION=67;
71 var CAPTIONSTYLE=68;
72 var CAPTIONWEIGHT=69;
73 var CLOSESIZEUNIT=70;
74 var CLOSEDECORATION=71;
75 var CLOSESTYLE=72;
76 var CLOSEWEIGHT=73;
77 if(typeof ol_fgcolor=='undefined'){var ol_fgcolor="#CCCCFF";}
78 if(typeof ol_bgcolor=='undefined'){var ol_bgcolor="#333399";}
79 if(typeof ol_textcolor=='undefined'){var ol_textcolor="#000000";}
80 if(typeof ol_capcolor=='undefined'){var ol_capcolor="#FFFFFF";}
81 if(typeof ol_closecolor=='undefined'){var ol_closecolor="#9999FF";}
82 if(typeof ol_textfont=='undefined'){var ol_textfont="Verdana,Arial,Helvetica";}
83 if(typeof ol_captionfont=='undefined'){var ol_captionfont="Verdana,Arial,Helvetica";}
84 if(typeof ol_closefont=='undefined'){var ol_closefont="Verdana,Arial,Helvetica";}
85 if(typeof ol_textsize=='undefined'){var ol_textsize="1";}
86 if(typeof ol_captionsize=='undefined'){var ol_captionsize="1";}
87 if(typeof ol_closesize=='undefined'){var ol_closesize="1";}
88 if(typeof ol_width=='undefined'){var ol_width="200";}
89 if(typeof ol_border=='undefined'){var ol_border="1";}
90 if(typeof ol_offsetx=='undefined'){var ol_offsetx=10;}
91 if(typeof ol_offsety=='undefined'){var ol_offsety=10;}
92 if(typeof ol_text=='undefined'){var ol_text="Default Text";}
93 if(typeof ol_cap=='undefined'){var ol_cap="";}
94 if(typeof ol_sticky=='undefined'){var ol_sticky=0;}
95 if(typeof ol_background=='undefined'){var ol_background="";}
96 if(typeof ol_close=='undefined'){var ol_close="Close";}
97 if(typeof ol_hpos=='undefined'){var ol_hpos=8;}
98 if(typeof ol_status=='undefined'){var ol_status="";}
99 if(typeof ol_autostatus=='undefined'){var ol_autostatus=0;}
100 if(typeof ol_height=='undefined'){var ol_height=-1;}
101 if(typeof ol_snapx=='undefined'){var ol_snapx=0;}
102 if(typeof ol_snapy=='undefined'){var ol_snapy=0;}
103 if(typeof ol_fixx=='undefined'){var ol_fixx=-1;}
104 if(typeof ol_fixy=='undefined'){var ol_fixy=-1;}
105 if(typeof ol_fgbackground=='undefined'){var ol_fgbackground="";}
106 if(typeof ol_bgbackground=='undefined'){var ol_bgbackground="";}
107 if(typeof ol_padxl=='undefined'){var ol_padxl=1;}
108 if(typeof ol_padxr=='undefined'){var ol_padxr=1;}
109 if(typeof ol_padyt=='undefined'){var ol_padyt=1;}
110 if(typeof ol_padyb=='undefined'){var ol_padyb=1;}
111 if(typeof ol_fullhtml=='undefined'){var ol_fullhtml=0;}
112 if(typeof ol_vpos=='undefined'){var ol_vpos=36;}
113 if(typeof ol_aboveheight=='undefined'){var ol_aboveheight=0;}
114 if(typeof ol_caption=='undefined'){var ol_capicon="";}
115 if(typeof ol_frame=='undefined'){var ol_frame=self;}
116 if(typeof ol_timeout=='undefined'){var ol_timeout=0;}
117 if(typeof ol_function=='undefined'){var ol_function=Function();}
118 if(typeof ol_delay=='undefined'){var ol_delay=0;}
119 if(typeof ol_hauto=='undefined'){var ol_hauto=0;}
120 if(typeof ol_vauto=='undefined'){var ol_vauto=0;}
121 if(typeof ol_closeclick=='undefined'){var ol_closeclick=0;}
122 if(typeof ol_css=='undefined'){var ol_css=51;}
123 if(typeof ol_fgclass=='undefined'){var ol_fgclass="";}
124 if(typeof ol_bgclass=='undefined'){var ol_bgclass="";}
125 if(typeof ol_textfontclass=='undefined'){var ol_textfontclass="";}
126 if(typeof ol_captionfontclass=='undefined'){var ol_captionfontclass="";}
127 if(typeof ol_closefontclass=='undefined'){var ol_closefontclass="";}
128 if(typeof ol_padunit=='undefined'){var ol_padunit="px";}
129 if(typeof ol_heightunit=='undefined'){var ol_heightunit="px";}
130 if(typeof ol_widthunit=='undefined'){var ol_widthunit="px";}
131 if(typeof ol_textsizeunit=='undefined'){var ol_textsizeunit="px";}
132 if(typeof ol_textdecoration=='undefined'){var ol_textdecoration="none";}
133 if(typeof ol_textstyle=='undefined'){var ol_textstyle="normal";}
134 if(typeof ol_textweight=='undefined'){var ol_textweight="normal";}
135 if(typeof ol_captionsizeunit=='undefined'){var ol_captionsizeunit="px";}
136 if(typeof ol_captiondecoration=='undefined'){var ol_captiondecoration="none";}
137 if(typeof ol_captionstyle=='undefined'){var ol_captionstyle="normal";}
138 if(typeof ol_captionweight=='undefined'){var ol_captionweight="bold";}
139 if(typeof ol_closesizeunit=='undefined'){var ol_closesizeunit="px";}
140 if(typeof ol_closedecoration=='undefined'){var ol_closedecoration="none";}
141 if(typeof ol_closestyle=='undefined'){var ol_closestyle="normal";}
142 if(typeof ol_closeweight=='undefined'){var ol_closeweight="normal";}
143 if(typeof ol_texts=='undefined'){var ol_texts=new Array("Text 0", "Text 1");}
144 if(typeof ol_caps=='undefined'){var ol_caps=new Array("Caption 0", "Caption 1");}
145 var otext="";
146 var ocap="";
147 var osticky=0;
148 var obackground="";
149 var oclose="Close";
150 var ohpos=8;
151 var ooffsetx=2;
152 var ooffsety=2;
153 var ofgcolor="";
154 var obgcolor="";
155 var otextcolor="";
156 var ocapcolor="";
157 var oclosecolor="";
158 var owidth=100;
159 var oborder=1;
160 var ostatus="";
161 var oautostatus=0;
162 var oheight=-1;
163 var osnapx=0;
164 var osnapy=0;
165 var ofixx=-1;
166 var ofixy=-1;
167 var ofgbackground="";
168 var obgbackground="";
169 var opadxl=0;
170 var opadxr=0;
171 var opadyt=0;
172 var opadyb=0;
173 var ofullhtml=0;
174 var ovpos=36;
175 var oaboveheight=0;
176 var ocapicon="";
177 var otextfont="Verdana,Arial,Helvetica";
178 var ocaptionfont="Verdana,Arial,Helvetica";
179 var oclosefont="Verdana,Arial,Helvetica";
180 var otextsize="1";
181 var ocaptionsize="1";
182 var oclosesize="1";
183 var oframe=self;
184 var otimeout=0;
185 var otimerid=0;
186 var oallowmove=0;
187 var ofunction=Function();
188 var odelay=0;
189 var odelayid=0;
190 var ohauto=0;
191 var ovauto=0;
192 var ocloseclick=0;
193 var ocss=51;
194 var ofgclass="";
195 var obgclass="";
196 var otextfontclass="";
197 var ocaptionfontclass="";
198 var oclosefontclass="";
199 var opadunit="px";
200 var oheightunit="px";
201 var owidthunit="px";
202 var otextsizeunit="px";
203 var otextdecoration="";
204 var otextstyle="";
205 var otextweight="";
206 var ocaptionsizeunit="px";
207 var ocaptiondecoration="";
208 var ocaptionstyle="";
209 var ocaptionweight="";
210 var oclosesizeunit="px";
211 var oclosedecoration="";
212 var oclosestyle="";
213 var ocloseweight="";
214 var ox=0;
215 var oy=0;
216 var oallow=0;
217 var oshowingsticky=0;
218 var oremovecounter=0;
219 var over=null;
220 var ns4=(document.layers)? true:false;
221 var ns6=(document.getElementById)? true:false;
222 var ie4=(document.all)? true:false;
223 var ie5=false;
224 if(ie4){
225 if((navigator.userAgent.indexOf('MSIE 5')> 0)||(navigator.userAgent.indexOf('MSIE 6')> 0)){
226 ie5=true;
228 if(ns6){
229 ns6=false;
232 if((ns4)||(ie4)||(ns6)){
233 document.onmousemove=mouseMove
234 if(ns4)document.captureEvents(Event.MOUSEMOVE)
235 }else{
236 overlib=no_overlib;
237 nd=no_overlib;
238 ver3fix=true;
240 function no_overlib(){
241 return ver3fix;
243 function overlib(){
244 otext=ol_text;
245 ocap=ol_cap;
246 osticky=ol_sticky;
247 obackground=ol_background;
248 oclose=ol_close;
249 ohpos=ol_hpos;
250 ooffsetx=ol_offsetx;
251 ooffsety=ol_offsety;
252 ofgcolor=ol_fgcolor;
253 obgcolor=ol_bgcolor;
254 otextcolor=ol_textcolor;
255 ocapcolor=ol_capcolor;
256 oclosecolor=ol_closecolor;
257 owidth=ol_width;
258 oborder=ol_border;
259 ostatus=ol_status;
260 oautostatus=ol_autostatus;
261 oheight=ol_height;
262 osnapx=ol_snapx;
263 osnapy=ol_snapy;
264 ofixx=ol_fixx;
265 ofixy=ol_fixy;
266 ofgbackground=ol_fgbackground;
267 obgbackground=ol_bgbackground;
268 opadxl=ol_padxl;
269 opadxr=ol_padxr;
270 opadyt=ol_padyt;
271 opadyb=ol_padyb;
272 ofullhtml=ol_fullhtml;
273 ovpos=ol_vpos;
274 oaboveheight=ol_aboveheight;
275 ocapicon=ol_capicon;
276 otextfont=ol_textfont;
277 ocaptionfont=ol_captionfont;
278 oclosefont=ol_closefont;
279 otextsize=ol_textsize;
280 ocaptionsize=ol_captionsize;
281 oclosesize=ol_closesize;
282 otimeout=ol_timeout;
283 ofunction=ol_function;
284 odelay=ol_delay;
285 ohauto=ol_hauto;
286 ovauto=ol_vauto;
287 ocloseclick=ol_closeclick;
288 ocss=ol_css;
289 ofgclass=ol_fgclass;
290 obgclass=ol_bgclass;
291 otextfontclass=ol_textfontclass;
292 ocaptionfontclass=ol_captionfontclass;
293 oclosefontclass=ol_closefontclass;
294 opadunit=ol_padunit;
295 oheightunit=ol_heightunit;
296 owidthunit=ol_widthunit;
297 otextsizeunit=ol_textsizeunit;
298 otextdecoration=ol_textdecoration;
299 otextstyle=ol_textstyle;
300 otextweight=ol_textweight;
301 ocaptionsizeunit=ol_captionsizeunit;
302 ocaptiondecoration=ol_captiondecoration;
303 ocaptionstyle=ol_captionstyle;
304 ocaptionweight=ol_captionweight;
305 oclosesizeunit=ol_closesizeunit;
306 oclosedecoration=ol_closedecoration;
307 oclosestyle=ol_closestyle;
308 ocloseweight=ol_closeweight;
309 if((ns4)||(ie4)||(ns6)){
310 oframe=ol_frame;
311 if(ns4)over=oframe.document.overDiv
312 if(ie4)over=oframe.overDiv.style
313 if(ns6)over=oframe.document.getElementById("overDiv");
315 var c=-1;
316 var ar=arguments;
317 for(i=0;i < ar.length;i++){
318 if(c < 0){
319 if(ar[i]==1){
320 otext=ol_texts[ar[++i]];
321 }else{
322 otext=ar[i];
324 c=0;
325 }else{
326 if(ar[i]==1){otext=ol_texts[ar[++i]];continue;}
327 if(ar[i]==2){ocap=ol_caps[ar[++i]];continue;}
328 if(ar[i]==3){osticky=1;continue;}
329 if(ar[i]==4){obackground=ar[++i];continue;}
330 if(ar[i]==NOCLOSE){oclose="";continue;}
331 if(ar[i]==6){ocap=ar[++i];continue;}
332 if(ar[i]==9 || ar[i]==7 || ar[i]==8){ohpos=ar[i];continue;}
333 if(ar[i]==10){ooffsetx=ar[++i];continue;}
334 if(ar[i]==11){ooffsety=ar[++i];continue;}
335 if(ar[i]==12){ofgcolor=ar[++i];continue;}
336 if(ar[i]==13){obgcolor=ar[++i];continue;}
337 if(ar[i]==14){otextcolor=ar[++i];continue;}
338 if(ar[i]==15){ocapcolor=ar[++i];continue;}
339 if(ar[i]==16){oclosecolor=ar[++i];continue;}
340 if(ar[i]==17){owidth=ar[++i];continue;}
341 if(ar[i]==18){oborder=ar[++i];continue;}
342 if(ar[i]==19){ostatus=ar[++i];continue;}
343 if(ar[i]==20){oautostatus=1;continue;}
344 if(ar[i]==21){oautostatus=2;continue;}
345 if(ar[i]==22){oheight=ar[++i];oaboveheight=ar[i];continue;}// Same param again.
346 if(ar[i]==23){oclose=ar[++i];continue;}
347 if(ar[i]==24){osnapx=ar[++i];continue;}
348 if(ar[i]==25){osnapy=ar[++i];continue;}
349 if(ar[i]==26){ofixx=ar[++i];continue;}
350 if(ar[i]==27){ofixy=ar[++i];continue;}
351 if(ar[i]==28){ofgbackground=ar[++i];continue;}
352 if(ar[i]==29){obgbackground=ar[++i];continue;}
353 if(ar[i]==30){opadxl=ar[++i];opadxr=ar[++i];continue;}
354 if(ar[i]==31){opadyt=ar[++i];opadyb=ar[++i];continue;}
355 if(ar[i]==34){ofullhtml=1;continue;}
356 if(ar[i]==36 || ar[i]==35){ovpos=ar[i];continue;}
357 if(ar[i]==37){ocapicon=ar[++i];continue;}
358 if(ar[i]==38){otextfont=ar[++i];continue;}
359 if(ar[i]==39){ocaptionfont=ar[++i];continue;}
360 if(ar[i]==40){oclosefont=ar[++i];continue;}
361 if(ar[i]==41){otextsize=ar[++i];continue;}
362 if(ar[i]==42){ocaptionsize=ar[++i];continue;}
363 if(ar[i]==43){oclosesize=ar[++i];continue;}
364 if(ar[i]==44){opt_FRAME(ar[++i]);continue;}
365 if(ar[i]==45){otimeout=ar[++i];continue;}
366 if(ar[i]==46){opt_FUNCTION(ar[++i]);continue;}
367 if(ar[i]==47){odelay=ar[++i];continue;}
368 if(ar[i]==48){ohauto=(ohauto==0)? 1 : 0;continue;}
369 if(ar[i]==49){ovauto=(ovauto==0)? 1 : 0;continue;}
370 if(ar[i]==50){ocloseclick=(ocloseclick==0)? 1 : 0;continue;}
371 if(ar[i]==51){ocss=ar[i];continue;}
372 if(ar[i]==52){ocss=ar[i];continue;}
373 if(ar[i]==53){ocss=ar[i];continue;}
374 if(ar[i]==54){ofgclass=ar[++i];continue;}
375 if(ar[i]==55){obgclass=ar[++i];continue;}
376 if(ar[i]==56){otextfontclass=ar[++i];continue;}
377 if(ar[i]==57){ocaptionfontclass=ar[++i];continue;}
378 if(ar[i]==58){oclosefontclass=ar[++i];continue;}
379 if(ar[i]==59){opadunit=ar[++i];continue;}
380 if(ar[i]==60){oheightunit=ar[++i];continue;}
381 if(ar[i]==61){owidthunit=ar[++i];continue;}
382 if(ar[i]==62){otextsizeunit=ar[++i];continue;}
383 if(ar[i]==63){otextdecoration=ar[++i];continue;}
384 if(ar[i]==64){otextstyle=ar[++i];continue;}
385 if(ar[i]==65){otextweight=ar[++i];continue;}
386 if(ar[i]==66){ocaptionsizeunit=ar[++i];continue;}
387 if(ar[i]==67){ocaptiondecoration=ar[++i];continue;}
388 if(ar[i]==68){ocaptionstyle=ar[++i];continue;}
389 if(ar[i]==69){ocaptionweight=ar[++i];continue;}
390 if(ar[i]==70){oclosesizeunit=ar[++i];continue;}
391 if(ar[i]==71){oclosedecoration=ar[++i];continue;}
392 if(ar[i]==72){oclosestyle=ar[++i];continue;}
393 if(ar[i]==73){ocloseweight=ar[++i];continue;}
396 if(odelay==0){
397 return overlib350();
398 }else{
399 odelayid=setTimeout("overlib350()", odelay);
400 if(osticky){
401 return false;
402 }else{
403 return true;
407 function nd(){
408 if(oremovecounter >=1){oshowingsticky=0};
409 if((ns4)||(ie4)||(ns6)){
410 if(oshowingsticky==0){
411 oallowmove=0;
412 if(over !=null)hideObject(over);
413 }else{
414 oremovecounter++;
417 return true;
419 function overlib350(){
420 var layerhtml;
421 if(obackground !="" || ofullhtml){
422 layerhtml=ol_content_background(otext, obackground, ofullhtml);
423 }else{
424 if(ofgbackground !="" && ocss==CSSOFF){
425 ofgbackground="BACKGROUND=\""+ofgbackground+"\"";
427 if(obgbackground !="" && ocss==CSSOFF){
428 obgbackground="BACKGROUND=\""+obgbackground+"\"";
430 if(ofgcolor !="" && ocss==CSSOFF){
431 ofgcolor="BGCOLOR=\""+ofgcolor+"\"";
433 if(obgcolor !="" && ocss==CSSOFF){
434 obgcolor="BGCOLOR=\""+obgcolor+"\"";
436 if(oheight > 0 && ocss==51){
437 oheight="HEIGHT=" + oheight;
438 }else{
439 oheight="";
441 if(ocap==""){
442 layerhtml=ol_content_simple(otext);
443 }else{
444 if(osticky){
445 layerhtml=ol_content_caption(otext, ocap, oclose);
446 }else{
447 layerhtml=ol_content_caption(otext, ocap, "");
451 if(osticky){
452 oshowingsticky=1;
453 oremovecounter=0;
455 layerWrite(layerhtml);
456 if(oautostatus > 0){
457 ostatus=otext;
458 if(oautostatus > 1){
459 ostatus=ocap;
462 oallowmove=0;
463 if(otimeout > 0){
464 if(otimerid > 0)clearTimeout(otimerid);
465 otimerid=setTimeout("cClick()", otimeout);
467 disp(ostatus);
468 if(osticky){
469 oallowmove=0;
470 return false;
471 }else{
472 return true;
475 function ol_content_simple(text){
476 if(ocss==CSSCLASS)txt="<TABLE WIDTH="+owidth+" BORDER=0 CELLPADDING="+oborder+" CELLSPACING=0 class=\""+obgclass+"\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 class=\""+ofgclass+"\"><TR><TD VALIGN=TOP><FONT class=\""+otextfontclass+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";
477 if(ocss==CSSSTYLE)txt="<TABLE WIDTH="+owidth+" BORDER=0 CELLPADDING="+oborder+" CELLSPACING=0 style=\"background-color: "+obgcolor+";height: "+oheight+oheightunit+";\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 style=\"color: "+ofgcolor+";background-color: "+ofgcolor+";height: "+oheight+oheightunit+";\"><TR><TD VALIGN=TOP><FONT style=\"font-family: "+otextfont+";color: "+otextcolor+";font-size: "+otextsize+otextsizeunit+";text-decoration: "+otextdecoration+";font-weight: "+otextweight+";font-style:"+otextstyle+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";
478 if(ocss==CSSOFF)txt="<TABLE WIDTH="+owidth+" BORDER=0 CELLPADDING="+oborder+" CELLSPACING=0 "+obgcolor+" "+oheight+"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 "+ofgcolor+" "+ofgbackground+" "+oheight+"><TR><TD VALIGN=TOP><FONT FACE=\""+otextfont+"\" COLOR=\""+otextcolor+"\" SIZE=\""+otextsize+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";
479 set_background("");
480 return txt;
482 function ol_content_caption(text, title, close){
483 closing="";
484 closeevent="onMouseOver";
485 if(ocloseclick==1)closeevent="onClick";
486 if(ocapicon !="")ocapicon="<IMG SRC=\""+ocapicon+"\"> ";
487 if(close !=""){
488 if(ocss==CSSCLASS)closing="<TD ALIGN=RIGHT><A HREF=\"/\" "+closeevent+"=\"return cClick();\" class=\""+oclosefontclass+"\">"+close+"</A></TD>";
489 if(ocss==CSSSTYLE)closing="<TD ALIGN=RIGHT><A HREF=\"/\" "+closeevent+"=\"return cClick();\" style=\"color: "+oclosecolor+";font-family: "+oclosefont+";font-size: "+oclosesize+oclosesizeunit+";text-decoration: "+oclosedecoration+";font-weight: "+ocloseweight+";font-style:"+oclosestyle+";\">"+close+"</A></TD>";
490 if(ocss==CSSOFF)closing="<TD ALIGN=RIGHT><A HREF=\"/\" "+closeevent+"=\"return cClick();\"><FONT COLOR=\""+oclosecolor+"\" FACE=\""+oclosefont+"\" SIZE=\""+oclosesize+"\">"+close+"</FONT></A></TD>";
492 if(ocss==CSSCLASS)txt="<TABLE WIDTH="+owidth+" BORDER=0 CELLPADDING="+oborder+" CELLSPACING=0 class=\""+obgclass+"\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><FONT class=\""+ocaptionfontclass+"\">"+ocapicon+title+"</FONT></TD>"+closing+"</TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 class=\""+ofgclass+"\"><TR><TD VALIGN=TOP><FONT class=\""+otextfontclass+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";
493 if(ocss==CSSSTYLE)txt="<TABLE WIDTH="+owidth+" BORDER=0 CELLPADDING="+oborder+" CELLSPACING=0 style=\"background-color: "+obgcolor+";background-image: url("+obgbackground+");height: "+oheight+oheightunit+";\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><FONT style=\"font-family: "+ocaptionfont+";color: "+ocapcolor+";font-size: "+ocaptionsize+ocaptionsizeunit+";font-weight: "+ocaptionweight+";font-style: "+ocaptionstyle+";\">"+ocapicon+title+"</FONT></TD>"+closing+"</TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 style=\"color: "+ofgcolor+";background-color: "+ofgcolor+";height: "+oheight+oheightunit+";\"><TR><TD VALIGN=TOP><FONT style=\"font-family: "+otextfont+";color: "+otextcolor+";font-size: "+otextsize+otextsizeunit+";text-decoration: "+otextdecoration+";font-weight: "+otextweight+";font-style:"+otextstyle+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";
494 if(ocss==CSSOFF)txt="<TABLE WIDTH="+owidth+" BORDER=0 CELLPADDING="+oborder+" CELLSPACING=0 "+obgcolor+" "+obgbackground+" "+oheight+"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><B><FONT COLOR=\""+ocapcolor+"\" FACE=\""+ocaptionfont+"\" SIZE=\""+ocaptionsize+"\">"+ocapicon+title+"</FONT></B></TD>"+closing+"</TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 "+ofgcolor+" "+ofgbackground+" "+oheight+"><TR><TD VALIGN=TOP><FONT COLOR=\""+otextcolor+"\" FACE=\""+otextfont+"\" SIZE=\""+otextsize+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";
495 set_background("");
496 return txt;
498 function ol_content_background(text, picture, hasfullhtml){
499 if(hasfullhtml){
500 txt=text;
501 }else{
502 if(ocss==CSSCLASS)txt="<TABLE WIDTH="+owidth+owidthunit+" BORDER=0 CELLPADDING=0 CELLSPACING=0 HEIGHT="+oheight+oheightunit+"><TR><TD COLSPAN=3 HEIGHT="+opadyt+opadunit+"></TD></TR><TR><TD WIDTH="+opadxl+opadunit+"></TD><TD VALIGN=TOP WIDTH="+(owidth-opadxl-opadxr)+opadunit+"><FONT class=\""+otextfontclass+"\">"+text+"</FONT></TD><TD WIDTH="+opadxr+opadunit+"></TD></TR><TR><TD COLSPAN=3 HEIGHT="+opadyb+opadunit+"></TD></TR></TABLE>";
503 if(ocss==CSSSTYLE)txt="<TABLE WIDTH="+owidth+owidthunit+" BORDER=0 CELLPADDING=0 CELLSPACING=0 HEIGHT="+oheight+oheightunit+"><TR><TD COLSPAN=3 HEIGHT="+opadyt+opadunit+"></TD></TR><TR><TD WIDTH="+opadxl+opadunit+"></TD><TD VALIGN=TOP WIDTH="+(owidth-opadxl-opadxr)+opadunit+"><FONT style=\"font-family: "+otextfont+";color: "+otextcolor+";font-size: "+otextsize+otextsizeunit+";\">"+text+"</FONT></TD><TD WIDTH="+opadxr+opadunit+"></TD></TR><TR><TD COLSPAN=3 HEIGHT="+opadyb+opadunit+"></TD></TR></TABLE>";
504 if(ocss==CSSOFF)txt="<TABLE WIDTH="+owidth+" BORDER=0 CELLPADDING=0 CELLSPACING=0 HEIGHT="+oheight+"><TR><TD COLSPAN=3 HEIGHT="+opadyt+"></TD></TR><TR><TD WIDTH="+opadxl+"></TD><TD VALIGN=TOP WIDTH="+(owidth-opadxl-opadxr)+"><FONT FACE=\""+otextfont+"\" COLOR=\""+otextcolor+"\" SIZE=\""+otextsize+"\">"+text+"</FONT></TD><TD WIDTH="+opadxr+"></TD></TR><TR><TD COLSPAN=3 HEIGHT="+opadyb+"></TD></TR></TABLE>";
506 set_background(picture);
507 return txt;
509 function set_background(pic){
510 if(pic==""){
511 if(ie4)over.backgroundImage="none";
512 if(ns6)over.style.backgroundImage="none";
513 }else{
514 if(ns4){
515 over.background.src=pic;
516 }else if(ie4){
517 over.backgroundImage="url("+pic+")";
518 }else if(ns6){
519 over.style.backgroundImage="url("+pic+")";
523 function disp(statustext){
524 if((ns4)||(ie4)||(ns6)){
525 if(oallowmove==0){
526 placeLayer();
527 showObject(over);
528 oallowmove=1;
531 if(statustext !=""){
532 self.status=statustext;
535 function placeLayer(){
536 var placeX, placeY;
537 if(ofixx > -1){
538 placeX=ofixx;
539 }else{
540 winoffset=(ie4)? oframe.document.body.scrollLeft : oframe.pageXOffset;
541 if(ie4)iwidth=oframe.document.body.clientWidth;
542 if(ns4)iwidth=oframe.innerWidth;// was screwed in mozilla, fixed now?
543 if(ns6)iwidth=oframe.outerWidth;
544 if(ohauto==1){
545 if((ox - winoffset)>((eval(iwidth))/ 2)){
546 ohpos=7;
547 }else{
548 ohpos=8;
551 if(ohpos==9){// Center
552 placeX=ox+ooffsetx-(owidth/2);
554 if(ohpos==8){// Right
555 placeX=ox+ooffsetx;
556 if((eval(placeX)+ eval(owidth))>(winoffset + iwidth)){
557 placeX=iwidth + winoffset - owidth;
558 if(placeX < 0)placeX=0;
561 if(ohpos==7){// Left
562 placeX=ox-ooffsetx-owidth;
563 if(placeX < winoffset)placeX=winoffset;
565 if(osnapx > 1){
566 var snapping=placeX % osnapx;
567 if(ohpos==7){
568 placeX=placeX -(osnapx + snapping);
569 }else{
570 placeX=placeX +(osnapx - snapping);
572 if(placeX < winoffset)placeX=winoffset;
575 if(ofixy > -1){
576 placeY=ofixy;
577 }else{
578 scrolloffset=(ie4)? oframe.document.body.scrollTop : oframe.pageYOffset;
579 if(ovauto==1){
580 if(ie4)iheight=oframe.document.body.clientHeight;
581 if(ns4)iheight=oframe.innerHeight;
582 if(ns6)iheight=oframe.outerHeight;
583 iheight=(eval(iheight))/ 2;
584 if((oy - scrolloffset)> iheight){
585 ovpos=35;
586 }else{
587 ovpos=36;
590 if(ovpos==35){
591 if(oaboveheight==0){
592 var divref=(ie4)? oframe.document.all['overDiv'] : over;
593 oaboveheight=(ns4)? divref.clip.height : divref.offsetHeight;
595 placeY=oy -(oaboveheight + ooffsety);
596 if(placeY < scrolloffset)placeY=scrolloffset;
597 }else{
598 placeY=oy + ooffsety;
600 if(osnapy > 1){
601 var snapping=placeY % osnapy;
602 if(oaboveheight > 0 && ovpos==35){
603 placeY=placeY -(osnapy + snapping);
604 }else{
605 placeY=placeY +(osnapy - snapping);
607 if(placeY < scrolloffset)placeY=scrolloffset;
610 repositionTo(over, placeX, placeY);
612 function mouseMove(e){
613 if((ns4)||(ns6)){ox=e.pageX;oy=e.pageY;}
614 if(ie4){ox=event.x;oy=event.y;}
615 if(ie5){ox=event.x+oframe.document.body.scrollLeft;oy=event.y+oframe.document.body.scrollTop;}
616 if(oallowmove==1){
617 placeLayer();
620 function cClick(){
621 hideObject(over);
622 oshowingsticky=0;
623 return false;
625 function compatibleframe(frameid){
626 if(ns4){
627 if(typeof frameid.document.overDiv=='undefined')return false;
628 }else if(ie4){
629 if(typeof frameid.document.all["overDiv"]=='undefined')return false;
630 }else if(ns6){
631 if(frameid.document.getElementById('overDiv')==null)return false;
633 return true;
635 function layerWrite(txt){
636 txt +="\n";
637 if(ns4){
638 var lyr=oframe.document.overDiv.document
639 lyr.write(txt)
640 lyr.close()
641 }else if(ie4){
642 oframe.document.all["overDiv"].innerHTML=txt
643 }else if(ns6){
644 range=oframe.document.createRange();
645 range.setStartBefore(over);
646 domfrag=range.createContextualFragment(txt);
647 while(over.hasChildNodes()){
648 over.removeChild(over.lastChild);
650 over.appendChild(domfrag);
653 function showObject(obj){
654 if(ns4)obj.visibility="show";
655 else if(ie4)obj.visibility="visible";
656 else if(ns6)obj.style.visibility="visible";
658 function hideObject(obj){
659 if(ns4)obj.visibility="hide";
660 else if(ie4)obj.visibility="hidden";
661 else if(ns6)obj.style.visibility="hidden";
662 if(otimerid > 0)clearTimeout(otimerid);
663 if(odelayid > 0)clearTimeout(odelayid);
664 otimerid=0;
665 odelayid=0;
666 self.status="";
668 function repositionTo(obj,xL,yL){
669 if((ns4)||(ie4)){
670 obj.left=xL;
671 obj.top=yL;
672 }else if(ns6){
673 obj.style.left=xL + "px";
674 obj.style.top=yL+ "px";
677 function opt_FRAME(frm){
678 oframe=compatibleframe(frm)? frm : ol_frame;
679 if((ns4)||(ie4 ||(ns6))){
680 if(ns4)over=oframe.document.overDiv;
681 if(ie4)over=oframe.overDiv.style;
682 if(ns6)over=oframe.document.getElementById("overDiv");
684 return 0;
686 function opt_FUNCTION(callme){
687 otext=callme()
688 return 0;
690 // </SCRIPT>