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