Add "View email logs" ACL - "View customers of all agents" was definitely not the...
[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: January 5, 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){if(parent.OLo2Ref){parent.OLeval(\r
153 parent.OLo2Ref);parent.OLo2Ref="";}if(parent.OLifRef){parent.OLeval(parent.OLifRef);parent.OLifRef="";}}if(OLo2Ref){\r
154 eval(OLo2Ref);OLo2Ref="";}if(OLifRef){eval(OLifRef);OLifRef="";}OLload(OLp1or2);OLload(OLp1);OLfnRef="";OLifX=0;OLifY=0;\r
155 OLhover=0;if(OLcrossframePI&&parent!=self)OLchkFRAME(arguments);OLsetRunTimeVar();OLparseTokens('o3_',arguments);if(!(\r
156 over=OLmkLyr()))return false;over.onmouseover=over.onmouseout=null;if(o3_decode)OLdecode();if(OLprintPI)OLchkPrint();\r
157 if(OLbubblePI)OLchkForBubbleEffect();if(OLdebugPI)OLsetDebugCanShow();if(OLshadowPI)OLinitShadow();if(OLiframePI)OLinitIfs();\r
158 if(OLfilterPI)OLinitFilterLyr();if(OLexclusivePI&&o3_exclusive&&o3_exclusivestatus!="")o3_status=o3_exclusivestatus;else\r
159 if(o3_autostatus==2&&o3_cap!="")o3_status=o3_cap;else if(o3_autostatus==1&&o3_text!="")o3_status=o3_text;if(!o3_delay){\r
160 return OLmain();}else{OLdelayid=setTimeout("OLmain()",o3_delay);if(o3_status!=""){self.status=o3_status;return true;}else\r
161 if(!(OLop7&&event&&event.type=='mouseover'))return false;}\r
162 }\r
163 function OLeval(s){eval(s);}\r
164 \r
165 // Clears popups if appropriate\r
166 function nd(time){\r
167 if(OLloaded&&OLgateOK){if(!((OLexclusivePI)&&OLisExclusive())){if(time&&over&&!o3_delay){if(OLtimerid>0)\r
168 clearTimeout(OLtimerid);OLtimerid=(OLhover&&!OLcursorOff())?0:setTimeout("cClick()",(o3_timeout=OLndt=time));\r
169 }else{if(!OLshowingsticky){OLallowmove=0;if(over)OLhideObject(over);}}}}return false;\r
170 }\r
171 \r
172 // Close function for stickies\r
173 function cClick(){\r
174 if(OLloaded&&OLgateOK){OLhover=0;if(over){if(OLo2Ref){eval(OLo2Ref);OLo2Ref="";}if(OLovertwoPI&&over==over2)cClick2();\r
175 OLhideObject(over);OLshowingsticky=0;OLallowmove=0;}if(OLmodalPI)OLclearModal();}return false;\r
176 }\r
177 \r
178 // Sets page-specific defaults.\r
179 function OLpageDefaults(){\r
180 OLparseTokens('ol_',arguments);\r
181 }\r
182 \r
183 // Gets object referenced by its id or name\r
184 function OLgetRef(l,d){var r=OLgetRefById(l,d);return (r)?r:OLgetRefByName(l,d);}\r
185 \r
186 // For unsupported browsers.\r
187 function no_overlib(){return false;}\r
188 \r
189 /*\r
190  OVERLIB MAIN FUNCTION SET\r
191 */\r
192 function OLmain(){\r
193 o3_delay=0;if(parent!=self&&o3_frame==parent&&parent.OLscrollPI&&parent.over)parent.OLclearScroll();if(o3_noclose)\r
194 OLoptMOUSEOFF(0);else if(o3_mouseoff)OLoptMOUSEOFF(1);if(o3_sticky){OLshowingsticky=1;if(OLfnRef&&parent!=self&&\r
195 o3_frame==parent&&parent.overlib)parent.OLifRef=(OLfilterPI?OLfnRef+'o3_filter=0;':'')+OLfnRef+'cClick();';}OLdoLyr();\r
196 OLallowmove=0;if(o3_timeout>0){if(OLtimerid>0)clearTimeout(OLtimerid);OLtimerid=setTimeout("cClick()",o3_timeout);}\r
197 OLchkRef();OLdisp(o3_status);if(OLdraggablePI)OLcheckDrag();if(o3_status!="")return true;else if(!(OLop7&&event&&\r
198 event.type=='mouseover'))return false;\r
199 }\r
200 function OLchkRef(){\r
201 if(o3_ref){OLrefXY=OLgetRefXY(o3_ref);if(OLrefXY[0]==null&&OLcrossframePI)OLchkIfRef();\r
202 if(OLrefXY[0]==null){o3_ref="";o3_midx=0;o3_midy=0;}}\r
203 }\r
204 \r
205 // Loads o3_ variables\r
206 function OLload(c){var i,m=c.split(',');for(i=0;i<m.length;i++)eval('o3_'+m[i]+'=ol_'+m[i]);}\r
207 \r
208 // Chooses LGF \r
209 function OLdoLGF(){\r
210 return (o3_background!=''||o3_fullhtml)?OLcontentBackground(o3_text,o3_background,o3_fullhtml):(o3_cap=="")?\r
211 OLcontentSimple(o3_text):(o3_sticky)?OLcontentCaption(o3_text,o3_cap,o3_close):OLcontentCaption(o3_text,o3_cap,'');\r
212 }\r
213 \r
214 // Makes Layer\r
215 function OLmkLyr(id,f,z){\r
216 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
217 new Layer(1024,f);else if(OLie4&&!OLop7){fd.body.insertAdjacentHTML('AfterBegin','<div id="'+id+'"></div>');d=fd.all[id];}\r
218 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
219 d.style;o.position='absolute';o.visibility='hidden';o.zIndex=z;}}return d;\r
220 }\r
221 \r
222 // Creates and writes layer content\r
223 function OLdoLyr(){\r
224 if(o3_sticky&&OLtimerid>0){clearTimeout(OLtimerid);OLtimerid=0;}if(o3_background==''&&!o3_fullhtml){\r
225 if(o3_fgbackground!='')o3_fgbackground=' background="'+o3_fgbackground+'"';\r
226 if(o3_bgbackground!='')o3_bgbackground=' background="'+o3_bgbackground+'"';\r
227 if(o3_cgbackground!='')o3_cgbackground=' background="'+o3_cgbackground+'"';\r
228 if(o3_fgcolor!='')o3_fgcolor=' bgcolor="'+o3_fgcolor+'"';if(o3_bgcolor!='')o3_bgcolor=' bgcolor="'+o3_bgcolor+'"';\r
229 if(o3_cgcolor!='')o3_cgcolor=' bgcolor="'+o3_cgcolor+'"';if(o3_height>0)o3_height=(OLns4)?' height="'+o3_height+'"':\r
230 ' style="height:'+o3_height+'px;"';else o3_height='';}if(!OLns4)OLrepositionTo(over,(OLns6?20:0),0);var lyrHtml=OLdoLGF();\r
231 if(o3_wrap&&!o3_fullhtml){OLlayerWrite(lyrHtml);o3_width=(OLns4?over.clip.width:over.offsetWidth);if(OLie4&&!OLop95){\r
232 var w=OLfd().clientWidth;if(o3_width>=w){if(OLop7){if(OLovertwoPI&&over==over2){var z=over2.style.zIndex;\r
233 o3_frame.document.body.removeChild(over);over2=OLmkLyr('overDiv2',o3_frame,z);over=over2;}else{\r
234 o3_frame.document.body.removeChild(over);over=OLmkLyr();}}o3_width=w-20;}}\r
235 if(o3_wrapmax<1&&o3_frame.innerWidth)o3_wrapmax=o3_frame.innerWidth-40;\r
236 if(o3_wrapmax>0&&o3_width>o3_wrapmax)o3_width=o3_wrapmax;o3_wrap=0;lyrHtml=OLdoLGF();}OLlayerWrite(lyrHtml);\r
237 o3_width=(OLns4?over.clip.width:over.offsetWidth);if(OLbubblePI)OLgenerateBubble(lyrHtml);\r
238 }\r
239 \r
240 /*\r
241  LAYER GENERATION FUNCTIONS\r
242 */\r
243 // Makes simple table without caption\r
244 function OLcontentSimple(txt){\r
245 var t=OLbgLGF()+OLfgLGF(txt)+OLbaseLGF();OLsetBackground('');return t;\r
246 }\r
247 \r
248 // Makes table with caption and optional close link\r
249 function OLcontentCaption(txt,title,close){\r
250 var closing=(OLprintPI?OLprintCapLGF():''),closeevent='onmouseover',caption,t,cC='javascript:return '+OLfnRef\r
251 +(OLovertwoPI&&over==over2?'cClick2();':'cClick();');if(o3_closeclick)closeevent=(o3_closetitle?'title="'\r
252 +o3_closetitle+'" ':'')+'onclick';if(o3_capicon!=''&&o3_capicon.indexOf('<img')!=0)o3_capicon='<img src="'+o3_capicon\r
253 +'" /> ';if(close){closing+='<td align="right"><a href="'+cC+'" '+closeevent+'="'+cC+'"'+(o3_closefontclass?' class="'\r
254 +o3_closefontclass+'">':(OLns4?'><':'')+OLlgfUtil(0,1,'','a',o3_closecolor,o3_closefont,o3_closesize))+close+\r
255 (o3_closefontclass?'':(OLns4?OLlgfUtil(1,1,'','a'):''))+'</a></td>';}caption='<table id="overCap'\r
256 +(OLovertwoPI&&over==over2?'2':'')+'"'+OLwd(0)+' border="0" cellpadding="'+o3_captionpadding+'" cellspacing="0"'\r
257 +(o3_cgclass?' class="'+o3_cgclass+'"':o3_cgcolor+o3_cgbackground)+'><tr><td'+OLwd(0)+(o3_cgclass?' class="'\r
258 +o3_cgclass+'">':'>')+(o3_captionfontclass?'<div'+OLhL(1)+' class="'+o3_captionfontclass+'">':OLlgfUtil(0,1,'','div',\r
259 o3_capcolor,o3_captionfont,o3_captionsize))+o3_capicon+title+OLlgfUtil(1,1,'','div')+'</td>'+closing+'</tr></table>';\r
260 t=OLbgLGF()+(o3_capbelow?OLfgLGF(txt)+caption:caption+OLfgLGF(txt))+OLbaseLGF();OLsetBackground('');return t;\r
261 }\r
262 \r
263 // For BACKGROUND and FULLHTML commands\r
264 function OLcontentBackground(txt,image,hasfullhtml){\r
265 var t;if(hasfullhtml){t=txt;}else{t='<table'+OLwd(1)+' border="0" cellpadding="0" '+'cellspacing="0" '+'height="'\r
266 +o3_height+'"><tr><td colspan="3" height="'+o3_padyt+'"></td></tr><tr><td width="'+o3_padxl+'"></td><td valign="top"'\r
267 +OLwd(2)+'>'+OLlgfUtil(0,0,o3_textfontclass,'div',o3_textcolor,o3_textfont,o3_textsize)+txt+OLlgfUtil(1,0,'','div')\r
268 +'</td><td width="'+o3_padxr+'"></td></tr><tr><td colspan="3" height="'+o3_padyb+'"></td></tr></table>';}\r
269 OLsetBackground(image);return t;\r
270 }\r
271 \r
272 // LGF utilities\r
273 function OLbgLGF(){\r
274 return '<table'+OLwd(1)+o3_height+' border="0" cellpadding="'+o3_border+'" cellspacing="0"'+(o3_bgclass?' class="'\r
275 +o3_bgclass+'"':o3_bgcolor+o3_bgbackground)+'><tr><td>';\r
276 }\r
277 function OLfgLGF(t){\r
278 return '<table'+OLwd(0)+o3_height+' border="0" cellpadding="'+o3_textpadding+'" cellspacing="0"'+(o3_fgclass?' class="'\r
279 +o3_fgclass+'"':o3_fgcolor+o3_fgbackground)+'><tr><td valign="top"'+(o3_fgclass?' class="'+o3_fgclass+'"':'')+'>'\r
280 +OLlgfUtil(0,0,o3_textfontclass,'div',o3_textcolor,o3_textfont,o3_textsize)+t+(OLprintPI?OLprintFgLGF():'')\r
281 +OLlgfUtil(1,0,'','div')+'</td></tr></table>';\r
282 }\r
283 function OLlgfUtil(end,stg,tfc,ele,col,fac,siz){\r
284 if(end)return('</'+(OLns4?'font'+(stg?'></strong':''):ele)+'>');else return(tfc?'<div'+OLhL(1)+' class="'+tfc+'">':\r
285 ((ele=='a'?'':'<')+(OLns4?(stg?'strong><':'')+'font color="'+col+'" face="'+OLquoteMultiNameFonts(fac)+'" size="'\r
286 +siz:(ele=='a'?'':ele)+' style="'+((ele=='div')?OLhL(0):'')+'color:'+col+(stg?';font-weight:bold':'')+';font-family:'\r
287 +OLquoteMultiNameFonts(fac)+';font-size:'+siz+';'+(ele=='span'?'text-decoration:underline;':''))+'">'));\r
288 }\r
289 function OLquoteMultiNameFonts(f){\r
290 var i,v,pM=f.split(',');for(i=0;i<pM.length;i++){v=pM[i];v=v.replace(/^\s+/,'').replace(/\s+$/,'');\r
291 if(/\s/.test(v) && !/['"]/.test(v)){v="\'"+v+"\'";pM[i]=v;}}return pM.join();\r
292 }\r
293 function OLbaseLGF(){\r
294 return ((o3_base>0&&!o3_wrap)?('<table width="100%" border="0" cellpadding="0" cellspacing="0"'+(o3_bgclass?' class="'\r
295 +o3_bgclass+'"':'')+'><tr><td height="'+o3_base+'"></td></tr></table>'):'')+'</td></tr></table>';\r
296 }\r
297 function OLwd(a){return(o3_wrap?'':' width="'+(!a?'100%':(a==1?o3_width:(o3_width-o3_padxl-o3_padxr)))+'"');}\r
298 function OLhL(s){if(!OLie5)return '';return(s?' style="overflow:auto;"':'overflow:auto;');}\r
299 \r
300 // Loads image into the div.\r
301 function OLsetBackground(i){\r
302 if(i==''){if(OLns4)over.background.src=null;else{if(OLns6)over.style.width='';over.style.backgroundImage='none';}}\r
303 else{if(OLns4)over.background.src=i;else{if(OLns6)over.style.width=o3_width+'px';over.style.backgroundImage='url('+i+')';}}\r
304 }\r
305 \r
306 /*\r
307  HANDLING FUNCTIONS\r
308 */\r
309 // Displays layer\r
310 function OLdisp(s){\r
311 if(OLmodalPI&&!o3_modalscroll)OLchkModal();if(!OLallowmove){if(OLshadowPI)OLdispShadow();if(OLiframePI)OLdispIfs();\r
312 OLplaceLayer();if(OLmodalPI&&o3_modalscroll)OLchkModal();if(OLndt)OLshowObject(over);else OLshowid=\r
313 setTimeout("OLshowObject(over)",1);OLallowmove=(o3_sticky||o3_nofollow)?0:1;}OLndt=0;if(s!="")self.status=s;\r
314 }\r
315 \r
316 // Decides placement of layer.\r
317 function OLplaceLayer(){\r
318 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
319 nsb=(OLgek>=20010505&&!o3_frame.scrollbars.visible)?1:0;\r
320 if(!OLkht&&!OLop95&&o&&o.clientWidth)iWd=o.clientWidth;\r
321 else if(o3_frame.innerWidth){SB=Math.ceil(1.4*(o3_frame.outerWidth-o3_frame.innerWidth));\r
322 if(SB>20)SB=20;iWd=o3_frame.innerWidth;}\r
323 pgLeft=(OLie4&&!OLop95)?o.scrollLeft:o3_frame.pageXOffset;\r
324 if(OLie55&&OLfilterPI&&o3_filter&&o3_filtershadow)SB=CX=5;else\r
325 if((OLshadowPI)&&bkdrop&&o3_shadow&&o3_shadowx){SB+=((o3_shadowx>0)?o3_shadowx:0);\r
326 LM=((o3_shadowx<0)?Math.abs(o3_shadowx):0);CX=Math.abs(o3_shadowx);}\r
327 if(o3_ref!=""||o3_fixx> -1||o3_relx!=null||o3_midx!=null){\r
328 if(o3_ref!=""){X=OLrefXY[0];if(OLie55&&OLfilterPI&&o3_filter&&o3_filtershadow){\r
329 if(o3_refp=='UR'||o3_refp=='LR')X-=5;}\r
330 else if((OLshadowPI)&&bkdrop&&o3_shadow&&o3_shadowx){\r
331 if(o3_shadowx<0&&(o3_refp=='UL'||o3_refp=='LL'))X-=o3_shadowx;else\r
332 if(o3_shadowx>0&&(o3_refp=='UR'||o3_refp=='LR'))X-=o3_shadowx;}\r
333 }else{if(o3_midx!=null){\r
334 X=parseInt(pgLeft+((iWd-pWd-SB-LM)/2)+o3_midx);\r
335 }else{if(o3_relx!=null){\r
336 if(o3_relx>=0)X=pgLeft+o3_relx+LM;else X=pgLeft+o3_relx+iWd-pWd-SB;\r
337 }else{X=o3_fixx+LM;}}}\r
338 }else{\r
339 if(o3_hauto){\r
340 if(o3_hpos==LEFT&&OLx-pgLeft+OLifX<iWd/2&&OLx-pWd-o3_offsetx+OLifX<pgLeft+LM)o3_hpos=RIGHT;else\r
341 if(o3_hpos==RIGHT&&OLx-pgLeft+OLifX>iWd/2&&OLx+pWd+o3_offsetx+OLifX>pgLeft+iWd-SB)o3_hpos=LEFT;}\r
342 X=(o3_hpos==CENTER)?parseInt(OLx-((pWd+CX)/2)+o3_offsetx):\r
343 (o3_hpos==LEFT)?OLx-o3_offsetx-pWd:OLx+o3_offsetx;\r
344 if(o3_snapx>1){\r
345 snp=X % o3_snapx;\r
346 if(o3_hpos==LEFT){X=X-(o3_snapx+snp);}else{X=X+(o3_snapx-snp);}}X+=OLifX;}\r
347 if(!o3_nojustx&&X+pWd>pgLeft+iWd-SB)\r
348 X=iWd+pgLeft-pWd-SB;if(!o3_nojustx&&X-LM<pgLeft)X=pgLeft+LM;\r
349 pgTop=OLie4&&!OLop95?o.scrollTop:o3_frame.pageYOffset;\r
350 if(!OLkht&&!OLop95&&!nsb&&o&&o.clientHeight)iHt=o.clientHeight;\r
351 else if(o3_frame.innerHeight)iHt=o3_frame.innerHeight;\r
352 if(OLbubblePI&&o3_bubble)pHt=OLbubbleHt;else pHt=OLns4?over.clip.height:over.offsetHeight;\r
353 if((OLshadowPI)&&bkdrop&&o3_shadow&&o3_shadowy){TM=(o3_shadowy<0)?Math.abs(o3_shadowy):0;\r
354 if(OLie55&&OLfilterPI&&o3_filter&&o3_filtershadow)BM=CY=5;else\r
355 BM=(o3_shadowy>0)?o3_shadowy:0;CY=Math.abs(o3_shadowy);}\r
356 if(o3_ref!=""||o3_fixy> -1||o3_rely!=null||o3_midy!=null){\r
357 if(o3_ref!=""){Y=OLrefXY[1];if(OLie55&&OLfilterPI&&o3_filter&&o3_filtershadow){\r
358 if(o3_refp=='LL'||o3_refp=='LR')Y-=5;}else if((OLshadowPI)&&bkdrop&&o3_shadow&&o3_shadowy){\r
359 if(o3_shadowy<0&&(o3_refp=='UL'||o3_refp=='UR'))Y-=o3_shadowy;else\r
360 if(o3_shadowy>0&&(o3_refp=='LL'||o3_refp=='LR'))Y-=o3_shadowy;}\r
361 }else{if(o3_midy!=null){\r
362 Y=parseInt(pgTop+((iHt-pHt-CY)/2)+o3_midy);\r
363 }else{if(o3_rely!=null){\r
364 if(o3_rely>=0)Y=pgTop+o3_rely+TM;else Y=pgTop+o3_rely+iHt-pHt-BM;}else{\r
365 Y=o3_fixy+TM;}}}\r
366 }else{\r
367 if(o3_vauto){\r
368 if(o3_vpos==ABOVE&&OLy-pgTop+OLifY<iHt/2&&OLy-pHt-o3_offsety+OLifY<pgTop)o3_vpos=BELOW;else\r
369 if(o3_vpos==BELOW&&OLy-pgTop+OLifY>iHt/2&&OLy+pHt+o3_offsety+((OLns4||OLkht)?17:0)+OLifY>pgTop+iHt-BM)\r
370 o3_vpos=ABOVE;}Y=(o3_vpos==VCENTER)?parseInt(OLy-((pHt+CY)/2)+o3_offsety):\r
371 (o3_vpos==ABOVE)?OLy-(pHt+o3_offsety+BM):OLy+o3_offsety+TM;\r
372 if(o3_snapy>1){\r
373 snp=Y % o3_snapy;\r
374 if(pHt>0&&o3_vpos==ABOVE){Y=Y-(o3_snapy+snp);}else{Y=Y+(o3_snapy-snp);}}Y+=OLifY;}\r
375 if(!o3_nojusty&&Y+pHt+BM>pgTop+iHt)Y=pgTop+iHt-pHt-BM;if(!o3_nojusty&&Y-TM<pgTop)Y=pgTop+TM;\r
376 OLrepositionTo(over,X,Y);\r
377 if(OLshadowPI)OLrepositionShadow(X,Y);if(OLiframePI)OLrepositionIfs(X,Y);\r
378 if(OLns6&&o3_frame.innerHeight){iHt=o3_frame.innerHeight;OLrepositionTo(over,X,Y);}\r
379 if(OLscrollPI)OLchkScroll(X-pgLeft,Y-pgTop);\r
380 }\r
381 \r
382 // Chooses body or documentElement\r
383 function OLfd(f){\r
384 var fd=((f)?f:o3_frame).document,fdc=fd.compatMode,fdd=fd.documentElement;\r
385 return (!OLop7&&fdc&&fdc!='BackCompat'&&fdd&&fdd.clientWidth)?fd.documentElement:fd.body;\r
386 }\r
387 \r
388 // Gets location of REFerence object\r
389 function OLgetRefXY(r,d){\r
390 var o=OLgetRef(r,d),ob=o,rXY=[o3_refx,o3_refy],of;if(!o)return [null,null];if(OLns4){\r
391 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
392 if((o.toString().indexOf('Image')!= -1)||(o.toString().indexOf('Anchor')!= -1)){rXY[0]+=o.x;rXY[1]+=o.y;}\r
393 else{rXY[0]+=o.pageX;rXY[1]+=o.pageY;}}}else{rXY[0]+=OLpageLoc(o,'Left');rXY[1]+=OLpageLoc(o,'Top');}\r
394 of=OLgetRefOffsets(ob);rXY[0]+=of[0];rXY[1]+=of[1];return rXY;\r
395 }\r
396 \r
397 // Seeks REFerence by id\r
398 function OLgetRefById(l,d){\r
399 l=(l||'overDiv');d=(d||o3_frame.document);var j,r;if(d.getElementById)return d.getElementById(l);\r
400 if(OLie4&&d.all)return d.all[l];if(d.layers&&d.layers.length>0){if(d.layers[l])return d.layers[l];\r
401 for(j=0;j<d.layers.length;j++){r=OLgetRefById(l,d.layers[j].document);if(r)return r;}}return null;\r
402 }\r
403 \r
404 // Seeks REFerence by name\r
405 function OLgetRefByName(l,d){\r
406 d=(d||o3_frame.document);var j,r,v=OLie4?d.all.tags('iframe'):OLns6?d.getElementsByTagName('iframe'):null;\r
407 if(typeof d.images!='undefined'&&d.images[l])return d.images[l];\r
408 if(typeof d.anchors!='undefined'&&d.anchors[l])return d.anchors[l];\r
409 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
410 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
411 }\r
412 \r
413 // Gets layer vs REFerence offsets\r
414 function OLgetRefOffsets(o){\r
415 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
416 o3_width:OLns4?over.clip.width:over.offsetWidth;pH=(OLbubblePI&&o3_bubble)?OLbubbleHt:OLns4?\r
417 over.clip.height:over.offsetHeight;if((!OLop7)&&o.toString().indexOf('Image')!= -1){W=o.width;H=o.height;}\r
418 else if((!OLop7)&&o.toString().indexOf('Anchor')!= -1){c=o3_refc='UL';}else{W=(OLns4)?o.clip.width:o.offsetWidth;\r
419 H=(OLns4)?o.clip.height:o.offsetHeight;}if((OLns4||(OLns6&&OLgek))&&o.border){W+=2*parseInt(o.border);\r
420 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
421 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
422 (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
423 }\r
424 \r
425 // Gets x or y location of object\r
426 function OLpageLoc(o,t){\r
427 var l=0,s=o;while(o.offsetParent&&o.offsetParent.tagName.toLowerCase()!='html'){l+=o['offset'+t];o=o.offsetParent;}\r
428 l+=o['offset'+t];if(!OLop7)while(s=s.parentNode){if((s['scroll'+t]>0)&&s.tagName.toLowerCase()=='div')l-=s['scroll'+t];}\r
429 return l;\r
430 }\r
431 \r
432 // Moves layer\r
433 function OLmouseMove(e){\r
434 var e=(e||event);OLx=(e.pageX||e.clientX+OLfd().scrollLeft);OLy=(e.pageY||e.clientY+OLfd().scrollTop);if((OLallowmove&&\r
435 over)&&(o3_frame==self||over==OLgetRefById()||(OLovertwoPI&&over2==over&&over==OLgetRefById('overDiv2')))){OLplaceLayer();\r
436 if(OLhidePI)OLhideUtil(0,1,1,0,0,0);}\r
437 }\r
438 \r
439 // Capture mouse and chain other scripts.\r
440 function OLmh(){\r
441 var fN,f,j,k,s,mh=OLmouseMove,w=(OLns4&&window.onmousemove),re=/function[ ]*(\w*)\(/;OLdw=document;if(document.onmousemove||\r
442 w){if(w)OLdw=window;f=OLdw.onmousemove.toString();fN=f.match(re);if(!fN||fN[1]=='anonymous'||fN[1]=='OLmouseMove'){OLchkMh=0;\r
443 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
444 mh=new Function('e',s);}OLdw.onmousemove=mh;if(OLns4)OLdw.captureEvents(Event.MOUSEMOVE);\r
445 }\r
446 \r
447 /*\r
448  PARSING\r
449 */\r
450 function OLparseTokens(pf,ar){\r
451 var i,v,md= -1,par=(pf!='ol_'),p=OLpar,q=OLparQuo,t=OLtoggle;OLudf=(par&&!ar.length?1:0);\r
452 for(i=0;i<ar.length;i++){if(md<0){if(typeof ar[i]=='number'){OLudf=(par?1:0);i--;}\r
453 else{switch(pf){case 'ol_':ol_text=ar[i];break;default:o3_text=ar[i];}}md=0;}else{\r
454 if(ar[i]==INARRAY){OLudf=0;eval(pf+'text=ol_texts['+ar[(++i)]+']');continue;}\r
455 if(ar[i]==CAPARRAY){eval(pf+'cap=ol_caps['+ar[(++i)]+']');continue;}\r
456 if(ar[i]==CAPTION){q(ar[++i],pf+'cap');continue;}\r
457 if(Math.abs(ar[i])==STICKY){t(ar[i],pf+'sticky');continue;}\r
458 if(Math.abs(ar[i])==NOFOLLOW){t(ar[i],pf+'nofollow');continue;}\r
459 if(ar[i]==BACKGROUND){q(ar[++i],pf+'background');continue;}\r
460 if(Math.abs(ar[i])==NOCLOSE){t(ar[i],pf+'noclose');continue;}\r
461 if(Math.abs(ar[i])==MOUSEOFF){t(ar[i],pf+'mouseoff');continue;}\r
462 if(ar[i]==OFFDELAY){p(ar[++i],pf+'offdelay');continue;}\r
463 if(ar[i]==RIGHT||ar[i]==LEFT||ar[i]==CENTER){p(ar[i],pf+'hpos');continue;}\r
464 if(ar[i]==OFFSETX){p(ar[++i],pf+'offsetx');continue;}\r
465 if(ar[i]==OFFSETY){p(ar[++i],pf+'offsety');continue;}\r
466 if(ar[i]==FGCOLOR){q(ar[++i],pf+'fgcolor');continue;}\r
467 if(ar[i]==BGCOLOR){q(ar[++i],pf+'bgcolor');continue;}\r
468 if(ar[i]==CGCOLOR){q(ar[++i],pf+'cgcolor');continue;}\r
469 if(ar[i]==TEXTCOLOR){q(ar[++i],pf+'textcolor');continue;}\r
470 if(ar[i]==CAPCOLOR){q(ar[++i],pf+'capcolor');continue;}\r
471 if(ar[i]==CLOSECOLOR){q(ar[++i],pf+'closecolor');continue;}\r
472 if(ar[i]==WIDTH){p(ar[++i],pf+'width');continue;}\r
473 if(Math.abs(ar[i])==WRAP){t(ar[i],pf+'wrap');continue;}\r
474 if(ar[i]==WRAPMAX){p(ar[++i],pf+'wrapmax');continue;}\r
475 if(ar[i]==HEIGHT){p(ar[++i],pf+'height');continue;}\r
476 if(ar[i]==BORDER){p(ar[++i],pf+'border');continue;}\r
477 if(ar[i]==BASE){p(ar[++i],pf+'base');continue;}\r
478 if(ar[i]==STATUS){q(ar[++i],pf+'status');continue;}\r
479 if(Math.abs(ar[i])==AUTOSTATUS){v=pf+'autostatus';\r
480 eval(v+'=('+ar[i]+'<0)?('+v+'==2?2:0):('+v+'==1?0:1)');continue;}\r
481 if(Math.abs(ar[i])==AUTOSTATUSCAP){v=pf+'autostatus';\r
482 eval(v+'=('+ar[i]+'<0)?('+v+'==1?1:0):('+v+'==2?0:2)');continue;}\r
483 if(ar[i]==CLOSETEXT){q(ar[++i],pf+'close');continue;}\r
484 if(ar[i]==SNAPX){p(ar[++i],pf+'snapx');continue;}\r
485 if(ar[i]==SNAPY){p(ar[++i],pf+'snapy');continue;}\r
486 if(ar[i]==FIXX){p(ar[++i],pf+'fixx');continue;}\r
487 if(ar[i]==FIXY){p(ar[++i],pf+'fixy');continue;}\r
488 if(ar[i]==RELX){p(ar[++i],pf+'relx');continue;}\r
489 if(ar[i]==RELY){p(ar[++i],pf+'rely');continue;}\r
490 if(ar[i]==MIDX){p(ar[++i],pf+'midx');continue;}\r
491 if(ar[i]==MIDY){p(ar[++i],pf+'midy');continue;}\r
492 if(ar[i]==REF){q(ar[++i],pf+'ref');continue;}\r
493 if(ar[i]==REFC){q(ar[++i],pf+'refc');continue;}\r
494 if(ar[i]==REFP){q(ar[++i],pf+'refp');continue;}\r
495 if(ar[i]==REFX){p(ar[++i],pf+'refx');continue;}\r
496 if(ar[i]==REFY){p(ar[++i],pf+'refy');continue;}\r
497 if(ar[i]==FGBACKGROUND){q(ar[++i],pf+'fgbackground');continue;}\r
498 if(ar[i]==BGBACKGROUND){q(ar[++i],pf+'bgbackground');continue;}\r
499 if(ar[i]==CGBACKGROUND){q(ar[++i],pf+'cgbackground');continue;}\r
500 if(ar[i]==PADX){p(ar[++i],pf+'padxl');p(ar[++i],pf+'padxr');continue;}\r
501 if(ar[i]==PADY){p(ar[++i],pf+'padyt');p(ar[++i],pf+'padyb');continue;}\r
502 if(Math.abs(ar[i])==FULLHTML){t(ar[i],pf+'fullhtml');continue;}\r
503 if(ar[i]==BELOW||ar[i]==ABOVE||ar[i]==VCENTER){p(ar[i],pf+'vpos');continue;}\r
504 if(ar[i]==CAPICON){q(ar[++i],pf+'capicon');continue;}\r
505 if(ar[i]==TEXTFONT){q(ar[++i],pf+'textfont');continue;}\r
506 if(ar[i]==CAPTIONFONT){q(ar[++i],pf+'captionfont');continue;}\r
507 if(ar[i]==CLOSEFONT){q(ar[++i],pf+'closefont');continue;}\r
508 if(ar[i]==TEXTSIZE){q(ar[++i],pf+'textsize');continue;}\r
509 if(ar[i]==CAPTIONSIZE){q(ar[++i],pf+'captionsize');continue;}\r
510 if(ar[i]==CLOSESIZE){q(ar[++i],pf+'closesize');continue;}\r
511 if(ar[i]==TIMEOUT){p(ar[++i],pf+'timeout');continue;}\r
512 if(ar[i]==DELAY){p(ar[++i],pf+'delay');continue;}\r
513 if(Math.abs(ar[i])==HAUTO){t(ar[i],pf+'hauto');continue;}\r
514 if(Math.abs(ar[i])==VAUTO){t(ar[i],pf+'vauto');continue;}\r
515 if(Math.abs(ar[i])==NOJUSTX){t(ar[i],pf+'nojustx');continue;}\r
516 if(Math.abs(ar[i])==NOJUSTY){t(ar[i],pf+'nojusty');continue;}\r
517 if(Math.abs(ar[i])==CLOSECLICK){t(ar[i],pf+'closeclick');continue;}\r
518 if(ar[i]==CLOSETITLE){q(ar[++i],pf+'closetitle');continue;}\r
519 if(ar[i]==FGCLASS){q(ar[++i],pf+'fgclass');continue;}\r
520 if(ar[i]==BGCLASS){q(ar[++i],pf+'bgclass');continue;}\r
521 if(ar[i]==CGCLASS){q(ar[++i],pf+'cgclass');continue;}\r
522 if(ar[i]==TEXTPADDING){p(ar[++i],pf+'textpadding');continue;}\r
523 if(ar[i]==TEXTFONTCLASS){q(ar[++i],pf+'textfontclass');continue;}\r
524 if(ar[i]==CAPTIONPADDING){p(ar[++i],pf+'captionpadding');continue;}\r
525 if(ar[i]==CAPTIONFONTCLASS){q(ar[++i],pf+'captionfontclass');continue;}\r
526 if(ar[i]==CLOSEFONTCLASS){q(ar[++i],pf+'closefontclass');continue;}\r
527 if(Math.abs(ar[i])==CAPBELOW){t(ar[i],pf+'capbelow');continue;}\r
528 if(ar[i]==LABEL){q(ar[++i],pf+'label');continue;}\r
529 if(Math.abs(ar[i])==DECODE){t(ar[i],pf+'decode');continue;}\r
530 if(ar[i]==DONOTHING){continue;}\r
531 i=OLparseCmdLine(pf,i,ar);}}\r
532 if((OLfunctionPI)&&OLudf&&o3_function)o3_text=o3_function();\r
533 if(pf=='o3_')OLfontSize();\r
534 }\r
535 function OLpar(a,v){eval(v+'='+a);}\r
536 function OLparQuo(a,v){eval(v+"='"+OLescSglQt(a)+"'");}\r
537 function OLescSglQt(s){return s.toString().replace(/\\/g,"\\\\").replace(/'/g,"\\'");}\r
538 function OLtoggle(a,v){eval(v+'=('+v+'==0&&'+a+'>=0)?1:0');}\r
539 function OLhasDims(s){return /[%\-a-z]+$/.test(s);}\r
540 function OLfontSize(){\r
541 var i;if(OLhasDims(o3_textsize)){if(OLns4)o3_textsize="2";}else\r
542 if(!OLns4){i=parseInt(o3_textsize);o3_textsize=(i>0&&i<8)?OLpct[i]:OLpct[0];}\r
543 if(OLhasDims(o3_captionsize)){if(OLns4)o3_captionsize="2";}else\r
544 if(!OLns4){i=parseInt(o3_captionsize);o3_captionsize=(i>0&&i<8)?OLpct[i]:OLpct[0];}\r
545 if(OLhasDims(o3_closesize)){if(OLns4)o3_closesize="2";}else\r
546 if(!OLns4){i=parseInt(o3_closesize);o3_closesize=(i>0&&i<8)?OLpct[i]:OLpct[0];}\r
547 if(OLprintPI)OLprintDims();\r
548 }\r
549 function OLdecode(){\r
550 var re=/%[0-9A-Fa-f]{2,}/,t=o3_text,c=o3_cap,u=unescape,d=!OLns4&&(!OLgek||OLgek>=20020826)&&typeof decodeURIComponent?\r
551 decodeURIComponent:u;if(typeof(window.TypeError)=='function'){if(re.test(t)){eval(new Array('try{','o3_text=d(t);',\r
552 '}catch(e){','o3_text=u(t);','}').join('\n'))};if(c&&re.test(c)){eval(new Array('try{','o3_cap=d(c);','}catch(e){',\r
553 '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
554 }\r
555 \r
556 /*\r
557  LAYER FUNCTIONS\r
558 */\r
559 // Writes to layer\r
560 function OLlayerWrite(t){\r
561 t+="\n";if(OLns4){over.document.write(t);over.document.close();}else if(typeof over.innerHTML!='undefined'){\r
562 if(OLieM)over.innerHTML='';over.innerHTML=t;}else{var range=o3_frame.document.createRange();range.setStartAfter(over);\r
563 var domfrag=range.createContextualFragment(t);while(over.hasChildNodes()){over.removeChild(over.lastChild);}\r
564 over.appendChild(domfrag);}if(OLovertwoPI&&over==over2)OLover2HTML=t;else OLoverHTML=t;\r
565 if(OLprintPI)over.print=o3_print?t:null;\r
566 }\r
567 \r
568 // Makes object visible\r
569 function OLshowObject(o){\r
570 OLshowid=0;o=(OLns4)?o:o.style;if(((OLfilterPI)&&!OLchkFilter(o))||!OLfilterPI)o.visibility="visible";\r
571 if(OLshadowPI)OLshowShadow();if(OLiframePI)OLshowIfs();if(OLhidePI)OLhideUtil(1,1,0);\r
572 }\r
573 \r
574 // Hides object\r
575 function OLhideObject(o){\r
576 if(OLshowid>0){clearTimeout(OLshowid);OLshowid=0;}if(OLtimerid>0)clearTimeout(OLtimerid);\r
577 if(OLdelayid>0)clearTimeout(OLdelayid);OLtimerid=0;OLdelayid=0;self.status="";o3_label=ol_label;\r
578 if(o3_frame!=self)o=OLgetRefById();if(o){if(o.onmouseover)o.onmouseover=null;if(OLscrollPI&&o==over)OLclearScroll();\r
579 if(OLdraggablePI)OLclearDrag();if(OLfilterPI)OLcleanupFilter(o);if(OLshadowPI)OLhideShadow();var os=(OLns4)?o:o.style;\r
580 if(((OLfilterPI)&&!OLchkFadeOut(os))||!OLfilterPI){os.visibility="hidden";if(!OLie55||(typeof ggOnChange=='undefined'&&\r
581 (!OLfilterPI||!o3_filter||o3_fadeout<0)))o.innerHTML='';}if(OLhidePI&&o==over)OLhideUtil(0,0,1);if(OLiframePI)OLhideIfs(o);}\r
582 }\r
583 \r
584 // Moves layer\r
585 function OLrepositionTo(o,xL,yL){\r
586 o=(OLns4)?o:o.style;o.left=(OLns4?xL:xL+'px');o.top=(OLns4?yL:yL+'px');\r
587 }\r
588 \r
589 // Handle NOCLOSE-MOUSEOFF\r
590 function OLoptMOUSEOFF(c){\r
591 if(!c)o3_close="";over.onmouseover=function(){OLhover=1;if(OLtimerid>0){clearTimeout(OLtimerid);OLtimerid=0;}}\r
592 over.onmouseout=function(){if(OLhover){OLcC=(OLovertwoPI&&over2&&over==over2?cClick2:cClick);if(OLtimerid>0)\r
593 clearTimeout(OLtimerid);OLtimerid=setTimeout("OLcC()",(o3_offdelay<1)?1:o3_offdelay);}}\r
594 }\r
595 function OLcursorOff(){\r
596 var o=(OLns4?over:over.style),pHt=OLns4?over.clip.height:over.offsetHeight,left=parseInt(o.left),top=parseInt(o.top),\r
597 right=left+o3_width,bottom=top+((OLbubblePI&&o3_bubble)?OLbubbleHt:pHt);\r
598 if(OLx<left||OLx>right||OLy<top||OLy>bottom)return true;return false;\r
599 }\r
600 \r
601 /*\r
602  REGISTRATION\r
603 */\r
604 function OLsetRunTimeVar(){\r
605 if(OLrunTime.length)for(var k=0;k<OLrunTime.length;k++)OLrunTime[k]();\r
606 }\r
607 function OLparseCmdLine(pf,i,ar){\r
608 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
609 }\r
610 function OLregCmds(c){\r
611 if(typeof c!='string')return;var pM=c.split(',');pMtr=pMtr.concat(pM);\r
612 for(var i=0;i<pM.length;i++)eval(pM[i].toUpperCase()+'='+(pmCnt++));\r
613 }\r
614 function OLregRunTimeFunc(f){\r
615 if(typeof f=='object')OLrunTime=OLrunTime.concat(f);else OLrunTime[OLrunTime.length++]=f;\r
616 }\r
617 function OLregCmdLineFunc(f){\r
618 if(typeof f=='object')OLcmdLine=OLcmdLine.concat(f);else OLcmdLine[OLcmdLine.length++]=f;\r
619 }\r
620 \r
621 OLloaded=1;\r