stray closing /TABLE in the no-ticket case
[freeside.git] / httemplate / elements / overlibmws.js
1 /*\r
2  Do not remove or change this notice.\r
3  overlibmws.js core module - Copyright Foteos Macrides 2002-2010. All rights reserved.\r
4    Initial: August 18, 2002 - Last Revised: March 2, 2010\r
5  This module is subject to the same terms of usage as for Erik Bosrup's overLIB,\r
6  though only a minority of the code and API now correspond with Erik's version.\r
7  See the overlibmws Change History and Command Reference via:\r
8 \r
9         http://www.macridesweb.com/oltest/\r
10 \r
11  Published under an open source license: http://www.macridesweb.com/oltest/license.html\r
12  Give credit on sites that use overlibmws and submit changes so others can use them as well.\r
13  You can get Erik's version via: http://www.bosrup.com/web/overlib/\r
14 */\r
15 \r
16 // PRE-INIT -- Ignore these lines, configuration is below.\r
17 var OLloaded=0,OLbubblePI=0,OLcrossframePI=0,OLdebugPI=0,OLdraggablePI=0,OLexclusivePI=0,OLfilterPI=0,\r
18 OLfunctionPI=0,OLhidePI=0,OLiframePI=0,OLmodalPI=0,OLovertwoPI=0,OLscrollPI=0,OLshadowPI=0,OLprintPI=0,\r
19 pmCnt=1,pMtr=new Array(),OLcmdLine=new Array(),OLrunTime=new Array(),OLv,OLudf,OLrefXY,\r
20 OLpct=new Array("83%","67%","83%","100%","117%","150%","200%","267%");if(typeof OLgateOK=='undefined')var OLgateOK=1;\r
21 var OLp1or2c='inarray,caparray,caption,closetext,right,left,center,autostatuscap,padx,pady,below,above,vcenter,donothing',\r
22 OLp1or2co='nofollow,background,offsetx,offsety,fgcolor,bgcolor,cgcolor,textcolor,capcolor,width,wrap,wrapmax,height,border,'\r
23 +'base,status,autostatus,snapx,snapy,fixx,fixy,relx,rely,midx,midy,ref,refc,refp,refx,refy,fgbackground,bgbackground,'\r
24 +'cgbackground,fullhtml,capicon,textfont,captionfont,textsize,captionsize,timeout,delay,hauto,vauto,nojustx,nojusty,fgclass,'\r
25 +'bgclass,cgclass,capbelow,textpadding,textfontclass,captionpadding,captionfontclass,sticky,noclose,mouseoff,offdelay,'\r
26 +'closecolor,closefont,closesize,closeclick,closetitle,closefontclass,decode',OLp1or2o='text,cap,close,hpos,vpos,padxl,'\r
27 +'padxr,padyt,padyb',OLp1co='label',OLp1or2=OLp1or2co+','+OLp1or2o,OLp1=OLp1co+','+'frame';\r
28 OLregCmds(OLp1or2c+','+OLp1or2co+','+OLp1co);\r
29 function OLud(v){return eval('typeof ol_'+v+'=="undefined"')?1:0;}\r
30 \r
31 // DEFAULT CONFIGURATION -- See overlibConfig.txt for descriptions\r
32 if(OLud('fgcolor'))var ol_fgcolor="#ccccff";\r
33 if(OLud('bgcolor'))var ol_bgcolor="#333399";\r
34 if(OLud('cgcolor'))var ol_cgcolor="#333399";\r
35 if(OLud('textcolor'))var ol_textcolor="#000000";\r
36 if(OLud('capcolor'))var ol_capcolor="#ffffff";\r
37 if(OLud('closecolor'))var ol_closecolor="#eeeeff";\r
38 if(OLud('textfont'))var ol_textfont="Verdana,Arial,Helvetica";\r
39 if(OLud('captionfont'))var ol_captionfont="Verdana,Arial,Helvetica";\r
40 if(OLud('closefont'))var ol_closefont="Verdana,Arial,Helvetica";\r
41 if(OLud('textsize'))var ol_textsize=1;\r
42 if(OLud('captionsize'))var ol_captionsize=1;\r
43 if(OLud('closesize'))var ol_closesize=1;\r
44 if(OLud('fgclass'))var ol_fgclass="";\r
45 if(OLud('bgclass'))var ol_bgclass="";\r
46 if(OLud('cgclass'))var ol_cgclass="";\r
47 if(OLud('textpadding'))var ol_textpadding=2;\r
48 if(OLud('textfontclass'))var ol_textfontclass="";\r
49 if(OLud('captionpadding'))var ol_captionpadding=2;\r
50 if(OLud('captionfontclass'))var ol_captionfontclass="";\r
51 if(OLud('closefontclass'))var ol_closefontclass="";\r
52 if(OLud('close'))var ol_close="Close";\r
53 if(OLud('closeclick'))var ol_closeclick=0;\r
54 if(OLud('closetitle'))var ol_closetitle="Click to Close";\r
55 if(OLud('text'))var ol_text="Default Text";\r
56 if(OLud('cap'))var ol_cap="";\r
57 if(OLud('capbelow'))var ol_capbelow=0;\r
58 if(OLud('background'))var ol_background="";\r
59 if(OLud('width'))var ol_width=200;\r
60 if(OLud('wrap'))var ol_wrap=0;\r
61 if(OLud('wrapmax'))var ol_wrapmax=0;\r
62 if(OLud('height'))var ol_height= -1;\r
63 if(OLud('border'))var ol_border=1;\r
64 if(OLud('base'))var ol_base=0;\r
65 if(OLud('offsetx'))var ol_offsetx=10;\r
66 if(OLud('offsety'))var ol_offsety=10;\r
67 if(OLud('sticky'))var ol_sticky=0;\r
68 if(OLud('nofollow'))var ol_nofollow=0;\r
69 if(OLud('noclose'))var ol_noclose=0;\r
70 if(OLud('mouseoff'))var ol_mouseoff=0;\r
71 if(OLud('offdelay'))var ol_offdelay=300;\r
72 if(OLud('hpos'))var ol_hpos=RIGHT;\r
73 if(OLud('vpos'))var ol_vpos=BELOW;\r
74 if(OLud('status'))var ol_status="";\r
75 if(OLud('autostatus'))var ol_autostatus=0;\r
76 if(OLud('snapx'))var ol_snapx=0;\r
77 if(OLud('snapy'))var ol_snapy=0;\r
78 if(OLud('fixx'))var ol_fixx= -1;\r
79 if(OLud('fixy'))var ol_fixy= -1;\r
80 if(OLud('relx'))var ol_relx=null;\r
81 if(OLud('rely'))var ol_rely=null;\r
82 if(OLud('midx'))var ol_midx=null;\r
83 if(OLud('midy'))var ol_midy=null;\r
84 if(OLud('ref'))var ol_ref="";\r
85 if(OLud('refc'))var ol_refc='UL';\r
86 if(OLud('refp'))var ol_refp='UL';\r
87 if(OLud('refx'))var ol_refx=0;\r
88 if(OLud('refy'))var ol_refy=0;\r
89 if(OLud('fgbackground'))var ol_fgbackground="";\r
90 if(OLud('bgbackground'))var ol_bgbackground="";\r
91 if(OLud('cgbackground'))var ol_cgbackground="";\r
92 if(OLud('padxl'))var ol_padxl=1;\r
93 if(OLud('padxr'))var ol_padxr=1;\r
94 if(OLud('padyt'))var ol_padyt=1;\r
95 if(OLud('padyb'))var ol_padyb=1;\r
96 if(OLud('fullhtml'))var ol_fullhtml=0;\r
97 if(OLud('capicon'))var ol_capicon="";\r
98 if(OLud('frame'))var ol_frame=self;\r
99 if(OLud('timeout'))var ol_timeout=0;\r
100 if(OLud('delay'))var ol_delay=0;\r
101 if(OLud('hauto'))var ol_hauto=0;\r
102 if(OLud('vauto'))var ol_vauto=0;\r
103 if(OLud('nojustx'))var ol_nojustx=0;\r
104 if(OLud('nojusty'))var ol_nojusty=0;\r
105 if(OLud('label'))var ol_label="";\r
106 if(OLud('decode'))var ol_decode=0;\r
107 // ARRAY CONFIGURATION - See overlibConfig.txt for descriptions.\r
108 if(OLud('texts'))var ol_texts=new Array("Text 0","Text 1");\r
109 if(OLud('caps'))var ol_caps=new Array("Caption 0","Caption 1");\r
110 // END CONFIGURATION -- Don't change anything below, all configuration is above.\r
111 \r
112 // INIT -- Runtime variables.\r
113 var o3_text="",o3_cap="",o3_sticky=0,o3_nofollow=0,o3_background="",o3_noclose=0,o3_mouseoff=0,o3_offdelay=300,o3_hpos=RIGHT,\r
114 o3_offsetx=10,o3_offsety=10,o3_fgcolor="",o3_bgcolor="",o3_cgcolor="",o3_textcolor="",o3_capcolor="",o3_closecolor="",\r
115 o3_width=200,o3_wrap=0,o3_wrapmax=0,o3_height= -1,o3_border=1,o3_base=0,o3_status="",o3_autostatus=0,o3_snapx=0,o3_snapy=0,\r
116 o3_fixx= -1,o3_fixy= -1,o3_relx=null,o3_rely=null,o3_midx=null,o3_midy=null,o3_ref="",o3_refc='UL',o3_refp='UL',o3_refx=0,\r
117 o3_refy=0,o3_fgbackground="",o3_bgbackground="",o3_cgbackground="",o3_padxl=0,o3_padxr=0,o3_padyt=0,o3_padyb=0,o3_fullhtml=0,\r
118 o3_vpos=BELOW,o3_capicon="",o3_textfont="Verdana,Arial,Helvetica",o3_captionfont="",o3_closefont="",o3_textsize=1,OLcC=null,\r
119 o3_captionsize=1,o3_closesize=1,o3_frame=self,o3_timeout=0,o3_delay=0,o3_hauto=0,o3_vauto=0,o3_nojustx=0,o3_nojusty=0,\r
120 o3_close="",o3_closeclick=0,o3_closetitle="",o3_fgclass="",o3_bgclass="",o3_cgclass="",o3_textpadding=2,o3_textfontclass="",\r
121 o3_captionpadding=2,o3_captionfontclass="",o3_closefontclass="",o3_capbelow=0,o3_label="",o3_decode=0,\r
122 CSSOFF=DONOTHING,CSSCLASS=DONOTHING,over=null,OLdelayid=0,OLtimerid=0,OLshowid=0,OLndt=0,OLfnRef="",OLhover=0,OLx=0,OLy=0,\r
123 OLshowingsticky=0,OLallowmove=0,OLoverHTML="",OLover2HTML="",OLifRef="",OLo2Ref="",OLifX=0,OLifY=0,\r
124 OLua=(OLv=navigator.userAgent)?OLv.toLowerCase():'',\r
125 OLns4=(navigator.appName=='Netscape'&&parseInt(navigator.appVersion)==4)?1:0,\r
126 OLns6=(document.getElementById)?1:0,\r
127 OLie4=(document.all)?1:0,\r
128 OLgek=(OLv=OLua.match(/gecko\/(\d{8})/i))?parseInt(OLv[1]):0,\r
129 OLmac=(OLua.indexOf('mac')>=0)?1:0,\r
130 OLsaf=(OLua.indexOf('safari')>=0)?1:0,\r
131 OLkon=(OLua.indexOf('konqueror')>=0)?1:0,\r
132 OLkht=(OLsaf||OLkon)?1:0,\r
133 OLopr=(OLua.indexOf('opera')>=0)?1:0,\r
134 OLop7=(OLopr&&document.createTextNode)?1:0;\r
135 OLop95=(OLop7&&document.getElementsByClassName)?1:0;\r
136 if(OLopr){OLns4=OLns6=OLgek=0;OLie4=(OLop7)?1:0;}\r
137 var OLieM=((OLie4&&OLmac)&&!(OLkht||OLopr))?1:0,\r
138 OLie5=0,OLie55=0,OLie7=0;OLie8=0;if(OLie4&&!OLop7){\r
139 if((OLv=OLua.match(/msie (\d\.\d+)\.*/i))&&(OLv=parseFloat(OLv[1]))>=5.0){\r
140 OLie5=1;OLns6=0;if(OLv>=5.5)OLie55=1;if(OLv>=7.0)OLie7=1;if(OLv>=8.0)OLie8=1;}if(OLns6)OLie4=0;}\r
141 if(OLns4)window.onresize=function(){location.reload();};var OLchkMh=1,OLdw;\r
142 if(OLns4||OLie4||OLns6){OLmh();if(window.addEventListener)window.addEventListener("unload",\r
143 OLulCl,false);}else{overlib=nd=cClick=OLpageDefaults=no_overlib;}\r
144 function OLulCl(){if(over)cClick();window.removeEventListener("unload",OLulCl,false);}\r
145 \r
146 /*\r
147  PUBLIC FUNCTIONS\r
148 */\r
149 // Loads defaults then args into runtime variables.\r
150 function overlib(){\r
151 if(!(OLloaded&&OLgateOK))return;if((OLexclusivePI)&&OLisExclusive(arguments))return true;if(OLchkMh)OLmh();if(OLndt&&\r
152 !OLtimerid)OLndt=0;if(over){if(OLfilterPI)o3_filter=0;cClick();}if(parent!=self){new Array('try{','if(parent.OLo2Ref){',\r
153 'parent.OLeval(parent.OLo2Ref);','parent.OLo2Ref="";','}','if(parent.OLifRef){','parent.OLeval(parent.OLifRef);',\r
154 'parent.OLifRef="";','}','}','catch(e){','}').join('\n')};if(OLo2Ref){eval(OLo2Ref);OLo2Ref="";}if(OLifRef){eval(OLifRef);\r
155 OLifRef="";}OLload(OLp1or2);OLload(OLp1);OLfnRef="";OLifX=0;OLifY=0;OLhover=0;if(OLcrossframePI&&parent!=self)OLchkFRAME(\r
156 arguments);OLsetRunTimeVar();OLparseTokens('o3_',arguments);if(!(over=OLmkLyr()))return false;over.onmouseover=\r
157 over.onmouseout=null;if(o3_decode)OLdecode();if(OLprintPI)OLchkPrint();if(OLbubblePI)OLchkForBubbleEffect();if(OLdebugPI)\r
158 OLsetDebugCanShow();if(OLshadowPI)OLinitShadow();if(OLiframePI)OLinitIfs();if(OLfilterPI)OLinitFilterLyr();if(OLexclusivePI\r
159 &&o3_exclusive&&o3_exclusivestatus!="")o3_status=o3_exclusivestatus;else if(o3_autostatus==2&&o3_cap!="")o3_status=o3_cap;\r
160 else if(o3_autostatus==1&&o3_text!="")o3_status=o3_text;if(!o3_delay){return OLmain();}else{OLdelayid=setTimeout("OLmain()",\r
161 o3_delay);if(o3_status!=""){self.status=o3_status;return true;}else if(!(OLop7&&event&&event.type=='mouseover'))\r
162 return false;}\r
163 }\r
164 function OLeval(s){eval(s);}\r
165 \r
166 // Clears popups if appropriate\r
167 function nd(time){\r
168 if(OLloaded&&OLgateOK){if(!((OLexclusivePI)&&OLisExclusive())){if(time&&over&&!o3_delay){if(OLtimerid>0)\r
169 clearTimeout(OLtimerid);OLtimerid=(OLhover&&!OLcursorOff())?0:setTimeout("cClick()",(o3_timeout=OLndt=time));\r
170 }else{if(!OLshowingsticky){OLallowmove=0;if(over)OLhideObject(over);}}}}return false;\r
171 }\r
172 \r
173 // Close function for stickies\r
174 function cClick(){\r
175 if(OLloaded&&OLgateOK){OLhover=0;if(over){if(OLo2Ref){eval(OLo2Ref);OLo2Ref="";}if(OLovertwoPI&&over==over2)cClick2();\r
176 OLhideObject(over);OLshowingsticky=0;OLallowmove=0;}if(OLmodalPI)OLclearModal();}return false;\r
177 }\r
178 \r
179 // Sets page-specific defaults.\r
180 function OLpageDefaults(){\r
181 OLparseTokens('ol_',arguments);\r
182 }\r
183 \r
184 // Gets object referenced by its id or name\r
185 function OLgetRef(l,d){var r=OLgetRefById(l,d);return (r)?r:OLgetRefByName(l,d);}\r
186 \r
187 // For unsupported browsers.\r
188 function no_overlib(){return false;}\r
189 \r
190 /*\r
191  OVERLIB MAIN FUNCTION SET\r
192 */\r
193 function OLmain(){\r
194 o3_delay=0;if(parent!=self&&o3_frame==parent&&parent.OLscrollPI&&parent.over)parent.OLclearScroll();if(o3_noclose)\r
195 OLoptMOUSEOFF(0);else if(o3_mouseoff)OLoptMOUSEOFF(1);if(o3_sticky){OLshowingsticky=1;if(OLfnRef&&parent!=self&&\r
196 o3_frame==parent&&parent.overlib)parent.OLifRef=(OLfilterPI?OLfnRef+'o3_filter=0;':'')+OLfnRef+'cClick();';}OLdoLyr();\r
197 OLallowmove=0;if(o3_timeout>0){if(OLtimerid>0)clearTimeout(OLtimerid);OLtimerid=setTimeout("cClick()",o3_timeout);}\r
198 OLchkRef();OLdisp(o3_status);if(OLdraggablePI)OLcheckDrag();if(o3_status!="")return true;else if(!(OLop7&&event&&\r
199 event.type=='mouseover'))return false;\r
200 }\r
201 function OLchkRef(){\r
202 if(o3_ref){OLrefXY=OLgetRefXY(o3_ref);if(OLrefXY[0]==null&&OLcrossframePI)OLchkIfRef();\r
203 if(OLrefXY[0]==null){o3_ref="";o3_midx=0;o3_midy=0;}}\r
204 }\r
205 \r
206 // Loads o3_ variables\r
207 function OLload(c){var i,m=c.split(',');for(i=0;i<m.length;i++)eval('o3_'+m[i]+'=ol_'+m[i]);}\r
208 \r
209 // Chooses LGF \r
210 function OLdoLGF(){\r
211 return (o3_background!=''||o3_fullhtml)?OLcontentBackground(o3_text,o3_background,o3_fullhtml):(o3_cap=="")?\r
212 OLcontentSimple(o3_text):(o3_sticky)?OLcontentCaption(o3_text,o3_cap,o3_close):OLcontentCaption(o3_text,o3_cap,'');\r
213 }\r
214 \r
215 // Makes Layer\r
216 function OLmkLyr(id,f,z){\r
217 id=(id||'overDiv');f=(f||o3_frame);z=(z||1000);var fd=f.document,d=OLgetRefById(id,fd);if(!d){if(OLns4)d=fd.layers[id]=\r
218 new Layer(1024,f);else if(OLie4&&!OLop7){fd.body.insertAdjacentHTML('AfterBegin','<div id="'+id+'"></div>');d=fd.all[id];}\r
219 else{d=fd.createElement('div');if(d){d.id=id;fd.body.appendChild(d);}}if(!d)return null;if(OLns4)d.zIndex=z;else{var o=\r
220 d.style;o.position='absolute';o.visibility='hidden';o.zIndex=z;}}return d;\r
221 }\r
222 \r
223 // Creates and writes layer content\r
224 function OLdoLyr(){\r
225 if(o3_sticky&&OLtimerid>0){clearTimeout(OLtimerid);OLtimerid=0;}if(o3_background==''&&!o3_fullhtml){\r
226 if(o3_fgbackground!='')o3_fgbackground=' background="'+o3_fgbackground+'"';\r
227 if(o3_bgbackground!='')o3_bgbackground=' background="'+o3_bgbackground+'"';\r
228 if(o3_cgbackground!='')o3_cgbackground=' background="'+o3_cgbackground+'"';\r
229 if(o3_fgcolor!='')o3_fgcolor=' bgcolor="'+o3_fgcolor+'"';if(o3_bgcolor!='')o3_bgcolor=' bgcolor="'+o3_bgcolor+'"';\r
230 if(o3_cgcolor!='')o3_cgcolor=' bgcolor="'+o3_cgcolor+'"';if(o3_height>0)o3_height=(OLns4)?' height="'+o3_height+'"':\r
231 ' style="height:'+o3_height+'px;"';else o3_height='';}if(!OLns4)OLrepositionTo(over,(OLns6?20:0),0);var lyrHtml=OLdoLGF();\r
232 if(o3_wrap&&!o3_fullhtml){OLlayerWrite(lyrHtml);o3_width=(OLns4?over.clip.width:over.offsetWidth);if(OLie4&&!OLop95){\r
233 var w=OLfd().clientWidth;if(o3_width>=w){if(OLop7){if(OLovertwoPI&&over==over2){var z=over2.style.zIndex;\r
234 o3_frame.document.body.removeChild(over);over2=OLmkLyr('overDiv2',o3_frame,z);over=over2;}else{\r
235 o3_frame.document.body.removeChild(over);over=OLmkLyr();}}o3_width=w-20;}}\r
236 if(o3_wrapmax<1&&o3_frame.innerWidth)o3_wrapmax=o3_frame.innerWidth-40;\r
237 if(o3_wrapmax>0&&o3_width>o3_wrapmax)o3_width=o3_wrapmax;o3_wrap=0;lyrHtml=OLdoLGF();}OLlayerWrite(lyrHtml);\r
238 o3_width=(OLns4?over.clip.width:over.offsetWidth);if(OLbubblePI)OLgenerateBubble(lyrHtml);\r
239 }\r
240 \r
241 /*\r
242  LAYER GENERATION FUNCTIONS\r
243 */\r
244 // Makes simple table without caption\r
245 function OLcontentSimple(txt){\r
246 var t=OLbgLGF()+OLfgLGF(txt)+OLbaseLGF();OLsetBackground('');return t;\r
247 }\r
248 \r
249 // Makes table with caption and optional close link\r
250 function OLcontentCaption(txt,title,close){\r
251 var closing=(OLprintPI?OLprintCapLGF():''),closeevent='onmouseover',caption,t,cC='javascript:return '+OLfnRef\r
252 +(OLovertwoPI&&over==over2?'cClick2();':'cClick();');if(o3_closeclick)closeevent=(o3_closetitle?'title="'\r
253 +o3_closetitle+'" ':'')+'onclick';if(o3_capicon!=''&&o3_capicon.indexOf('<img')!=0)o3_capicon='<img src="'+o3_capicon\r
254 +'" /> ';if(close){closing+='<td align="right"><a href="'+cC+'" '+closeevent+'="'+cC+'"'+(o3_closefontclass?' class="'\r
255 +o3_closefontclass+'">':(OLns4?'><':'')+OLlgfUtil(0,1,'','a',o3_closecolor,o3_closefont,o3_closesize))+close+\r
256 (o3_closefontclass?'':(OLns4?OLlgfUtil(1,1,'','a'):''))+'</a></td>';}caption='<table id="overCap'\r
257 +(OLovertwoPI&&over==over2?'2':'')+'"'+OLwd(0)+' border="0" cellpadding="'+o3_captionpadding+'" cellspacing="0"'\r
258 +(o3_cgclass?' class="'+o3_cgclass+'"':o3_cgcolor+o3_cgbackground)+'><tr><td'+OLwd(0)+(o3_cgclass?' class="'\r
259 +o3_cgclass+'">':'>')+(o3_captionfontclass?'<div'+OLhL(1)+' class="'+o3_captionfontclass+'">':OLlgfUtil(0,1,'','div',\r
260 o3_capcolor,o3_captionfont,o3_captionsize))+o3_capicon+title+OLlgfUtil(1,1,'','div')+'</td>'+closing+'</tr></table>';\r
261 t=OLbgLGF()+(o3_capbelow?OLfgLGF(txt)+caption:caption+OLfgLGF(txt))+OLbaseLGF();OLsetBackground('');return t;\r
262 }\r
263 \r
264 // For BACKGROUND and FULLHTML commands\r
265 function OLcontentBackground(txt,image,hasfullhtml){\r
266 var t;if(hasfullhtml){t=txt;}else{t='<table'+OLwd(1)+' border="0" cellpadding="0" '+'cellspacing="0" '+'height="'\r
267 +o3_height+'"><tr><td colspan="3" height="'+o3_padyt+'"></td></tr><tr><td width="'+o3_padxl+'"></td><td valign="top"'\r
268 +OLwd(2)+'>'+OLlgfUtil(0,0,o3_textfontclass,'div',o3_textcolor,o3_textfont,o3_textsize)+txt+OLlgfUtil(1,0,'','div')\r
269 +'</td><td width="'+o3_padxr+'"></td></tr><tr><td colspan="3" height="'+o3_padyb+'"></td></tr></table>';}\r
270 OLsetBackground(image);return t;\r
271 }\r
272 \r
273 // LGF utilities\r
274 function OLbgLGF(){\r
275 return '<table'+OLwd(1)+o3_height+' border="0" cellpadding="'+o3_border+'" cellspacing="0"'+(o3_bgclass?' class="'\r
276 +o3_bgclass+'"':o3_bgcolor+o3_bgbackground)+'><tr><td>';\r
277 }\r
278 function OLfgLGF(t){\r
279 return '<table'+OLwd(0)+o3_height+' border="0" cellpadding="'+o3_textpadding+'" cellspacing="0"'+(o3_fgclass?' class="'\r
280 +o3_fgclass+'"':o3_fgcolor+o3_fgbackground)+'><tr><td valign="top"'+(o3_fgclass?' class="'+o3_fgclass+'"':'')+'>'\r
281 +OLlgfUtil(0,0,o3_textfontclass,'div',o3_textcolor,o3_textfont,o3_textsize)+t+(OLprintPI?OLprintFgLGF():'')\r
282 +OLlgfUtil(1,0,'','div')+'</td></tr></table>';\r
283 }\r
284 function OLlgfUtil(end,stg,tfc,ele,col,fac,siz){\r
285 if(end)return('</'+(OLns4?'font'+(stg?'></strong':''):ele)+'>');else return(tfc?'<div'+OLhL(1)+' class="'+tfc+'">':\r
286 ((ele=='a'?'':'<')+(OLns4?(stg?'strong><':'')+'font color="'+col+'" face="'+OLquoteMultiNameFonts(fac)+'" size="'\r
287 +siz:(ele=='a'?'':ele)+' style="'+((ele=='div')?OLhL(0):'')+'color:'+col+(stg?';font-weight:bold':'')+';font-family:'\r
288 +OLquoteMultiNameFonts(fac)+';font-size:'+siz+';'+(ele=='span'?'text-decoration:underline;':''))+'">'));\r
289 }\r
290 function OLquoteMultiNameFonts(f){\r
291 var i,v,pM=f.split(',');for(i=0;i<pM.length;i++){v=pM[i];v=v.replace(/^\s+/,'').replace(/\s+$/,'');\r
292 if(/\s/.test(v) && !/['"]/.test(v)){v="\'"+v+"\'";pM[i]=v;}}return pM.join();\r
293 }\r
294 function OLbaseLGF(){\r
295 return ((o3_base>0&&!o3_wrap)?('<table width="100%" border="0" cellpadding="0" cellspacing="0"'+(o3_bgclass?' class="'\r
296 +o3_bgclass+'"':'')+'><tr><td height="'+o3_base+'"></td></tr></table>'):'')+'</td></tr></table>';\r
297 }\r
298 function OLwd(a){return(o3_wrap?'':' width="'+(!a?'100%':(a==1?o3_width:(o3_width-o3_padxl-o3_padxr)))+'"');}\r
299 function OLhL(s){if(!OLie5)return '';return(s?' style="overflow:auto;"':'overflow:auto;');}\r
300 \r
301 // Loads image into the div.\r
302 function OLsetBackground(i){\r
303 if(i==''){if(OLns4)over.background.src=null;else{if(OLns6)over.style.width='';over.style.backgroundImage='none';}}\r
304 else{if(OLns4)over.background.src=i;else{if(OLns6)over.style.width=o3_width+'px';over.style.backgroundImage='url('+i+')';}}\r
305 }\r
306 \r
307 /*\r
308  HANDLING FUNCTIONS\r
309 */\r
310 // Displays layer\r
311 function OLdisp(s){\r
312 if(OLmodalPI&&!o3_modalscroll)OLchkModal();if(!OLallowmove){if(OLshadowPI)OLdispShadow();if(OLiframePI)OLdispIfs();\r
313 OLplaceLayer();if(OLmodalPI&&o3_modalscroll)OLchkModal();if(OLndt)OLshowObject(over);else OLshowid=\r
314 setTimeout("OLshowObject(over)",1);OLallowmove=(o3_sticky||o3_nofollow)?0:1;}OLndt=0;if(s!="")self.status=s;\r
315 }\r
316 \r
317 // Decides placement of layer.\r
318 function OLplaceLayer(){\r
319 var snp,X,Y,pgLeft,pgTop,pWd=o3_width,pHt,iWd=100,iHt=100,SB=0,LM=0,CX=0,TM=0,BM=0,CY=0,o=OLfd(),\r
320 nsb=(OLgek>=20010505&&!o3_frame.scrollbars.visible)?1:0;\r
321 if(!OLkht&&!OLop95&&o&&o.clientWidth)iWd=o.clientWidth;\r
322 else if(o3_frame.innerWidth){SB=Math.ceil(1.4*(o3_frame.outerWidth-o3_frame.innerWidth));\r
323 if(SB>20)SB=20;iWd=o3_frame.innerWidth;}\r
324 pgLeft=(OLie4&&!OLop95)?o.scrollLeft:o3_frame.pageXOffset;\r
325 if(OLie55&&OLfilterPI&&o3_filter&&o3_filtershadow)SB=CX=5;else\r
326 if((OLshadowPI)&&bkdrop&&o3_shadow&&o3_shadowx){SB+=((o3_shadowx>0)?o3_shadowx:0);\r
327 LM=((o3_shadowx<0)?Math.abs(o3_shadowx):0);CX=Math.abs(o3_shadowx);}\r
328 if(o3_ref!=""||o3_fixx> -1||o3_relx!=null||o3_midx!=null){\r
329 if(o3_ref!=""){X=OLrefXY[0];if(OLie55&&OLfilterPI&&o3_filter&&o3_filtershadow){\r
330 if(o3_refp=='UR'||o3_refp=='LR')X-=5;}\r
331 else if((OLshadowPI)&&bkdrop&&o3_shadow&&o3_shadowx){\r
332 if(o3_shadowx<0&&(o3_refp=='UL'||o3_refp=='LL'))X-=o3_shadowx;else\r
333 if(o3_shadowx>0&&(o3_refp=='UR'||o3_refp=='LR'))X-=o3_shadowx;}\r
334 }else{if(o3_midx!=null){\r
335 X=parseInt(pgLeft+((iWd-pWd-SB-LM)/2)+o3_midx);\r
336 }else{if(o3_relx!=null){\r
337 if(o3_relx>=0)X=pgLeft+o3_relx+LM;else X=pgLeft+o3_relx+iWd-pWd-SB;\r
338 }else{X=o3_fixx+LM;}}}\r
339 }else{\r
340 if(o3_hauto){\r
341 if(o3_hpos==LEFT&&OLx-pgLeft+OLifX<iWd/2&&OLx-pWd-o3_offsetx+OLifX<pgLeft+LM)o3_hpos=RIGHT;else\r
342 if(o3_hpos==RIGHT&&OLx-pgLeft+OLifX>iWd/2&&OLx+pWd+o3_offsetx+OLifX>pgLeft+iWd-SB)o3_hpos=LEFT;}\r
343 X=(o3_hpos==CENTER)?parseInt(OLx-((pWd+CX)/2)+o3_offsetx):\r
344 (o3_hpos==LEFT)?OLx-o3_offsetx-pWd:OLx+o3_offsetx;\r
345 if(o3_snapx>1){\r
346 snp=X % o3_snapx;\r
347 if(o3_hpos==LEFT){X=X-(o3_snapx+snp);}else{X=X+(o3_snapx-snp);}}X+=OLifX;}\r
348 if(!o3_nojustx&&X+pWd>pgLeft+iWd-SB)\r
349 X=iWd+pgLeft-pWd-SB;if(!o3_nojustx&&X-LM<pgLeft)X=pgLeft+LM;\r
350 pgTop=OLie4&&!OLop95?o.scrollTop:o3_frame.pageYOffset;\r
351 if(!OLkht&&!OLop95&&!nsb&&o&&o.clientHeight)iHt=o.clientHeight;\r
352 else if(o3_frame.innerHeight)iHt=o3_frame.innerHeight;\r
353 if(OLbubblePI&&o3_bubble)pHt=OLbubbleHt;else pHt=OLns4?over.clip.height:over.offsetHeight;\r
354 if((OLshadowPI)&&bkdrop&&o3_shadow&&o3_shadowy){TM=(o3_shadowy<0)?Math.abs(o3_shadowy):0;\r
355 if(OLie55&&OLfilterPI&&o3_filter&&o3_filtershadow)BM=CY=5;else\r
356 BM=(o3_shadowy>0)?o3_shadowy:0;CY=Math.abs(o3_shadowy);}\r
357 if(o3_ref!=""||o3_fixy> -1||o3_rely!=null||o3_midy!=null){\r
358 if(o3_ref!=""){Y=OLrefXY[1];if(OLie55&&OLfilterPI&&o3_filter&&o3_filtershadow){\r
359 if(o3_refp=='LL'||o3_refp=='LR')Y-=5;}else if((OLshadowPI)&&bkdrop&&o3_shadow&&o3_shadowy){\r
360 if(o3_shadowy<0&&(o3_refp=='UL'||o3_refp=='UR'))Y-=o3_shadowy;else\r
361 if(o3_shadowy>0&&(o3_refp=='LL'||o3_refp=='LR'))Y-=o3_shadowy;}\r
362 }else{if(o3_midy!=null){\r
363 Y=parseInt(pgTop+((iHt-pHt-CY)/2)+o3_midy);\r
364 }else{if(o3_rely!=null){\r
365 if(o3_rely>=0)Y=pgTop+o3_rely+TM;else Y=pgTop+o3_rely+iHt-pHt-BM;}else{\r
366 Y=o3_fixy+TM;}}}\r
367 }else{\r
368 if(o3_vauto){\r
369 if(o3_vpos==ABOVE&&OLy-pgTop+OLifY<iHt/2&&OLy-pHt-o3_offsety+OLifY<pgTop)o3_vpos=BELOW;else\r
370 if(o3_vpos==BELOW&&OLy-pgTop+OLifY>iHt/2&&OLy+pHt+o3_offsety+((OLns4||OLkht)?17:0)+OLifY>pgTop+iHt-BM)\r
371 o3_vpos=ABOVE;}Y=(o3_vpos==VCENTER)?parseInt(OLy-((pHt+CY)/2)+o3_offsety):\r
372 (o3_vpos==ABOVE)?OLy-(pHt+o3_offsety+BM):OLy+o3_offsety+TM;\r
373 if(o3_snapy>1){\r
374 snp=Y % o3_snapy;\r
375 if(pHt>0&&o3_vpos==ABOVE){Y=Y-(o3_snapy+snp);}else{Y=Y+(o3_snapy-snp);}}Y+=OLifY;}\r
376 if(!o3_nojusty&&Y+pHt+BM>pgTop+iHt)Y=pgTop+iHt-pHt-BM;if(!o3_nojusty&&Y-TM<pgTop)Y=pgTop+TM;\r
377 OLrepositionTo(over,X,Y);\r
378 if(OLshadowPI)OLrepositionShadow(X,Y);if(OLiframePI)OLrepositionIfs(X,Y);\r
379 if(OLns6&&o3_frame.innerHeight){iHt=o3_frame.innerHeight;OLrepositionTo(over,X,Y);}\r
380 if(OLscrollPI)OLchkScroll(X-pgLeft,Y-pgTop);\r
381 }\r
382 \r
383 // Chooses body or documentElement\r
384 function OLfd(f){\r
385 var fd=((f)?f:o3_frame).document,fdc=fd.compatMode,fdd=fd.documentElement;\r
386 return (!OLop7&&fdc&&fdc!='BackCompat'&&fdd&&fdd.clientWidth)?fd.documentElement:fd.body;\r
387 }\r
388 \r
389 // Gets location of REFerence object\r
390 function OLgetRefXY(r,d){\r
391 var o=OLgetRef(r,d),ob=o,rXY=[o3_refx,o3_refy],of;if(!o)return [null,null];if(OLns4){\r
392 if(typeof o.length!='undefined'&&o.length>1){ob=o[0];rXY[0]+=o[0].x+o[1].pageX;rXY[1]+=o[0].y+o[1].pageY;}else{\r
393 if((o.toString().indexOf('Image')!= -1)||(o.toString().indexOf('Anchor')!= -1)){rXY[0]+=o.x;rXY[1]+=o.y;}\r
394 else{rXY[0]+=o.pageX;rXY[1]+=o.pageY;}}}else{rXY[0]+=OLpageLoc(o,'Left');rXY[1]+=OLpageLoc(o,'Top');}\r
395 of=OLgetRefOffsets(ob);rXY[0]+=of[0];rXY[1]+=of[1];return rXY;\r
396 }\r
397 \r
398 // Seeks REFerence by id\r
399 function OLgetRefById(l,d){\r
400 l=(l||'overDiv');d=(d||o3_frame.document);var j,r;if(d.getElementById)return d.getElementById(l);\r
401 if(OLie4&&d.all)return d.all[l];if(d.layers&&d.layers.length>0){if(d.layers[l])return d.layers[l];\r
402 for(j=0;j<d.layers.length;j++){r=OLgetRefById(l,d.layers[j].document);if(r)return r;}}return null;\r
403 }\r
404 \r
405 // Seeks REFerence by name\r
406 function OLgetRefByName(l,d){\r
407 d=(d||o3_frame.document);var j,r,v=OLie4?d.all.tags('iframe'):OLns6?d.getElementsByTagName('iframe'):null;\r
408 if(typeof d.images!='undefined'&&d.images[l])return d.images[l];\r
409 if(typeof d.anchors!='undefined'&&d.anchors[l])return d.anchors[l];\r
410 if(v)for(j=0;j<v.length;j++)if(v[j].name==l)return v[j];if(d.layers&&d.layers.length>0)for(j=0;j<d.layers.length;j++){\r
411 r=OLgetRefByName(l,d.layers[j].document);if(r&&r.length>0)return r;else if(r)return [r,d.layers[j]];}return null;\r
412 }\r
413 \r
414 // Gets layer vs REFerence offsets\r
415 function OLgetRefOffsets(o){\r
416 var c=o3_refc.toUpperCase(),p=o3_refp.toUpperCase(),W=0,H=0,pW=0,pH=0,of=[0,0];pW=(OLbubblePI&&o3_bubble)?\r
417 o3_width:OLns4?over.clip.width:over.offsetWidth;pH=(OLbubblePI&&o3_bubble)?OLbubbleHt:OLns4?\r
418 over.clip.height:over.offsetHeight;if((!OLop7)&&o.toString().indexOf('Image')!= -1){W=o.width;H=o.height;}\r
419 else if((!OLop7)&&o.toString().indexOf('Anchor')!= -1){c=o3_refc='UL';}else{W=(OLns4)?o.clip.width:o.offsetWidth;\r
420 H=(OLns4)?o.clip.height:o.offsetHeight;}if((OLns4||(OLns6&&OLgek))&&o.border){W+=2*parseInt(o.border);\r
421 H+=2*parseInt(o.border);}if(c=='UL'){of=(p=='UR')?[-pW,0]:(p=='LL')?[0,-pH]:(p=='LR')?[-pW,-pH]:[0,0];}else if(c=='UR'){\r
422 of=(p=='UR')?[W-pW,0]:(p=='LL')?[W,-pH]:(p=='LR')?[W-pW,-pH]:[W,0];}else if(c=='LL'){of=(p=='UR')?[-pW,H]:(p=='LL')?[0,H-pH]:\r
423 (p=='LR')?[-pW,H-pH]:[0,H];}else if(c=='LR'){of=(p=='UR')?[W-pW,H]:(p=='LL')?[W,H-pH]:(p=='LR')?[W-pW,H-pH]:[W,H];}return of;\r
424 }\r
425 \r
426 // Gets x or y location of object\r
427 function OLpageLoc(o,t){\r
428 var l=0,s=o;while(o.offsetParent&&o.offsetParent.tagName.toLowerCase()!='html'){l+=o['offset'+t];o=o.offsetParent;}\r
429 l+=o['offset'+t];if(!OLop7)while(s=s.parentNode){if((s['scroll'+t]>0)&&s.tagName.toLowerCase()=='div')l-=s['scroll'+t];}\r
430 return l;\r
431 }\r
432 \r
433 // Moves layer\r
434 function OLmouseMove(e){\r
435 var e=(e||event);OLx=(e.pageX||e.clientX+OLfd().scrollLeft);OLy=(e.pageY||e.clientY+OLfd().scrollTop);if((OLallowmove&&\r
436 over)&&(o3_frame==self||over==OLgetRefById()||(OLovertwoPI&&over2==over&&over==OLgetRefById('overDiv2')))){OLplaceLayer();\r
437 if(OLhidePI)OLhideUtil(0,1,1,0,0,0);}\r
438 }\r
439 \r
440 // Capture mouse and chain other scripts.\r
441 function OLmh(){\r
442 var fN,f,j,k,s,mh=OLmouseMove,w=(OLns4&&window.onmousemove),re=/function[ ]*(\w*)\(/;OLdw=document;if(document.onmousemove||\r
443 w){if(w)OLdw=window;f=OLdw.onmousemove.toString();fN=f.match(re);if(!fN||fN[1]=='anonymous'||fN[1]=='OLmouseMove'){OLchkMh=0;\r
444 return;}if(fN[1])s=fN[1]+'(e)';else{j=f.indexOf('{');k=f.lastIndexOf('}')+1;s=f.substring(j,k);}s+=';OLmouseMove(e);';\r
445 mh=new Function('e',s);}OLdw.onmousemove=mh;if(OLns4)OLdw.captureEvents(Event.MOUSEMOVE);\r
446 }\r
447 \r
448 /*\r
449  PARSING\r
450 */\r
451 function OLparseTokens(pf,ar){\r
452 var i,v,md= -1,par=(pf!='ol_'),p=OLpar,q=OLparQuo,t=OLtoggle;OLudf=(par&&!ar.length?1:0);\r
453 for(i=0;i<ar.length;i++){if(md<0){if(typeof ar[i]=='number'){OLudf=(par?1:0);i--;}\r
454 else{switch(pf){case 'ol_':ol_text=ar[i];break;default:o3_text=ar[i];}}md=0;}else{\r
455 if(ar[i]==INARRAY){OLudf=0;eval(pf+'text=ol_texts['+ar[(++i)]+']');continue;}\r
456 if(ar[i]==CAPARRAY){eval(pf+'cap=ol_caps['+ar[(++i)]+']');continue;}\r
457 if(ar[i]==CAPTION){q(ar[++i],pf+'cap');continue;}\r
458 if(Math.abs(ar[i])==STICKY){t(ar[i],pf+'sticky');continue;}\r
459 if(Math.abs(ar[i])==NOFOLLOW){t(ar[i],pf+'nofollow');continue;}\r
460 if(ar[i]==BACKGROUND){q(ar[++i],pf+'background');continue;}\r
461 if(Math.abs(ar[i])==NOCLOSE){t(ar[i],pf+'noclose');continue;}\r
462 if(Math.abs(ar[i])==MOUSEOFF){t(ar[i],pf+'mouseoff');continue;}\r
463 if(ar[i]==OFFDELAY){p(ar[++i],pf+'offdelay');continue;}\r
464 if(ar[i]==RIGHT||ar[i]==LEFT||ar[i]==CENTER){p(ar[i],pf+'hpos');continue;}\r
465 if(ar[i]==OFFSETX){p(ar[++i],pf+'offsetx');continue;}\r
466 if(ar[i]==OFFSETY){p(ar[++i],pf+'offsety');continue;}\r
467 if(ar[i]==FGCOLOR){q(ar[++i],pf+'fgcolor');continue;}\r
468 if(ar[i]==BGCOLOR){q(ar[++i],pf+'bgcolor');continue;}\r
469 if(ar[i]==CGCOLOR){q(ar[++i],pf+'cgcolor');continue;}\r
470 if(ar[i]==TEXTCOLOR){q(ar[++i],pf+'textcolor');continue;}\r
471 if(ar[i]==CAPCOLOR){q(ar[++i],pf+'capcolor');continue;}\r
472 if(ar[i]==CLOSECOLOR){q(ar[++i],pf+'closecolor');continue;}\r
473 if(ar[i]==WIDTH){p(ar[++i],pf+'width');continue;}\r
474 if(Math.abs(ar[i])==WRAP){t(ar[i],pf+'wrap');continue;}\r
475 if(ar[i]==WRAPMAX){p(ar[++i],pf+'wrapmax');continue;}\r
476 if(ar[i]==HEIGHT){p(ar[++i],pf+'height');continue;}\r
477 if(ar[i]==BORDER){p(ar[++i],pf+'border');continue;}\r
478 if(ar[i]==BASE){p(ar[++i],pf+'base');continue;}\r
479 if(ar[i]==STATUS){q(ar[++i],pf+'status');continue;}\r
480 if(Math.abs(ar[i])==AUTOSTATUS){v=pf+'autostatus';\r
481 eval(v+'=('+ar[i]+'<0)?('+v+'==2?2:0):('+v+'==1?0:1)');continue;}\r
482 if(Math.abs(ar[i])==AUTOSTATUSCAP){v=pf+'autostatus';\r
483 eval(v+'=('+ar[i]+'<0)?('+v+'==1?1:0):('+v+'==2?0:2)');continue;}\r
484 if(ar[i]==CLOSETEXT){q(ar[++i],pf+'close');continue;}\r
485 if(ar[i]==SNAPX){p(ar[++i],pf+'snapx');continue;}\r
486 if(ar[i]==SNAPY){p(ar[++i],pf+'snapy');continue;}\r
487 if(ar[i]==FIXX){p(ar[++i],pf+'fixx');continue;}\r
488 if(ar[i]==FIXY){p(ar[++i],pf+'fixy');continue;}\r
489 if(ar[i]==RELX){p(ar[++i],pf+'relx');continue;}\r
490 if(ar[i]==RELY){p(ar[++i],pf+'rely');continue;}\r
491 if(ar[i]==MIDX){p(ar[++i],pf+'midx');continue;}\r
492 if(ar[i]==MIDY){p(ar[++i],pf+'midy');continue;}\r
493 if(ar[i]==REF){q(ar[++i],pf+'ref');continue;}\r
494 if(ar[i]==REFC){q(ar[++i],pf+'refc');continue;}\r
495 if(ar[i]==REFP){q(ar[++i],pf+'refp');continue;}\r
496 if(ar[i]==REFX){p(ar[++i],pf+'refx');continue;}\r
497 if(ar[i]==REFY){p(ar[++i],pf+'refy');continue;}\r
498 if(ar[i]==FGBACKGROUND){q(ar[++i],pf+'fgbackground');continue;}\r
499 if(ar[i]==BGBACKGROUND){q(ar[++i],pf+'bgbackground');continue;}\r
500 if(ar[i]==CGBACKGROUND){q(ar[++i],pf+'cgbackground');continue;}\r
501 if(ar[i]==PADX){p(ar[++i],pf+'padxl');p(ar[++i],pf+'padxr');continue;}\r
502 if(ar[i]==PADY){p(ar[++i],pf+'padyt');p(ar[++i],pf+'padyb');continue;}\r
503 if(Math.abs(ar[i])==FULLHTML){t(ar[i],pf+'fullhtml');continue;}\r
504 if(ar[i]==BELOW||ar[i]==ABOVE||ar[i]==VCENTER){p(ar[i],pf+'vpos');continue;}\r
505 if(ar[i]==CAPICON){q(ar[++i],pf+'capicon');continue;}\r
506 if(ar[i]==TEXTFONT){q(ar[++i],pf+'textfont');continue;}\r
507 if(ar[i]==CAPTIONFONT){q(ar[++i],pf+'captionfont');continue;}\r
508 if(ar[i]==CLOSEFONT){q(ar[++i],pf+'closefont');continue;}\r
509 if(ar[i]==TEXTSIZE){q(ar[++i],pf+'textsize');continue;}\r
510 if(ar[i]==CAPTIONSIZE){q(ar[++i],pf+'captionsize');continue;}\r
511 if(ar[i]==CLOSESIZE){q(ar[++i],pf+'closesize');continue;}\r
512 if(ar[i]==TIMEOUT){p(ar[++i],pf+'timeout');continue;}\r
513 if(ar[i]==DELAY){p(ar[++i],pf+'delay');continue;}\r
514 if(Math.abs(ar[i])==HAUTO){t(ar[i],pf+'hauto');continue;}\r
515 if(Math.abs(ar[i])==VAUTO){t(ar[i],pf+'vauto');continue;}\r
516 if(Math.abs(ar[i])==NOJUSTX){t(ar[i],pf+'nojustx');continue;}\r
517 if(Math.abs(ar[i])==NOJUSTY){t(ar[i],pf+'nojusty');continue;}\r
518 if(Math.abs(ar[i])==CLOSECLICK){t(ar[i],pf+'closeclick');continue;}\r
519 if(ar[i]==CLOSETITLE){q(ar[++i],pf+'closetitle');continue;}\r
520 if(ar[i]==FGCLASS){q(ar[++i],pf+'fgclass');continue;}\r
521 if(ar[i]==BGCLASS){q(ar[++i],pf+'bgclass');continue;}\r
522 if(ar[i]==CGCLASS){q(ar[++i],pf+'cgclass');continue;}\r
523 if(ar[i]==TEXTPADDING){p(ar[++i],pf+'textpadding');continue;}\r
524 if(ar[i]==TEXTFONTCLASS){q(ar[++i],pf+'textfontclass');continue;}\r
525 if(ar[i]==CAPTIONPADDING){p(ar[++i],pf+'captionpadding');continue;}\r
526 if(ar[i]==CAPTIONFONTCLASS){q(ar[++i],pf+'captionfontclass');continue;}\r
527 if(ar[i]==CLOSEFONTCLASS){q(ar[++i],pf+'closefontclass');continue;}\r
528 if(Math.abs(ar[i])==CAPBELOW){t(ar[i],pf+'capbelow');continue;}\r
529 if(ar[i]==LABEL){q(ar[++i],pf+'label');continue;}\r
530 if(Math.abs(ar[i])==DECODE){t(ar[i],pf+'decode');continue;}\r
531 if(ar[i]==DONOTHING){continue;}\r
532 i=OLparseCmdLine(pf,i,ar);}}\r
533 if((OLfunctionPI)&&OLudf&&o3_function)o3_text=o3_function();\r
534 if(pf=='o3_')OLfontSize();\r
535 }\r
536 function OLpar(a,v){eval(v+'='+a);}\r
537 function OLparQuo(a,v){eval(v+"='"+OLescSglQt(a)+"'");}\r
538 function OLescSglQt(s){return s.toString().replace(/\\/g,"\\\\").replace(/'/g,"\\'");}\r
539 function OLtoggle(a,v){eval(v+'=('+v+'==0&&'+a+'>=0)?1:0');}\r
540 function OLhasDims(s){return /[%\-a-z]+$/.test(s);}\r
541 function OLfontSize(){\r
542 var i;if(OLhasDims(o3_textsize)){if(OLns4)o3_textsize="2";}else\r
543 if(!OLns4){i=parseInt(o3_textsize);o3_textsize=(i>0&&i<8)?OLpct[i]:OLpct[0];}\r
544 if(OLhasDims(o3_captionsize)){if(OLns4)o3_captionsize="2";}else\r
545 if(!OLns4){i=parseInt(o3_captionsize);o3_captionsize=(i>0&&i<8)?OLpct[i]:OLpct[0];}\r
546 if(OLhasDims(o3_closesize)){if(OLns4)o3_closesize="2";}else\r
547 if(!OLns4){i=parseInt(o3_closesize);o3_closesize=(i>0&&i<8)?OLpct[i]:OLpct[0];}\r
548 if(OLprintPI)OLprintDims();\r
549 }\r
550 function OLdecode(){\r
551 var re=/%[0-9A-Fa-f]{2,}/,t=o3_text,c=o3_cap,u=unescape,d=!OLns4&&(!OLgek||OLgek>=20020826)&&typeof decodeURIComponent?\r
552 decodeURIComponent:u;if(typeof(window.TypeError)=='function'){if(re.test(t)){eval(new Array('try{','o3_text=d(t);',\r
553 '}catch(e){','o3_text=u(t);','}').join('\n'))};if(c&&re.test(c)){eval(new Array('try{','o3_cap=d(c);','}catch(e){',\r
554 'o3_cap=u(c);','}').join('\n'))}}else{if(re.test(t))o3_text=u(t);if(c&&re.test(c))o3_cap=u(c);}\r
555 }\r
556 \r
557 /*\r
558  LAYER FUNCTIONS\r
559 */\r
560 // Writes to layer\r
561 function OLlayerWrite(t){\r
562 t+="\n";if(OLns4){over.document.write(t);over.document.close();}else if(typeof over.innerHTML!='undefined'){\r
563 if(OLieM)over.innerHTML='';over.innerHTML=t;}else{var range=o3_frame.document.createRange();range.setStartAfter(over);\r
564 var domfrag=range.createContextualFragment(t);while(over.hasChildNodes()){over.removeChild(over.lastChild);}\r
565 over.appendChild(domfrag);}if(OLovertwoPI&&over==over2)OLover2HTML=t;else OLoverHTML=t;\r
566 if(OLprintPI)over.print=o3_print?t:null;\r
567 }\r
568 \r
569 // Makes object visible\r
570 function OLshowObject(o){\r
571 OLshowid=0;o=(OLns4)?o:o.style;if(((OLfilterPI)&&!OLchkFilter(o))||!OLfilterPI)o.visibility="visible";\r
572 if(OLshadowPI)OLshowShadow();if(OLiframePI)OLshowIfs();if(OLhidePI)OLhideUtil(1,1,0);\r
573 }\r
574 \r
575 // Hides object\r
576 function OLhideObject(o){\r
577 if(OLshowid>0){clearTimeout(OLshowid);OLshowid=0;}if(OLtimerid>0)clearTimeout(OLtimerid);\r
578 if(OLdelayid>0)clearTimeout(OLdelayid);OLtimerid=0;OLdelayid=0;self.status="";o3_label=ol_label;\r
579 if(o3_frame!=self)o=OLgetRefById();if(o){if(o.onmouseover)o.onmouseover=null;if(OLscrollPI&&o==over)OLclearScroll();\r
580 if(OLdraggablePI)OLclearDrag();if(OLfilterPI)OLcleanupFilter(o);if(OLshadowPI)OLhideShadow();var os=(OLns4)?o:o.style;\r
581 if(((OLfilterPI)&&!OLchkFadeOut(os))||!OLfilterPI){os.visibility="hidden";if(!OLie55||(typeof ggOnChange=='undefined'&&\r
582 (!OLfilterPI||!o3_filter||o3_fadeout<0)))o.innerHTML='';}if(OLhidePI&&o==over)OLhideUtil(0,0,1);if(OLiframePI)OLhideIfs(o);}\r
583 }\r
584 \r
585 // Moves layer\r
586 function OLrepositionTo(o,xL,yL){\r
587 o=(OLns4)?o:o.style;o.left=(OLns4?xL:xL+'px');o.top=(OLns4?yL:yL+'px');\r
588 }\r
589 \r
590 // Handle NOCLOSE-MOUSEOFF\r
591 function OLoptMOUSEOFF(c){\r
592 if(!c)o3_close="";over.onmouseover=function(){OLhover=1;if(OLtimerid>0){clearTimeout(OLtimerid);OLtimerid=0;}}\r
593 over.onmouseout=function(){if(OLhover){OLcC=(OLovertwoPI&&over2&&over==over2?cClick2:cClick);if(OLtimerid>0)\r
594 clearTimeout(OLtimerid);OLtimerid=setTimeout("OLcC()",(o3_offdelay<1)?1:o3_offdelay);}}\r
595 }\r
596 function OLcursorOff(){\r
597 var o=(OLns4?over:over.style),pHt=OLns4?over.clip.height:over.offsetHeight,left=parseInt(o.left),top=parseInt(o.top),\r
598 right=left+o3_width,bottom=top+((OLbubblePI&&o3_bubble)?OLbubbleHt:pHt);\r
599 if(OLx<left||OLx>right||OLy<top||OLy>bottom)return true;return false;\r
600 }\r
601 \r
602 /*\r
603  REGISTRATION\r
604 */\r
605 function OLsetRunTimeVar(){\r
606 if(OLrunTime.length)for(var k=0;k<OLrunTime.length;k++)OLrunTime[k]();\r
607 }\r
608 function OLparseCmdLine(pf,i,ar){\r
609 if(OLcmdLine.length){for(var k=0;k<OLcmdLine.length;k++){var j=OLcmdLine[k](pf,i,ar);if(j>-1){i=j;break;}}}return i;\r
610 }\r
611 function OLregCmds(c){\r
612 if(typeof c!='string')return;var pM=c.split(',');pMtr=pMtr.concat(pM);\r
613 for(var i=0;i<pM.length;i++)eval(pM[i].toUpperCase()+'='+(pmCnt++));\r
614 }\r
615 function OLregRunTimeFunc(f){\r
616 if(typeof f=='object')OLrunTime=OLrunTime.concat(f);else OLrunTime[OLrunTime.length++]=f;\r
617 }\r
618 function OLregCmdLineFunc(f){\r
619 if(typeof f=='object')OLcmdLine=OLcmdLine.concat(f);else OLcmdLine[OLcmdLine.length++]=f;\r
620 }\r
621 \r
622 OLloaded=1;\r