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