105. File Comparison Report

Produced on Mon May 12 13:04:50 2008 UTC. This report uses XHTML and CSS2, and is best viewed with a reasonably standards compliant browser such as the latest version of Firefox or Internet Explorer. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

105.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.0.5\groups\orca\js BxForum.js Mon Jan 28 09:41:42 2008 UTC
2 Dolphin-v.6.1.0\groups\orca\js BxForum.js Wed Apr 9 17:44:56 2008 UTC

105.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 75 3206
Changed 60 125
Inserted 14 17
Removed 0 0

105.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

105.4 Active regular expressions

No regular expressions were active.

105.5 Comparison detail

1   /**   1   /**
2    *                               Orca Inter active For um Script   2   *                              O rca Intera ctive Foru m Script
3    *                                 -------- -------   3   *                                 --------- ------
4    *     Sta rted           : Mon  Mar 23 200 6   4   *     Star ted              : Mo n Mar 23 2 006
5    *     Cop yright         : (C)  2007 BoonE x Group   5   *     Copy right            : (C ) 2007 Boo nEx Group
6    *     Web site           : http ://www.boo nex.com   6   *     Webs ite              : ht tp://www.b oonex.com
7    * This fi le is part  of Orca -  Interacti ve Forum S cript   7   * This fil e is part  of Orca -  Interactiv e Forum Sc ript
8    * GPL   8   * Creative  Commons A ttribution  3.0 Licen se
9   **/   9   **/
10     10  
11     11  
12   /**   12   /**
13    * forum f unctionali ty   13    * forum f unctionali ty
14    */   14    */
15     15  
16     16  
17   /**   17   /**
18    * constru ctor   18    * constru ctor
19    */   19    */
20   function F orum (base , min_poin ts)   20   function F orum (base , min_poin ts)
21   {      21   {   
22       this._ base = bas e;   22       this._ base = bas e;
23       this._ forum = 0;   23       this._ forum = 0;
24       this._ topic = 0;   24       this._ topic = 0;
25       this._ min_points  = min_poi nts;   25       this._ min_points  = min_poi nts;
26   }      26   }   
27     27  
28     28  
29   /**   29   /**
30    * edit po st   30    * edit po st
31    * @param  id    post  id    31    * @param  id    post  id 
32    */   32    */
33   Forum.prot otype.edit Post = fun ction (id)   33   Forum.prot otype.edit Post = fun ction (id)
34   {   34   {
35       var no de = docum ent.getEle mentById(i d);   35       var no de = docum ent.getEle mentById(i d);
36       if (!n ode)   36       if (!n ode)
37       {   37       {
38           th is.showHid denPost(id , '$this.e ditPost (i d);');   38           th is.showHid denPost(id , '$this.e ditPost (i d);');
39           re turn;   39           re turn;
40       }   40       }
41          41       
42       // --- ---------- --   42       // --- ---------- --
43     43  
44     44  
45       var $t his = this ;   45       var $t his = this ;
46     46  
47       var h  = function  (r)   47       var h  = function  (r)
48       {           48       {        
49     49  
50           va r html = n ode.innerH TML;   50           va r html = n ode.innerH TML;      
51          51  
52           if  (node.get ElementsBy TagName('f orm')[0])  return fal se;   52           if  (node.get ElementsBy TagName('f orm')[0])  return fal se;
53     53  
54           if  (!node.pa rentNode.s tyle.heigh t || node. parentNode .style.hei ght != 'au to')   54           if  (!node.pa rentNode.s tyle.heigh t || node. parentNode .style.hei ght != 'au to')
55           {   55           {
56                node.par entNode._h eight = no de.parentN ode.style. height;   56                node.par entNode._h eight = no de.parentN ode.style. height;
57                node.par entNode.st yle.height  = 'auto';   57                node.par entNode.st yle.height  = 'auto';
58           }   58           }
59          59       
60           va r div = do cument.cre ateElement ('div');   60           va r div = do cument.cre ateElement ('div');
61              61           
62           di v.innerHTM L = r;   62           di v.innerHTM L = r;
63     63  
64           no de.appendC hild (div) ;   64           no de.appendC hild (div) ;
65           no de.style.h eight = '3 10px';   65           no de.style.h eight = '3 10px';
66           no de.style.o verflow =  'hidden';         66           no de.style.o verflow =  'hidden';      
67     67  
68     68  
69           wi ndow.orcaS etupConten t = functi on (id, bo dy, doc)   69           wi ndow.orcaS etupConten t = functi on (id, bo dy, doc)
70           {       70           {    
71                body.inn erHTML = h tml;              71                body.inn erHTML = h tml;           
72                window.o rcaSetupCo ntent = fu nction (id , body, do c) {};   72                window.o rcaSetupCo ntent = fu nction (id , body, do c) {};
73           }   73           }
74     74  
75           if  (document .getElemen tById('tin yEditor_'+ id))   75           if  (document .getElemen tById('tin yEditor_'+ id))
76           ti nyMCE.exec Command('m ceAddContr ol', false , 'tinyEdi tor_'+id);   76                tinyMCE. execComman d('mceAddC ontrol', f alse, 'tin yEditor_'+ id);
77     77  
78   //      ti nyMCE.setC ontent (ht ml);   78   //      ti nyMCE.setC ontent (ht ml);
79              79           
80   /*   80   /*
81           if  (!window. ed)   81           if  (!window. ed)
82           {   82           {
83                window.e d = new Bx Editor('ed it');   83                window.e d = new Bx Editor('ed it');
84                document .ed = wind ow.ed;   84                document .ed = wind ow.ed;
85                window.e d.inited =  0;   85                window.e d.inited =  0;
86           }         86           }      
87           el se   87           el se
88           {   88           {
89                document .ed = wind ow.ed;   89                document .ed = wind ow.ed;
90                window.e d.setName( 'edit');   90                window.e d.setName( 'edit');
91                window.e d.inited =  0;   91                window.e d.inited =  0;
92     92  
93           }   93           }
94     94  
95           va r e = div. getElement sByTagName  ('iframe' )[0];   95           va r e = div. getElement sByTagName  ('iframe' )[0];
96           e. onload = f unction ()     96           e. onload = f unction ()  
97           {           97           {        
98                window.e d.init();   98                window.e d.init();
99                window.e d.setText( html);            99                window.e d.setText( html);         
100     100  
101                if (wind ow.ed.init ed) return ;                   101                if (wind ow.ed.init ed) return ;                
102                window.e d.initMenu ();      102                window.e d.initMenu ();   
103                window.e d.inited =  1;          103                window.e d.inited =  1;       
104           }   104           }
105     105  
106           e. onreadysta techange =  function  ()   106           e. onreadysta techange =  function  ()
107           {       107           {    
108                if (this .readyStat e == 'comp lete')    108                if (this .readyStat e == 'comp lete') 
109                {               109                {            
110                    wind ow.ed.init ();   110                    wind ow.ed.init ();
111                    wind ow.ed.setT ext(html);   111                    wind ow.ed.setT ext(html);
112     112  
113                    if ( window.ed. inited) re turn;   113                    if ( window.ed. inited) re turn;
114                    wind ow.ed.init Menu();      114                    wind ow.ed.init Menu();   
115                    wind ow.ed.init ed = 1;               115                    wind ow.ed.init ed = 1;            
116                }   116                }
117           }   117           }
118     118  
119           e. src = "src .html";    119           e. src = "src .html"; 
120   */   120   */
121           $t his.checkH eight ();           121           $t his.checkH eight ();        
122     122  
123           re turn false ;   123           re turn false ;
124       }      124       }   
125     125  
126       new Bx XslTransfo rm(this._b ase + "?ac tion=edit_ post_xml&p ost_id=" +  id + "&to pic_id=" +  this._top ic, urlXsl  + "edit_p ost.xsl",  h);   126       new Bx XslTransfo rm(this._b ase + "?ac tion=edit_ post_xml&p ost_id=" +  id + "&to pic_id=" +  this._top ic, urlXsl  + "edit_p ost.xsl",  h);
127     127  
128       return  false;   128       return  false;
129     129  
130   }   130   }
131     131  
132   /**   132   /**
133    * cancel  post editi ng   133    * cancel  post editi ng
134    * @param  id    post  id    134    * @param  id    post  id 
135    */   135    */
136   Forum.prot otype.edit PostCancel  = functio n (id)   136   Forum.prot otype.edit PostCancel  = functio n (id)
137   {   137   {
138       var no de = docum ent.getEle mentById(i d);   138       var no de = docum ent.getEle mentById(i d);
139       var f  = node.get ElementsBy TagName('f orm')[0];   139       var f  = node.get ElementsBy TagName('f orm')[0];
140       if (!f ) return f alse;   140       if (!f ) return f alse;
141     141  
    142       try {
142       tinyMC E.execComm and('mceRe moveContro l', false,  'tinyEdit or_'+id);   143           ti nyMCE.exec Command('m ceRemoveCo ntrol', fa lse, 'tiny Editor_'+i d);
    144       } catc h(err) {};
143     145  
144       node.r emoveChild (f.parentN ode);   146       node.r emoveChild (f.parentN ode);
145       node.s tyle.heigh t = 'auto' ;   147       node.s tyle.heigh t = 'auto' ;
146     148  
147       if (no de.parentN ode._heigh t) node.pa rentNode.s tyle.heigh t = node.p arentNode. _height;   149       if (no de.parentN ode._heigh t) node.pa rentNode.s tyle.heigh t = node.p arentNode. _height;     
148     150  
149       this.c heckHeight  ();   151       this.c heckHeight  ();
150   }   152   }
151   /**   153   /**
152    * expand/ collapse r earch resu lt row   154    * expand/ collapse r earch resu lt row
153    * @param  id    post  id    155    * @param  id    post  id 
154    */   156    */
155   Forum.prot otype.expa ndPost = f unction (i d)   157   Forum.prot otype.expa ndPost = f unction (i d)
156   {      158   {   
157       var p  = document .getElemen tById(id);   159       var p  = document .getElemen tById(id);
158       var ul  = p.paren tNode.pare ntNode;   160       var ul  = p.paren tNode.pare ntNode;
159       var li s = ul.get ElementsBy TagName('l i');   161       var li s = ul.get ElementsBy TagName('l i');
160       var di vs = p.par entNode.ge tElementsB yTagName(' div');   162       var di vs = p.par entNode.ge tElementsB yTagName(' div');
161       var ll  = divs.le ngth;   163       var ll  = divs.le ngth;
162       var l  = lis.leng th;   164       var l  = lis.leng th;
163       var n  = parseInt  (lis[0].s tyle.heigh t);   165       var n  = parseInt  (lis[0].s tyle.heigh t);
164       var e  = null;   166       var e  = null;
165     167  
166       for (v ar i=0 ; i <ll ; ++i)   168       for (v ar i=0 ; i <ll ; ++i)
167       {   169       {
168           if  (divs[i]. className  == 'colexp 2')    170           if  (divs[i]. className  == 'colexp 2') 
169           {   171           {
170                e = divs [i];   172                e = divs [i];
171                break;   173                break;
172           }   174           }
173       }   175       }
174     176  
175       if (36  == n || ' ' == lis[0 ].style.he ight)   177       if (36  == n || ' ' == lis[0 ].style.he ight)
176       {           178       {        
177           fo r (var i=0  ; i<l ; + +i)   179           fo r (var i=0  ; i<l ; + +i)
178                lis[i].s tyle.heigh t = parseI nt(lis[i]. clientHeig ht) + pars eInt(p.cli entHeight  ? p.client Height : p .offsetHei ght) + 15  + "px";   180                lis[i].s tyle.heigh t = parseI nt(lis[i]. clientHeig ht) + pars eInt(p.cli entHeight  ? p.client Height : p .offsetHei ght) + 15  + "px";
179           e. style.back groundPosi tion = '0p x -13px';   181           e. style.back groundPosi tion = '0p x -13px';
180       }   182       }
181       else   183       else
182       {   184       {
183           fo r (var i=0  ; i<l ; + +i)   185           fo r (var i=0  ; i<l ; + +i)
184                lis[i].s tyle.heigh t = '36px' ;   186                lis[i].s tyle.heigh t = '36px' ;
185           e. style.back groundPosi tion = '0p x 0px';   187           e. style.back groundPosi tion = '0p x 0px';
186       }   188       }
187     189  
188       this.c heckHeight  ();   190       this.c heckHeight  ();
189   }   191   }
190     192  
191   /**   193   /**
192    * search  the forum   194    * search  the forum
193    */   195    */
194   Forum.prot otype.sear ch = funct ion (text,  type, for um, u, dis p)   196   Forum.prot otype.sear ch = funct ion (text,  type, for um, u, dis p)
195   {      197   {   
196        this.loadi ng   ('
SEARCHING
');
  198        this.loadi ng   (' [L[ SEARCHING ]] ');
197     199  
198       var m  = document .getElemen tById('orc a_main');   200       var m  = document .getElemen tById('orc a_main');
199       if (!m   201       if (!m
200       {   202       {
201            new   BxError("
orca_main   div   is   not   defined
",   "
please   name   orca_main   content   container
");
  203            new   BxError(" [L[ orca_main   div   is   not   defined ]] ",   " [L[ please   name   orca_main   content   container ]] ");
202       }   204       }
203     205  
204       var $t his = this ;   206       var $t his = this ;
205     207  
206       if (-1  == text.s earch('%') )   208       if (-1  == text.s earch('%') )
207           te xt = encod eURICompon ent(text);   209           te xt = encod eURICompon ent(text);
208     210  
209       var h  = function  (r)   211       var h  = function  (r)
210       {           212       {        
211           va r m = docu ment.getEl ementById( 'orca_main ');          213           va r m = docu ment.getEl ementById( 'orca_main ');       
212     214  
213           m. innerHTML  = r;   215           m. innerHTML  = r;
214     216  
215           $t his.runScr ipts ('orc a_main');   217           $t his.runScr ipts ('orc a_main');
216     218  
217           $t his.setWin dowTitle(n ull);    219           $t his.setWin dowTitle(n ull); 
218     220           
219           $t his.stopLo ading ();   221           $t his.stopLo ading ();
220     222  
221           $t his.checkH eight ();   223           $t his.checkH eight ();
222       }   224       }
223     225  
224       new Bx XslTransfo rm(this._b ase + "?ac tion=searc h&text=" +  text + "& type=" + t ype + "&fo rum=" + fo rum + "&u= " + u + "& disp=" + d isp, urlXs l + "searc h.xsl", h) ;   226       new Bx XslTransfo rm(this._b ase + "?ac tion=searc h&text=" +  text + "& type=" + t ype + "&fo rum=" + fo rum + "&u= " + u + "& disp=" + d isp, urlXs l + "searc h.xsl", h) ;
225     227  
226       docume nt.h.makeH ist('actio n=goto&sea rch_result =1&' + tex t + '&' +  type + '&'  + forum +  '&' + u +  '&' + dis p);   228       docume nt.h.makeH ist('actio n=goto&sea rch_result =1&' + tex t + '&' +  type + '&'  + forum +  '&' + u +  '&' + dis p);
227     229  
228       return  false;   230       return  false;
229   }   231   }
230          232       
231     233  
232   /**   234   /**
233    * returns  new topic  page XML   235    * returns  new topic  page XML
234    */   236    */
235   Forum.prot otype.sele ctCat = fu nction (ca t, id)   237   Forum.prot otype.sele ctCat = fu nction (ca t, id)
236   {          238   {       
237       var e  = document .getElemen tById(id);   239       var e  = document .getElemen tById(id);
238     240  
239       if (!e   241       if (!e
240       {   242       {
241            new   BxError("
category   id   is   not   defined
",   "
please   set   category   ids
");
  243            new   BxError(" [L[ category   id   is   not   defined ]] ",   " [L[ please   set   category   ids ]] ");
242           re turn false ;   244           re turn false ;
243       }   245       }
244     246  
245       // det ermine nex t forum si bling    247       // det ermine nex t forum si bling 
246       var et  = e.nextS ibling;    248       var et  = e.nextS ibling; 
247       while  (et && !(e t.tagName  == 'DIV' | | et.tagNa me == 'div ' || et.ta gName == ' UL' || et. tagName ==  'ul'))   249       while  (et && !(e t.tagName  == 'DIV' | | et.tagNa me == 'div ' || et.ta gName == ' UL' || et. tagName ==  'ul'))
248           et  = et.next Sibling;   250           et  = et.next Sibling;
249       if (et  && et.tag Name != 'D IV' && et. tagName !=  'div')    251       if (et  && et.tag Name != 'D IV' && et. tagName !=  'div') 
250           et  = null;   252           et  = null;
251     253  
252       // det ermine nex t cat sibl ing    254       // det ermine nex t cat sibl ing 
253       var en  = e.nextS ibling;    255       var en  = e.nextS ibling; 
254       while  (en && en. tagName !=  'UL' && e n.tagName  != 'ul' &&  en.id &&  !en.id.mat ch(/^cat/) )   256       while  (en && en. tagName !=  'UL' && e n.tagName  != 'ul' &&  en.id &&  !en.id.mat ch(/^cat/) )
255           en  = en.next Sibling;   257           en  = en.next Sibling;
256     258  
257       var ei  = e.getEl ementsByTa gName('div ')[0];   259       var ei  = e.getEl ementsByTa gName('div ')[0];
258     260  
259       if (et )   261       if (et )
260       {   262       {
261           ei .style.bac kgroundPos ition = '0 px 0px';   263           ei .style.bac kgroundPos ition = '0 px 0px';
262           e. parentNode .removeChi ld (et);   264           e. parentNode .removeChi ld (et);
263           re turn false ;   265           re turn false ;
264       }   266       }
265     267  
266        this.loadi ng   ('
LOADING   FORUMS
');
  268        this.loadi ng   (' [L[ LOADING   FORUMS ]] ');
267     269  
268       var $t his = this ;   270       var $t his = this ;   
269     271  
270       var h  = function  (r)   272       var h  = function  (r)
271       {           273       {        
272     274  
273           va r d = docu ment.creat eElement(" div");          275           va r d = docu ment.creat eElement(" div");       
274           d. innerHTML  = r;   276           d. innerHTML  = r;
275     277  
276           if  (et)   278           if  (et)
277                e.parent Node.repla ceChild (d , et);   279                e.parent Node.repla ceChild (d , et);
278           el se   280           el se
279                e.parent Node.inser tBefore (d , en);          281                e.parent Node.inser tBefore (d , en);       
280     282  
281           $t his.setWin dowTitle(n ull);   283           $t his.setWin dowTitle(n ull);
282     284  
283           ei .style.bac kgroundPos ition = '0 px -32px';   285           ei .style.bac kgroundPos ition = '0 px -32px';
284     286  
285           $t his.stopLo ading ();   287           $t his.stopLo ading ();
286     288  
287           $t his.checkH eight ();   289           $t his.checkH eight ();
288              290           
289       }   291       }
290     292  
291       new Bx XslTransfo rm(this._b ase + "?ac tion=list_ forums&cat =" + cat,  urlXsl + " cat_forums .xsl", h);   293       new Bx XslTransfo rm(this._b ase + "?ac tion=list_ forums&cat =" + cat,  urlXsl + " cat_forums .xsl", h);
292     294  
293       
document.h . makeHist (' action=got o& cat _id= '   +   cat );
  295        var   ha   =   document.h . rw ('
cat
'
);
    296       docume nt.h.makeH ist (ha['p re'] + cat  + ha['ext ']);
294     297  
295       return  false;   298       return  false;
296   }   299   }
297     300  
298   /**   301   /**
299    * select  forum   302    * select  forum
300    *  @param  id   foru m id   303    *  @param  id   foru m id
301    */   304    */
302   Forum.prot otype.sele ctForum =  function ( id, start)   305   Forum.prot otype.sele ctForum =  function ( id, start)
303   {   306   {
304        this.loadi ng   ('
LOADING   FORUM   TOPICS
');
  307        this.loadi ng   (' [L[ LOADING   FORUM   TOPICS ]] ');
305     308  
306       var m  = document .getElemen tById('orc a_main');   309       var m  = document .getElemen tById('orc a_main');
307       if (!m   310       if (!m
308       {   311       {
309            new   BxError("
orca_main   div   is   not   defined
",   "
please   name   orca_main   content   container
");
  312            new   BxError(" [L[ orca_main   div   is   not   defined ]] ",   " [L[ please   name   orca_main   content   container ]] ");
310       }   313       }
311     314  
312       this._ forum = id ;   315       this._ forum = id ;
313     316  
314       var $t his = this ;   317       var $t his = this ;
315     318  
316       var h  = function  (r)   319       var h  = function  (r)
317       {           320       {                
318           va r m = docu ment.getEl ementById( 'orca_main ');          321           va r m = docu ment.getEl ementById( 'orca_main ');       
319     322  
320           m. innerHTML  = r;   323           m. innerHTML  = r;
321     324           
322           $t his.setWin dowTitle(n ull);   325           $t his.setWin dowTitle(n ull);
323     326  
324           $t his.stopLo ading ();   327           $t his.stopLo ading ();
325     328  
326           $t his.checkH eight ();   329           $t his.checkH eight ();
327       }   330       }
328     331  
329       new Bx XslTransfo rm(this._b ase + "?ac tion=list_ topics&for um=" + thi s._forum +  "&start="  + start,  urlXsl + " forum_topi cs.xsl", h );   332       new Bx XslTransfo rm(this._b ase + "?ac tion=list_ topics&for um=" + thi s._forum +  "&start="  + start,  urlXsl + " forum_topi cs.xsl", h );
330     333  
331        document.h .makeHist( ' a ction=goto &fo r um_id= '  
+   this._foru m   +   "&"   +   start
);
  334       var ha  = documen t.h.rw('fo rum');
    335        document.h .makeHist   ( h a ['p r e ' ]   +   this._foru m   +   ha['page']   +   start   +   ha['ext'] );
332     336  
333       return  false;   337       return  false;
334   }   338   }
335     339  
336     340  
337   /**   341   /**
338    * select  forum   342    * select  forum
339    *  @param  id   foru m id   343    *  @param  id   foru m id
340    */   344    */
341   Forum.prot otype.sele ctForumInd ex = funct ion (cat)   345   Forum.prot otype.sele ctForumInd ex = funct ion (cat)
342   {   346   {
343        this.loadi ng   ('
LOADING   FORUM   INDEX
');
  347        this.loadi ng   (' [L[ LOADING   FORUM   INDEX ]] ');
344     348  
345       var m  = document .getElemen tById('orc a_main');   349       var m  = document .getElemen tById('orc a_main');
346       if (!m   350       if (!m
347       {   351       {
348            new   BxError("
orca_main   div   is   not   defined
",   "
please   name   orca_main   content   container
");
  352            new   BxError(" [L[ orca_main   div   is   not   defined ]] ",   " [L[ please   name   orca_main   content   container ]] ");
349       }   353       }
350     354  
351       var $t his = this ;   355       var $t his = this ;
352     356  
353       var h  = function  (r)   357       var h  = function  (r)
354       {           358       {                
355           m. innerHTML  = r;   359           m. innerHTML  = r;
356     360  
357           $t his.setWin dowTitle(n ull);   361           $t his.setWin dowTitle(n ull);
358     362  
359           $t his.stopLo ading ();   363           $t his.stopLo ading ();
360     364  
361           $t his.checkH eight ();   365           $t his.checkH eight ();
362     366  
363           va r ec = doc ument.getE lementById ('cat' + c at);     367           va r ec = doc ument.getE lementById ('cat' + c at);  
364           if  (ec) ec.b lur();   368           if  (ec) ec.b lur();
365     369  
366           co rrectPNG(' live_fade' );   370           co rrectPNG(' live_fade' );
367       }   371       }
368     372  
369       new Bx XslTransfo rm(this._b ase + "?ac tion=forum _index" +  (cat ? ("& cat=" + ca t) : ''),  urlXsl + " home.xsl",  h);   373       new Bx XslTransfo rm(this._b ase + "?ac tion=forum _index" +  (cat ? ("& cat=" + ca t) : ''),  urlXsl + " home.xsl",  h);
370     374  
371       
document.h . makeHist (' action=got o& cat _id= '   +   cat );
  375        var   ha   =   document.h . rw ('
cat
'
);
    376       docume nt.h.makeH ist (ha['p re'] + cat  + ha['ext ']);
372     377  
373       return  false;   378       return  false;
374   }   379   }
375     380  
376     381  
377     382  
378   /**   383   /**
379    * show pr ofile page   384    * show pr ofile page
380    *  @param  user usrn ame to sho   385    *  @param  user usrn ame to sho
381    */   386    */
382   Forum.prot otype.show Profile =  function ( user)   387   Forum.prot otype.show Profile =  function ( user)
383   {   388   {
384        this.loadi ng   ('
LOADING   PROFILE   PAGE
');
  389        this.loadi ng   (' [L[ LOADING   PROFILE   PAGE ]] ');
385     390  
386       var m  = document .getElemen tById('orc a_main');   391       var m  = document .getElemen tById('orc a_main');
387       if (!m   392       if (!m
388       {   393       {
389            new   BxError("
orca_main   div   is   not   defined
",   "
please   name   orca_main   content   container
");
  394            new   BxError(" [L[ orca_main   div   is   not   defined ]] ",   " [L[ please   name   orca_main   content   container ]] ");
390       }   395       }
391     396  
392       var $t his = this ;   397       var $t his = this ;
393     398  
394       var h  = function  (r)   399       var h  = function  (r)
395       {           400       {        
396           m. innerHTML  = r;   401           m. innerHTML  = r;
397     402  
398           $t his.setWin dowTitle(n ull);   403           $t his.setWin dowTitle(n ull);
399     404  
400           $t his.stopLo ading ();   405           $t his.stopLo ading ();
401     406  
402           $t his.checkH eight ();   407           $t his.checkH eight ();
403       }   408       }
404     409  
405       new Bx XslTransfo rm(this._b ase + "?ac tion=profi le&user="  + user, ur lXsl + "pr ofile.xsl" , h);   410       new Bx XslTransfo rm(this._b ase + "?ac tion=profi le&user="  + user, ur lXsl + "pr ofile.xsl" , h);
406     411  
407        document.h .makeHist( ' a ction=goto & pr ofil e = '  
+   user
);
  412       var ha  = documen t.h.rw('us er');
    413        document.h .makeHist   ( h a [' pr
e
' ]   +   user   +   ha['ext'] );
408     414  
409       return  false;   415       return  false;
410   }   416   }
411     417  
412     418  
413   /**   419   /**
414    * select  topic   420    * select  topic
415    *  @param  id   topi c id   421    *  @param  id   topi c id
416    */   422    */
417   Forum.prot otype.sele ctTopic =  function ( id)   423   Forum.prot otype.sele ctTopic =  function ( id)
418   {   424   {
419        this.loadi ng   ('
LOADING   TOPIC   POSTS
');
  425        this.loadi ng   (' [L[ LOADING   TOPIC   POSTS ]] ');
420     426  
421       var m  = document .getElemen tById('orc a_main');   427       var m  = document .getElemen tById('orc a_main');
422       if (!m   428       if (!m
423       {   429       {
424            new   BxError("
orca_main   div   is   not   defined
",   "
please   name   orca_main   content   container
");
  430            new   BxError(" [L[ orca_main   div   is   not   defined ]] ",   " [L[ please   name   orca_main   content   container ]] ");
425       }   431       }
426     432  
427       this._ topic = id ;   433       this._ topic = id ;
428     434  
429       var $t his = this ;   435       var $t his = this ;
430     436  
431       var h  = function  (r)   437       var h  = function  (r)
432       {           438       {        
433           m. innerHTML  = r;   439           m. innerHTML  = r;
434     440  
435           $t his.setWin dowTitle(n ull);   441           $t his.setWin dowTitle(n ull);
436     442  
437           $t his.runScr ipts ('orc a_main');   443           $t his.runScr ipts ('orc a_main');
438     444  
439           $t his.stopLo ading ();   445           $t his.stopLo ading ();
440     446  
441           $t his.checkH eight ();   447           $t his.checkH eight ();
442       }   448       }
443     449  
444       new Bx XslTransfo rm(this._b ase + "?ac tion=list_ posts&topi c=" + this ._topic, u rlXsl + "f orum_posts .xsl", h);   450       new Bx XslTransfo rm(this._b ase + "?ac tion=list_ posts&topi c=" + this ._topic, u rlXsl + "f orum_posts .xsl", h);
445     451  
446        document.h .makeHist( ' a ction=goto &to p ic_id= '  
+   this._topi c
);
  452       var ha  = documen t.h.rw('to pic');
    453        document.h .makeHist   ( h a [' p re ' ]   +   this._topi c   +   ha['ext'] );
447     454  
448       return  false;   455       return  false;
449   }   456   }
450     457  
451     458  
452   /**   459   /**
453    * open ne w 'post ne w topic' p age   460    * open ne w 'post ne w topic' p age
454    *  @param  id   foru m id   461    *  @param  id   foru m id
455    */   462    */
456   Forum.prot otype.newT opic = fun ction (id)   463   Forum.prot otype.newT opic = fun ction (id)
457   {   464   {
458        this.loadi ng   ('
LOADING   POST   TOPIC   PAGE
');
  465        this.loadi ng   (' [L[ LOADING   POST   TOPIC   PAGE ]] ');
459     466  
460       var m  = document .getElemen tById('orc a_main');   467       var m  = document .getElemen tById('orc a_main');
461       if (!m   468       if (!m
462       {   469       {
463            new   BxError("
orca_main   div   is   not   defined
",   "
please   name   orca_main   content   container
");
  470            new   BxError(" [L[ orca_main   div   is   not   defined ]] ",   " [L[ please   name   orca_main   content   container ]] ");
464       }   471       }
465     472  
466       this._ forum = id ;   473       this._ forum = id ;
467     474  
468       var $t his = this ;   475       var $t his = this ;
469     476  
470       var h  = function  (r)   477       var h  = function  (r)
471       {           478       {        
472           va r m = docu ment.getEl ementById( 'orca_main ');   479           va r m = docu ment.getEl ementById( 'orca_main ');
473     480  
474           m. innerHTML  = r;   481           m. innerHTML  = r;
475     482  
476           $t his.setWin dowTitle(n ull);   483           $t his.setWin dowTitle(n ull);
477     484  
478           if  (document .getElemen tById('tin yEditor'))   485           if  (document .getElemen tById('tin yEditor'))
479           {   486           {
480                if (0 <  document.g etElementB yId('tinyE ditor').va lue.length )   487                if (0 <  document.g etElementB yId('tinyE ditor').va lue.length )
481                    docu ment.getEl ementById( 'tinyEdito r').value  = '';   488                    docu ment.getEl ementById( 'tinyEdito r').value  = '';
482           ti nyMCE.exec Command('m ceAddContr ol', false , 'tinyEdi tor');    489                tinyMCE. execComman d('mceAddC ontrol', f alse, 'tin yEditor');  
483           }   490           }
484     491  
485           $t his.stopLo ading ();   492           $t his.stopLo ading ();
486     493  
487   /*   494           /*
488           if  (!window. ed)   495           if  (!window. ed)
489           {   496           {
490                window.e d = new Bx Editor('ed it');   497                window.e d = new Bx Editor('ed it');
491                document .ed = wind ow.ed;   498                document .ed = wind ow.ed;
492                window.e d.init();   499                window.e d.init();
493                window.e d.initMenu ();   500                window.e d.initMenu ();
494           }    501           } 
495              502           
496           el se   503           el se
497           {   504           {
498                document .ed = wind ow.ed;   505                document .ed = wind ow.ed;
499                window.e d.setName( 'edit');   506                window.e d.setName( 'edit');
500                window.e d.init();   507                window.e d.init();
501                window.e d.initMenu ();   508                window.e d.initMenu ();
502           }   509           }
503   */         510   */      
504     511  
505           $t his.checkH eight ();   512           $t his.checkH eight ();
506       }   513       }
507     514  
508       new Bx XslTransfo rm(this._b ase + "?ac tion=new_t opic&forum =" + this. _forum, ur lXsl + "ne w_topic.xs l", h);   515       new Bx XslTransfo rm(this._b ase + "?ac tion=new_t opic&forum =" + this. _forum, ur lXsl + "ne w_topic.xs l", h);
509     516  
510       docume nt.h.makeH ist('actio n=goto&new _topic=' +  this._for um);   517       docume nt.h.makeH ist('actio n=goto&new _topic=' +  this._for um);
511     518  
512       return  false;   519       return  false;
513   }   520   }
514     521  
515     522  
516   /**   523   /**
517    * cancel  new topic  submission   524    * cancel  new topic  submission
518    */   525    */
519   Forum.prot otype.canc elNewTopic  = functio n (forum_i d, start)   526   Forum.prot otype.canc elNewTopic  = functio n (forum_i d, start)
520   {   527   {
521       if (do cument.get ElementByI d('tinyEdi tor'))   528       if (do cument.get ElementByI d('tinyEdi tor'))
    529       {
    530           tr y {
522           ti nyMCE.exec Command('m ceRemoveCo ntrol', fa lse, 'tiny Editor');   531                tinyMCE. execComman d('mceRemo veControl' , false, ' tinyEditor ');
    532           }  catch(err)  {};
    533       }
523     534  
524       return  this.sele ctForum (f orum_id, s tart);   535       return  this.sele ctForum (f orum_id, s tart);
525   }   536   }
526     537  
527   /**   538   /**
528    * my thre ads page   539    * my thre ads page
529    */   540    */
530   Forum.prot otype.show MyThreads  = function  ()   541   Forum.prot otype.show MyThreads  = function  ()
531   {   542   {
532       if (!i sLoggedIn)   543       if (!i sLoggedIn)
533       {   544       {
534            alert('
Please   login   to   view   topics   you   participat e   in
');
  545            alert(' [L[ Please   login   to   view   topics   you   participat e   in ]] ');
535           re turn;   546           re turn;
536       }   547       }
537     548  
538        this.loadi ng   ('
LOADING
');
  549        this.loadi ng   (' [L[ LOADING ]] ');
539     550  
540       var m  = document .getElemen tById('orc a_main');   551       var m  = document .getElemen tById('orc a_main');
541       if (!m   552       if (!m
542       {   553       {
543            new   BxError("
orca_main   div   is   not   defined
",   "
please   name   orca_main   content   container
");
  554            new   BxError(" [L[ orca_main   div   is   not   defined ]] ",   " [L[ please   name   orca_main   content   container ]] ");
544       }   555       }
545     556  
546       var $t his = this ;   557       var $t his = this ;
547     558  
548       var h  = function  (r)   559       var h  = function  (r)
549       {           560       {        
550           va r m = docu ment.getEl ementById( 'orca_main ');   561           va r m = docu ment.getEl ementById( 'orca_main ');
551     562  
552           m. innerHTML  = r;   563           m. innerHTML  = r;
553     564  
554           $t his.setWin dowTitle(n ull);   565           $t his.setWin dowTitle(n ull);
555     566  
556           $t his.stopLo ading ();   567           $t his.stopLo ading ();
557     568  
558           $t his.checkH eight ();   569           $t his.checkH eight ();
559       }   570       }
560     571  
561       new Bx XslTransfo rm(this._b ase + "?ac tion=show_ my_threads ", urlXsl  + "forum_t opics.xsl" , h);   572       new Bx XslTransfo rm(this._b ase + "?ac tion=show_ my_threads ", urlXsl  + "forum_t opics.xsl" , h);
562     573  
563       docume nt.h.makeH ist('actio n=goto&my_ threads=1' );   574       docume nt.h.makeH ist('actio n=goto&my_ threads=1' );
564     575  
565       return  false;   576       return  false;
566   }   577   }
567     578  
568     579  
569   /**   580   /**
570    * my flag s page   581    * my flag s page
571    */   582    */
572   Forum.prot otype.show MyFlags =  function ( )   583   Forum.prot otype.show MyFlags =  function ( )
573   {   584   {
574       if (!i sLoggedIn)   585       if (!i sLoggedIn)
575       {   586       {
576            alert('
Please   login   to   view   flagged   topics
');
  587            alert(' [L[ Please   login   to   view   flagged   topics ]] ');
577           re turn;   588           re turn;
578       }   589       }
579     590  
580        this.loadi ng   ('
LOADING
');
  591        this.loadi ng   (' [L[ LOADING ]] ');
581     592  
582       var m  = document .getElemen tById('orc a_main');   593       var m  = document .getElemen tById('orc a_main');
583       if (!m   594       if (!m
584       {   595       {
585            new   BxError("
orca_main   div   is   not   defined
",   "
please   name   orca_main   content   container
");
  596            new   BxError(" [L[ orca_main   div   is   not   defined ]] ",   " [L[ please   name   orca_main   content   container ]] ");
586       }   597       }
587     598  
588       var $t his = this ;   599       var $t his = this ;
589     600  
590       var h  = function  (r)   601       var h  = function  (r)
591       {           602       {        
592           va r m = docu ment.getEl ementById( 'orca_main ');   603           va r m = docu ment.getEl ementById( 'orca_main ');
593     604  
594           m. innerHTML  = r;   605           m. innerHTML  = r;
595     606  
596           $t his.setWin dowTitle(n ull);   607           $t his.setWin dowTitle(n ull);
597     608  
598           $t his.stopLo ading ();   609           $t his.stopLo ading ();
599     610  
600           $t his.checkH eight ();   611           $t his.checkH eight ();
601       }   612       }
602     613  
603       new Bx XslTransfo rm(this._b ase + "?ac tion=show_ my_flags",  urlXsl +  "forum_top ics.xsl",  h);   614       new Bx XslTransfo rm(this._b ase + "?ac tion=show_ my_flags",  urlXsl +  "forum_top ics.xsl",  h);
604     615  
605       docume nt.h.makeH ist('actio n=goto&my_ flags=1');   616       docume nt.h.makeH ist('actio n=goto&my_ flags=1');
606     617  
607       return  false;   618       return  false;
608   }   619   }
609     620  
610   /**   621   /**
611    * open ne w 'search'  page   622    * open ne w 'search'  page
612    */   623    */
613   Forum.prot otype.show Search = f unction ()   624   Forum.prot otype.show Search = f unction ()
614   {   625   {
615        this.loadi ng   ('
LOADING   SEARCH   PAGE
');
  626        this.loadi ng   (' [L[ LOADING   SEARCH   PAGE ]] ');
616     627  
617       var m  = document .getElemen tById('orc a_main');   628       var m  = document .getElemen tById('orc a_main');
618       if (!m   629       if (!m
619       {   630       {
620            new   BxError("
orca_main   div   is   not   defined
",   "
please   name   orca_main   content   container
");
  631            new   BxError(" [L[ orca_main   div   is   not   defined ]] ",   " [L[ please   name   orca_main   content   container ]] ");
621       }   632       }
622     633  
623       var $t his = this ;   634       var $t his = this ;
624     635  
625       var h  = function  (r)   636       var h  = function  (r)
626       {           637       {        
627           va r m = docu ment.getEl ementById( 'orca_main ');   638           va r m = docu ment.getEl ementById( 'orca_main ');
628     639  
629           m. innerHTML  = r;   640           m. innerHTML  = r;
630     641  
631           $t his.setWin dowTitle(n ull);   642           $t his.setWin dowTitle(n ull);
632     643  
633           $t his.stopLo ading ();   644           $t his.stopLo ading ();
634     645  
635           $t his.checkH eight ();   646           $t his.checkH eight ();
636       }   647       }
637     648  
638       new Bx XslTransfo rm(this._b ase + "?ac tion=show_ search", u rlXsl + "s earch_form .xsl", h);   649       new Bx XslTransfo rm(this._b ase + "?ac tion=show_ search", u rlXsl + "s earch_form .xsl", h);
639     650  
640       docume nt.h.makeH ist('actio n=goto&sea rch=1');   651       docume nt.h.makeH ist('actio n=goto&sea rch=1');
641     652  
642       return  false;   653       return  false;
643   }   654   }
644     655  
645     656  
646     657  
647     658  
648   /**   659   /**
649    * open ne w 'post re ply' page   660    * open ne w 'post re ply' page
650    *  @param  id_f foru m id   661    *  @param  id_f foru m id
651    *  @param  id_t topi c id   662    *  @param  id_t topi c id
652    */   663    */
653   Forum.prot otype.post Reply = fu nction (id _f, id_t)   664   Forum.prot otype.post Reply = fu nction (id _f, id_t)
654   {   665   {
655        this.loadi ng   ('
LOADING   POST   REPLY   PAGE
');
  666        this.loadi ng   (' [L[ LOADING   POST   REPLY   PAGE ]] ');
656     667  
657       var m  = document .getElemen tById('rep ly_contain er');   668       var m  = document .getElemen tById('rep ly_contain er');
658       if (!m   669       if (!m
659       {   670       {
660            new   BxError("
orca_main   div   is   not   defined
",   "
please   name   orca_main   content   container
");
  671            new   BxError(" [L[ orca_main   div   is   not   defined ]] ",   " [L[ please   name   orca_main   content   container ]] ");
661       }   672       }
662     673  
663       if (do cument.get ElementByI d('tinyEdi tor'))   674       if (do cument.get ElementByI d('tinyEdi tor'))
664       {   675       {
    676           tr y {
665           ti nyMCE.exec Command('m ceRemoveCo ntrol', fa lse, 'tiny Editor');    677                tinyMCE. execComman d('mceRemo veControl' , false, ' tinyEditor '); 
    678           }  catch(err)  {};
666       }   679       }
667     680  
668       this._ forum = id _f;   681       this._ forum = id _f;
669       this._ topic = id _t;   682       this._ topic = id _t;
670     683  
671       var $t his = this ;   684       var $t his = this ;
672     685  
673       var h  = function  (r)   686       var h  = function  (r)
674       {           687       {        
675   /*   688   /*
676           va r bt = doc ument.getE lementById ('reply_bu tton');   689           va r bt = doc ument.getE lementById ('reply_bu tton');
677           if  (!bt)    690           if  (!bt) 
678           {   691           {
679                new BxEr ror("reply _button di v is not d efined", " please nam e it");   692                new BxEr ror("reply _button di v is not d efined", " please nam e it");
680           }   693           }
681           bt .style.dis play = 'no ne';   694           bt .style.dis play = 'no ne';
682   */   695   */
683           m. innerHTML  = r;   696           m. innerHTML  = r;
684           m. style.disp lay='block ';   697           m. style.disp lay='block ';
685     698  
686           if  (document .getElemen tById('tin yEditor'))   699           if  (document .getElemen tById('tin yEditor'))
687           {   700           {
688                if (0 <  document.g etElementB yId('tinyE ditor').va lue.length )   701                if (0 <  document.g etElementB yId('tinyE ditor').va lue.length )
689                    docu ment.getEl ementById( 'tinyEdito r').value  = '';   702                    docu ment.getEl ementById( 'tinyEdito r').value  = '';
690           ti nyMCE.exec Command('m ceAddContr ol', false , 'tinyEdi tor');    703                tinyMCE. execComman d('mceAddC ontrol', f alse, 'tin yEditor');  
691           }   704           }
692     705  
693           $t his.stopLo ading ();   706           $t his.stopLo ading ();
694   /*   707   /*
695           if  (!window. ed)   708           if  (!window. ed)
696           {   709           {
697                window.e d = new Bx Editor('ed it');   710                window.e d = new Bx Editor('ed it');
698                document .ed = wind ow.ed;   711                document .ed = wind ow.ed;
699                window.e d.init();   712                window.e d.init();
700                window.e d.initMenu ();   713                window.e d.initMenu ();
701           }   714           }
702     715  
703           el se   716           el se
704           {   717           {
705                document .ed = wind ow.ed;   718                document .ed = wind ow.ed;
706                window.e d.setName( 'edit');   719                window.e d.setName( 'edit');
707                window.e d.init();   720                window.e d.init();
708                window.e d.initMenu ();   721                window.e d.initMenu ();
709           }   722           }
710   */   723   */
711           $t his.checkH eight ();   724           $t his.checkH eight ();
712       }   725       }
713     726  
714       new Bx XslTransfo rm(this._b ase + "?ac tion=reply &forum=" +  this._for um + "&top ic=" + thi s._topic,  urlXsl + " post_reply .xsl", h);   727       new Bx XslTransfo rm(this._b ase + "?ac tion=reply &forum=" +  this._for um + "&top ic=" + thi s._topic,  urlXsl + " post_reply .xsl", h);
715     728  
716       return  false;   729       return  false;
717   }   730   }
718     731  
719     732  
720     733  
721   /**   734   /**
722    * open ne w 'post re ply' page   735    * open ne w 'post re ply' page
723    *  @param  id_f foru m id   736    *  @param  id_f foru m id
724    *  @param  id_t topi c id   737    *  @param  id_t topi c id
725    */   738    */
726   Forum.prot otype.post ReplyWithQ uote = fun ction (id_ f, id_t, p _id)   739   Forum.prot otype.post ReplyWithQ uote = fun ction (id_ f, id_t, p _id)
727   {   740   {
728        this.loadi ng   ('
LOADING   POST   REPLY   PAGE
');
  741        this.loadi ng   (' [L[ LOADING   POST   REPLY   PAGE ]] ');
729     742  
730       var m  = document .getElemen tById('rep ly_contain er');   743       var m  = document .getElemen tById('rep ly_contain er');
731       if (!m   744       if (!m
732       {   745       {
733            new   BxError("
orca_main   div   is   not   defined
",   "
please   name   orca_main   content   container
");
  746            new   BxError(" [L[ orca_main   div   is   not   defined ]] ",   " [L[ please   name   orca_main   content   container ]] ");
734       }   747       }
735     748  
736       if (do cument.get ElementByI d('tinyEdi tor'))   749       if (do cument.get ElementByI d('tinyEdi tor'))
737       {   750       {
    751           tr y {
738           ti nyMCE.exec Command('m ceRemoveCo ntrol', fa lse, 'tiny Editor');    752                tinyMCE. execComman d('mceRemo veControl' , false, ' tinyEditor '); 
    753           }  catch(err)  {};
739       }   754       }
740     755  
741       this._ forum = id _f;   756       this._ forum = id _f;
742       this._ topic = id _t;   757       this._ topic = id _t;
743     758  
744       var $t his = this ;   759       var $t his = this ;
745     760  
746       var h  = function  (r)   761       var h  = function  (r)
747       {           762       {        
748           m. innerHTML  = r;            763           m. innerHTML  = r;         
749           m. style.disp lay='block ';   764           m. style.disp lay='block ';
750     765  
751           va r post = $ this.getPo stText(p_i d);   766           va r post = $ this.getPo stText(p_i d);
752     767  
753           po st = post. replace (/ <text>/ig,  '')   768           po st = post. replace (/ <text>/ig,  '')
754           po st = post. replace (/ <\/text>/i g, '')   769           po st = post. replace (/ <\/text>/i g, '')
755           po st =  '<p> &#160;</p> <div class ="quote_po st">' + po st + '</di v> <p>&#16 0;</p>';   770           po st =  '<p> &#160;</p> <div class ="quote_po st">' + po st + '</di v> <p>&#16 0;</p>';
756     771  
757           wi ndow.orcaS etupConten t = functi on (id, bo dy, doc)   772           wi ndow.orcaS etupConten t = functi on (id, bo dy, doc)
758           {       773           {    
759                body.inn erHTML = p ost;              774                body.inn erHTML = p ost;           
760                window.o rcaSetupCo ntent = fu nction (id , body, do c) {};   775                window.o rcaSetupCo ntent = fu nction (id , body, do c) {};
761           }   776           }
762     777  
763           if  (document .getElemen tById('tin yEditor'))   778           if  (document .getElemen tById('tin yEditor'))
764           ti nyMCE.exec Command('m ceAddContr ol', false , 'tinyEdi tor');    779                tinyMCE. execComman d('mceAddC ontrol', f alse, 'tin yEditor');  
765     780  
766           $t his.stopLo ading ();   781           $t his.stopLo ading ();
767     782  
768           $t his.checkH eight ();   783           $t his.checkH eight ();
769       }   784       }
770     785  
771       new Bx XslTransfo rm(this._b ase + "?ac tion=reply &forum=" +  this._for um + "&top ic=" + thi s._topic,  urlXsl + " post_reply .xsl", h);   786       new Bx XslTransfo rm(this._b ase + "?ac tion=reply &forum=" +  this._for um + "&top ic=" + thi s._topic,  urlXsl + " post_reply .xsl", h);
772     787  
773       return  false;   788       return  false;
774   }   789   }
775     790  
776   /**   791   /**
777    * cancel  reply   792    * cancel  reply
778    */   793    */
779   Forum.prot otype.canc elReply =  function ( )   794   Forum.prot otype.canc elReply =  function ( )
780   {   795   {
781   /*   796   /*
782       var bt  = documen t.getEleme ntById('re ply_button ');   797       var bt  = documen t.getEleme ntById('re ply_button ');
783       if (!b t)    798       if (!b t) 
784       {   799       {
785           ne w BxError( "reply_but ton div is  not defin ed", "plea se name it ");   800           ne w BxError( "reply_but ton div is  not defin ed", "plea se name it ");
786       }   801       }
787       bt.sty le.display  = 'inline ';   802       bt.sty le.display  = 'inline ';
788   */   803   */
789     804  
790       if (do cument.get ElementByI d('tinyEdi tor'))   805       if (do cument.get ElementByI d('tinyEdi tor'))
791       {   806       {
    807           tr y {
792           ti nyMCE.exec Command('m ceRemoveCo ntrol', fa lse, 'tiny Editor');    808                tinyMCE. execComman d('mceRemo veControl' , false, ' tinyEditor '); 
    809           }  catch(err)  {};
793       }   810       }
794     811  
795       var m  = document .getElemen tById('rep ly_contain er');   812       var m  = document .getElemen tById('rep ly_contain er');
796       if (!m   813       if (!m
797       {   814       {
798            new   BxError("
orca_main   div   is   not   defined
",   "
please   name   orca_main   content   container
");
  815            new   BxError(" [L[ orca_main   div   is   not   defined ]] ",   " [L[ please   name   orca_main   content   container ]] ");
799       }   816       }
800       m.inne rHTML = '& #160;';   817       m.inne rHTML = '& #160;';
801       m.styl e.display= 'none';   818       m.styl e.display= 'none';
802   }   819   }
803     820  
804   /**   821   /**
805    * show ac cess denie d page   822    * show ac cess denie d page
806    */   823    */
807   Forum.prot otype.acce ssDenied =  function  ()   824   Forum.prot otype.acce ssDenied =  function  ()
808   {   825   {
809        this.loadi ng   ('
LOADING   PAGE ');
  826        this.loadi ng   (' [L[ LOADING ]] ');
810     827  
811       var m  = document .getElemen tById('orc a_main');   828       var m  = document .getElemen tById('orc a_main');
812       if (!m   829       if (!m
813       {   830       {
814            new   BxError("
orca_main   div   is   not   defined
",   "
please   name   orca_main   content   container
");
  831            new   BxError(" [L[ orca_main   div   is   not   defined ]] ",   " [L[ please   name   orca_main   content   container ]] ");
815       }   832       }
816     833  
817       var $t his = this ;   834       var $t his = this ;
818     835  
819       var h  = function  (r)   836       var h  = function  (r)
820       {           837       {        
821           va r m = docu ment.getEl ementById( 'orca_main ');   838           va r m = docu ment.getEl ementById( 'orca_main ');
822     839  
823           m. innerHTML  = r;   840           m. innerHTML  = r;
824     841  
825           $t his.setWin dowTitle(n ull);   842           $t his.setWin dowTitle(n ull);
826     843  
827           $t his.stopLo ading ();   844           $t his.stopLo ading ();
828     845  
829           $t his.checkH eight ();   846           $t his.checkH eight ();
830       }   847       }
831     848  
832       new Bx XslTransfo rm(this._b ase + "?ac tion=acces s_denied",  urlXsl +  "default_a ccess_deni ed.xsl", h );   849       new Bx XslTransfo rm(this._b ase + "?ac tion=acces s_denied",  urlXsl +  "default_a ccess_deni ed.xsl", h );
833     850  
834       return  false;   851       return  false;
835   }   852   }
836     853  
837   /**   854   /**
838    * show ne w topic su ccessfully  created   page   855    * show ne w topic su ccessfully  created   page
839    *  @param  forum_id  forum id   856    *  @param  forum_id  forum id
840    */   857    */
841   Forum.prot otype.post Success =  function ( forum_id)   858   Forum.prot otype.post Success =  function ( forum_id)
842   {   859   {
843        this.loadi ng   ('
LOADING   PAGE ');
  860        this.loadi ng   (' [L[ LOADING ]] ');   
844     861  
845       var m  = document .getElemen tById('orc a_main');   862       var m  = document .getElemen tById('orc a_main');
846       if (!m   863       if (!m
847       {   864       {
848            new   BxError("
orca_main   div   is   not   defined
",   "
please   name   orca_main   content   container
");
  865            new   BxError(" [L[ orca_main   div   is   not   defined ]] ",   " [L[ please   name   orca_main   content   container ]] ");
849       }   866       }
850     867  
851       if (do cument.get ElementByI d('tinyEdi tor'))   868       if (do cument.get ElementByI d('tinyEdi tor'))
852       {   869       {
    870           tr y {
853           ti nyMCE.exec Command('m ceRemoveCo ntrol', fa lse, 'tiny Editor');    871                tinyMCE. execComman d('mceRemo veControl' , false, ' tinyEditor '); 
    872           }  catch(err)  {};
854       }   873       }
855     874  
856       this._ forum = fo rum_id;   875       this._ forum = fo rum_id;
857     876  
858       var $t his = this ;   877       var $t his = this ;
859     878  
860       var h  = function  (r)   879       var h  = function  (r)
861       {           880       {        
862           va r m = docu ment.getEl ementById( 'orca_main ');   881           va r m = docu ment.getEl ementById( 'orca_main ');
863     882  
864           m. innerHTML  = r;   883           m. innerHTML  = r;
865     884  
866           $t his.stopLo ading ();   885           $t his.stopLo ading ();
867     886  
868           $t his.checkH eight ();   887           $t his.checkH eight ();
869       }   888       }
870     889  
871       new Bx XslTransfo rm(this._b ase + "?ac tion=post_ success&fo rum=" + fo rum_id, ur lXsl + "de fault_post _success.x sl", h);   890       new Bx XslTransfo rm(this._b ase + "?ac tion=post_ success&fo rum=" + fo rum_id, ur lXsl + "de fault_post _success.x sl", h);
872     891  
873       return  false;   892       return  false;
874   }   893   }
875     894  
876     895  
877   /**   896   /**
878    * show re ply succes s page   897    * show re ply succes s page
879    *  @param  f_id foru m id   898    *  @param  f_id foru m id
880    *  @param  t_id topi c id   899    *  @param  t_id topi c id
881    */   900    */
882   Forum.prot otype.repl ySuccess =  function  (f_id, t_i d)   901   Forum.prot otype.repl ySuccess =  function  (f_id, t_i d)
883   {   902   {
    903       try {
884       tinyMC E.execComm and('mceRe moveContro l', false,  'tinyEdit or');   904           ti nyMCE.exec Command('m ceRemoveCo ntrol', fa lse, 'tiny Editor');
    905       } catc h(err) {};
    906       
885       return  this.sele ctTopic(t_ id);   907       return  this.sele ctTopic(t_ id);
886   }   908   }
887     909  
888     910  
889   /**   911   /**
890    * delete  post   912    * delete  post
891    *  @param  p    post  id   913    *  @param  p    post  id
892    *  @param  f    foru m id   914    *  @param  f    foru m id
893    *  @param  t    topi c id   915    *  @param  t    topi c id
894    *  @param  ask  conf orm delete tion   916    *  @param  ask  conf orm delete tion
895    */   917    */
896   Forum.prot otype.dele tePost = f unction (p , f, t, as k)   918   Forum.prot otype.dele tePost = f unction (p , f, t, as k)
897   {   919   {
898        if   (ask)   if   (!confirm( '
Are   you   sure   ?
'))   return   false;
  920        if   (ask)   if   (!confirm( ' [L[ Are   you   sure   ? ]] '))   return   false;
899     921  
900       var fo rm = docum ent.getEle mentById(' tmp_del_fo rm');   922       var fo rm = docum ent.getEle mentById(' tmp_del_fo rm');
901     923  
902       if (!f orm)    924       if (!f orm) 
903       {   925       {
904           fo rm = docum ent.create Element('f orm');   926           fo rm = docum ent.create Element('f orm');
905           fo rm.style.d isplay = ' none';   927           fo rm.style.d isplay = ' none';
906           fo rm.id = 't mp_del_for m';   928           fo rm.id = 't mp_del_for m';
907           fo rm.method  = 'post';   929           fo rm.method  = 'post';
908           fo rm.target  = 'post_ac tions';   930           fo rm.target  = 'post_ac tions';
909           do cument.bod y.appendCh ild(form);   931           do cument.bod y.appendCh ild(form);
910       }   932       }
911     933  
912       if (!f orm) retur n;   934       if (!f orm) retur n;
913     935  
914       form.a ction = 'i ndex.php?a ction=dele te_post&po st_id=' +  p + '&foru m_id=' + f  + '&topic _id=' + t;   936       form.a ction = 'i ndex.php?a ction=dele te_post&po st_id=' +  p + '&foru m_id=' + f  + '&topic _id=' + t;
915       form.s ubmit();   937       form.s ubmit();
916     938  
917       return  false;   939       return  false;
918   }   940   }
919     941  
920   /**   942   /**
921    * show de lete succe ss page   943    * show de lete succe ss page
922    *  @param  forum_id  forum id   944    *  @param  forum_id  forum id
923    */   945    */
924   Forum.prot otype.dele teSuccess  = function  (f_id, t_ id, t_exis ts)   946   Forum.prot otype.dele teSuccess  = function  (f_id, t_ id, t_exis ts)
925   {   947   {
926       if (f_ id)   948       if (f_ id)
927       {   949       {
928           if  (t_exists )   950           if  (t_exists )
929           th is.selectT opic(t_id) ;   951                this.sel ectTopic ( t_id);
930           el se   952           el se
931                this.sel ectForum ( f_id, 0);   953                this.sel ectForum ( f_id, 0);
932       }   954       }
933       else i f (0 == f_ id && 0 ==  t_id)   955       else i f (0 == f_ id && 0 ==  t_id)
934       {   956       {
935           or ca_admin.r eportedPos ts();   957           or ca_admin.r eportedPos ts();
936       }   958       }
937     959  
938       if (t_ exists)   960       if (t_ exists)
939        this.showM odalMsg   ("
Post   was   successful ly   deleted
");
  961            this.showM odalMsg   (" [L[ Post   was   successful ly   deleted ]] ");
940       else   962       else
941            this.showM odalMsg   ("
Topic   and   post   were   successful ly   deleted
");
  963            this.showM odalMsg   (" [L[ Topic   and   post   were   successful ly   deleted ]] ");
942     964  
943       return  false;   965       return  false;
944   }   966   }
945     967  
946   /**   968   /**
947    * show ed it success  page   969    * show ed it success  page
948    *  @param  forum_id  forum id   970    *  @param  forum_id  forum id
949    */   971    */
950   Forum.prot otype.edit Success   =   function   (t _id )   972   Forum.prot otype.edit Success   =   function   (t
)
951       {   973   {
952        this.selec tTopic(t _id );   974        this.selec tTopic(t
);
953     975  
954        this.showM odalMsg   ("
Post   was   successful ly   edited
");
  976        this.showM odalMsg   (" [L[ Post   was   successful ly   edited ]] ");
955     977  
956       return  false;   978       return  false;
957   }   979   }
958     980  
959   /**   981   /**
960    * show co mpose mess age form   982    * show co mpose mess age form
961    */   983    */
962   Forum.prot otype.comp oseMessage  = functio n (to, mid )   984   Forum.prot otype.comp oseMessage  = functio n (to, mid )
963   {   985   {
964        this.loadi ng   ('
LOADING   COMPOSE   MESSAGE   PAGE ');
  986        this.loadi ng   (' [L[ LOADING ]] ');
965     987  
966       var $t his = this ;   988       var $t his = this ;
967     989  
968       var h  = function  (r)   990       var h  = function  (r)
969       {   991       {
970           va r e = docu ment.getEl ementById( 'messages' );   992           va r e = docu ment.getEl ementById( 'messages' );
971           e. innerHTML  = r;   993           e. innerHTML  = r;
972     994  
973           $t his.stopLo ading ();   995           $t his.stopLo ading ();
974     996  
975           $t his.checkH eight ();   997           $t his.checkH eight ();
976       }   998       }
977     999  
978       new Bx XslTransfo rm (this._ url + "&co mpose=1&to =" + to +  "&mID=" +  mid, urlXs l + "mailb ox_compose .xsl", h);   1000       new Bx XslTransfo rm (this._ url + "&co mpose=1&to =" + to +  "&mID=" +  mid, urlXs l + "mailb ox_compose .xsl", h);
979   }   1001   }
980     1002  
981     1003  
982     1004  
983   /**   1005   /**
984    * show co mpose mess age form   1006    * show co mpose mess age form
985    */   1007    */
986   Forum.prot otype.comp oseComplet e = functi on (ret)   1008   Forum.prot otype.comp oseComplet e = functi on (ret)
987   {   1009   {
988        this.loadi ng   ('
SENDING   MESSAGE
');
  1010        this.loadi ng   (' [L[ SENDING   MESSAGE ]] ');
989     1011  
990       var $t his = this ;   1012       var $t his = this ;
991     1013  
992       var h  = function  (r)   1014       var h  = function  (r)
993       {   1015       {
994           va r e = docu ment.getEl ementById( 'messages' );   1016           va r e = docu ment.getEl ementById( 'messages' );
995           e. innerHTML  = r;   1017           e. innerHTML  = r;
996     1018  
997           $t his.stopLo ading ();   1019           $t his.stopLo ading ();
998     1020  
999           $t his.checkH eight ();   1021           $t his.checkH eight ();
1000       }   1022       }
1001     1023  
1002       new Bx XslTransfo rm (this._ url + "&co mpose_comp lete=1&ret =" + ret,  urlXsl + " mailbox_co mpose_comp lete.xsl",  h);   1024       new Bx XslTransfo rm (this._ url + "&co mpose_comp lete=1&ret =" + ret,  urlXsl + " mailbox_co mpose_comp lete.xsl",  h);
1003   }   1025   }
1004     1026  
1005   /**   1027   /**
1006    * validat e compose  message fo rm   1028    * validat e compose  message fo rm
1007    */   1029    */
1008   Forum.prot otype.vali dateForm =  function  (f)   1030   Forum.prot otype.vali dateForm =  function  (f)
1009   {   1031   {
1010       if (f[ 'mText'].v alue.lengt h == 0 )   1032       if (f[ 'mText'].v alue.lengt h == 0 )
1011       {   1033       {
1012            alert('
Message   body   empty
');
  1034            alert(' [L[ Message   body   empty ]] ');
1013           re turn false ;   1035           re turn false ;
1014       }   1036       }
1015     1037  
1016        this.loadi ng   ('
SENDING   MESSAGE
');
  1038        this.loadi ng   (' [L[ SENDING   MESSAGE ]] ');
1017     1039  
1018       return  true;   1040       return  true;
1019   }   1041   }
1020     1042  
1021   /**   1043   /**
1022    * show va lid charac hters   1044    * show va lid charac hters
1023    */   1045    */
1024   Forum.prot otype.show ValidChars  = functio n (a)   1046   Forum.prot otype.show ValidChars  = functio n (a)
1025   {   1047   {
1026        alert("
Valid   chars:
\r\n   A-Z   a-z   0-9   !   @   #   $   %   ^   &   *   (   )   <   >   _   =   +   {   }   '   \"   ?   .   :   ,   |   /   \\   []   -");
  1048        alert(" [L[ Valid   chars: ]] \r\n   A-Z   a-z   0-9   !   @   #   $   %   ^   &   *   (   )   <   >   _   =   +   {   }   '   \"   ?   .   :   ,   |   /   \\   []   -");
1027   }   1049   }
1028     1050  
1029   /**   1051   /**
1030    * check s tring valu e   1052    * check s tring valu e
1031    */   1053    */
1032   Forum.prot otype.chec kSubject =  function  (s)   1054   Forum.prot otype.chec kSubject =  function  (s)
1033   {   1055   {
1034       //if ( !s.match ( /^[\sA-Za- z0-9\!@#\$ %\^&\*\(\) _\=\+\{\}' \"\?\.:,\| /\\\[\]\-] {5,50}$/))      1056       //if ( !s.match ( /^[\sA-Za- z0-9\!@#\$ %\^&\*\(\) _\=\+\{\}' \"\?\.:,\| /\\\[\]\-] {5,50}$/))   
1035       if (s. length < 5  || s.leng th > 50)   1057       if (s. length < 5  || s.leng th > 50)
1036           re turn false ;   1058           re turn false ;
1037       return  true;   1059       return  true;
1038   }   1060   }
1039     1061  
1040   /**   1062   /**
1041    * check s tring valu e   1063    * check s tring valu e
1042    */   1064    */
1043   Forum.prot otype.chec kText = fu nction (s)   1065   Forum.prot otype.chec kText = fu nction (s)
1044   {   1066   {
1045       return  ((s.lengt h > 4 && s .length <  64000) ? t rue : fals e);   1067       return  ((s.lengt h > 4 && s .length <  64000) ? t rue : fals e);
1046   }   1068   }
1047     1069  
1048   /**   1070   /**
1049    * check f orm values   1071    * check f orm values
1050    */   1072    */
1051   Forum.prot otype.chec kPostTopic Values = f unction (s , t, n)   1073   Forum.prot otype.chec kPostTopic Values = f unction (s , t, n)
1052   {      1074   {   
1053       var re t1 = false ;   1075       var re t1 = false ;
1054       var re t2 = false ;   1076       var re t2 = false ;
1055       var e;   1077       var e;
1056     1078  
1057       if (tr ue == n)   1079       if (tr ue == n)
1058       {   1080       {
1059           e  = document .getElemen tById('err _' + s.nam e);      1081           e  = document .getElemen tById('err _' + s.nam e);   
1060           if  (!this.ch eckSubject (s.value))     1082           if  (!this.ch eckSubject (s.value))  
1061           {           1083           {        
1062                if (e) e .style.dis play = "in line";   1084                if (e) e .style.dis play = "in line";
1063                s.style. background Color = "# ffaaaa";   1085                s.style. background Color = "# ffaaaa";
1064                s.focus( );   1086                s.focus( );
1065           }   1087           }
1066           el se   1088           el se
1067           {   1089           {
1068                if (e) e .style.dis play = "no ne";   1090                if (e) e .style.dis play = "no ne";
1069                s.style. background Color = "# ffffff";   1091                s.style. background Color = "# ffffff";
1070                ret1 = t rue;   1092                ret1 = t rue;
1071           }   1093           }
1072       }   1094       }
1073     1095  
1074       e = do cument.get ElementByI d('err_' +  t.name);       1096       e = do cument.get ElementByI d('err_' +  t.name);    
1075       if (!t his.checkT ext(t.valu e))    1097       if (!t his.checkT ext(t.valu e)) 
1076       {   1098       {
1077           if  (e) e.sty le.display  = "inline ";   1099           if  (e) e.sty le.display  = "inline ";
1078           t. style.back groundColo r = "#ffaa aa";   1100           t. style.back groundColo r = "#ffaa aa";
1079   //      if  (!ret1) t .focus ();   1101   //      if  (!ret1) t .focus ();
1080       }   1102       }
1081       else   1103       else
1082       {   1104       {
1083           if  (e) e.sty le.display  = "none";   1105           if  (e) e.sty le.display  = "none";
1084           t. style.back groundColo r = "#ffff ff";   1106           t. style.back groundColo r = "#ffff ff";
1085           re t2 = true;   1107           re t2 = true;
1086       }   1108       }
1087     1109  
1088       return  (n ? (ret 1 && ret2)  : ret2);   1110       return  (n ? (ret 1 && ret2)  : ret2);
1089   }   1111   }
1090     1112  
1091     1113  
1092     1114  
1093   /**   1115   /**
1094    * create  and displa y loading  message   1116    * create  and displa y loading  message
1095    */   1117    */
1096   Forum.prot otype.hide ModalMsg =  function  ()   1118   Forum.prot otype.hide ModalMsg =  function  ()
1097   {   1119   {
1098       var e  = document .body;   1120       var e  = document .body;
1099       var l  = document .getElemen tById ("mo dal_msg");   1121       var l  = document .getElemen tById ("mo dal_msg");
1100       e.remo veChild(l) ;   1122       e.remo veChild(l) ;
1101   }   1123   }
1102     1124  
1103   /**   1125   /**
1104    * create  and displa y loading  message   1126    * create  and displa y loading  message
1105    */   1127    */
1106   Forum.prot otype.show ModalMsg =  function  (str)   1128   Forum.prot otype.show ModalMsg =  function  (str)
1107   {   1129   {
1108     1130  
1109       var e  = document .body;   1131       var e  = document .body;
1110       var t  = document .createTex tNode(str) ;   1132       var t  = document .createTex tNode(str) ;
1111       var d  = document .createEle ment("div" );   1133       var d  = document .createEle ment("div" );
1112       var s  = document .createEle ment("div" );   1134       var s  = document .createEle ment("div" );
1113       var br  = documen t.createEl ement("br" );   1135       var br  = documen t.createEl ement("br" );
1114       var i  = document .createEle ment("inpu t");            1136       var i  = document .createEle ment("inpu t");         
1115     1137  
1116       e.appe ndChild (d );   1138       e.appe ndChild (d );
1117     1139  
1118       d.id =  "modal_ms g";   1140       d.id =  "modal_ms g";
1119       d.styl e.position  = "absolu te";   1141       d.styl e.position  = "absolu te";
1120       d.styl e.zIndex =  "50001";   1142       d.styl e.zIndex =  "50001";
1121       d.styl e.textAlig n = "cente r";   1143       d.styl e.textAlig n = "cente r";
1122       d.styl e.width =  e.clientWi dth + "px" ;   1144       d.styl e.width =  e.clientWi dth + "px" ;
1123       d.styl e.height =  (window.i nnerHeight  ? (window .innerHeig ht + 30) :  screen.he ight) + "p x";               1145       d.styl e.height =  (window.i nnerHeight  ? (window .innerHeig ht + 30) :  screen.he ight) + "p x";            
1124       d.styl e.top = ge tScroll()  - 30 + "px ";   1146       d.styl e.top = ge tScroll()  - 30 + "px ";
1125       d.styl e.left = 0  + "px";   1147       d.styl e.left = 0  + "px";
1126       d.styl e.display  = "inline" ;   1148       d.styl e.display  = "inline" ;
1127        d.style.ba ckgroundIm age   =   "url( / img/loadin g_bg.gif)" ;   1149        d.style.ba ckgroundIm age   =   "url( "   +   urlImg   +   " img/loadin g_bg.gif)" ;
1128     1150  
1129     1151  
1130       s.styl e.border =  "1px soli d #B5B5B5" ;   1152       s.styl e.border =  "1px soli d #B5B5B5" ;
1131       s.styl e.backgrou ndColor =  "#F3F3F3";   1153       s.styl e.backgrou ndColor =  "#F3F3F3";
1132       s.styl e.color =  "#333333";   1154       s.styl e.color =  "#333333";
1133       s.styl e.padding  = "20px";   1155       s.styl e.padding  = "20px";
1134       s.styl e.marginTo p = (parse Int(d.styl e.height)  / 2 - 20)  + "px";   1156       s.styl e.marginTo p = (parse Int(d.styl e.height)  / 2 - 20)  + "px";
1135       s.styl e.marginLe ft = "auto ";   1157       s.styl e.marginLe ft = "auto ";
1136       s.styl e.marginRi ght = "aut o";   1158       s.styl e.marginRi ght = "aut o";
1137       s.styl e.width =  "300px";   1159       s.styl e.width =  "300px";
1138       s.styl e.fontWeig ht = "bold ";   1160       s.styl e.fontWeig ht = "bold ";
1139       s.styl e.lineHeig ht = "30px ";   1161       s.styl e.lineHeig ht = "30px ";
1140     1162  
1141       i.type  = "reset" ;   1163       i.type  = "reset" ;
1142       i.valu e = " OK " ;   1164       i.valu e = " OK " ;
1143       i.styl e.marginTo p = "15px" ;   1165       i.styl e.marginTo p = "15px" ;
1144       i.oncl ick = func tion () {   1166       i.oncl ick = func tion () {
1145           do cument.f.h ideModalMs g ();   1167           do cument.f.h ideModalMs g ();
1146           re turn false ;   1168           re turn false ;
1147       }   1169       }
1148     1170  
1149       d.appe ndChild(s) ;   1171       d.appe ndChild(s) ;
1150     1172  
1151       s.appe ndChild(t) ;   1173       s.appe ndChild(t) ;
1152       s.appe ndChild(br );   1174       s.appe ndChild(br );
1153       s.appe ndChild(i) ;   1175       s.appe ndChild(i) ;
1154     1176  
1155   }   1177   }
1156     1178  
1157   /**   1179   /**
1158    * create  and displa y loading  message   1180    * create  and displa y loading  message
1159    */   1181    */
1160   Forum.prot otype.stop Loading =  function ( )   1182   Forum.prot otype.stop Loading =  function ( )
1161   {   1183   {
1162       var l  = document .getElemen tById ("lo ading");   1184       var l  = document .getElemen tById ("lo ading");
1163       if (l)   1185       if (l)
1164       {   1186       {
1165           l. style.disp lay = "non e";   1187           l. style.disp lay = "non e";
1166       }   1188       }
1167   }   1189   }
1168     1190  
1169   /**   1191   /**
1170    * create  and displa y loading  message   1192    * create  and displa y loading  message
1171    */   1193    */
1172   Forum.prot otype.load ing = func tion (sid)   1194   Forum.prot otype.load ing = func tion (sid)
1173   {   1195   {
1174     1196  
1175       var d  = document .getElemen tById ("lo ading");   1197       var d  = document .getElemen tById ("lo ading");
1176       var e  = document .body; //  getElement ById('cont ent');   1198       var e  = document .body; //  getElement ById('cont ent');
1177     1199  
1178       if (d)   1200       if (d)
1179       {   1201       {
1180           d. firstChild .innerHTML  = sid + " ...";   1202           d. firstChild .innerHTML  = sid + " ...";
1181           d. style.top  = getScrol l() - 30 +  "px";   1203           d. style.top  = getScrol l() - 30 +  "px";
1182           d. style.left  = 0 + "px ";   1204           d. style.left  = 0 + "px ";
1183           d. style.disp lay = "inl ine";   1205           d. style.disp lay = "inl ine";
1184       }   1206       }
1185       else   1207       else
1186       {   1208       {
1187           va r d = docu ment.creat eElement(" div");   1209           va r d = docu ment.creat eElement(" div");
1188           va r s = docu ment.creat eElement(" span");   1210           va r s = docu ment.creat eElement(" span");
1189     1211  
1190           e. appendChil d (d);   1212           e. appendChil d (d);
1191     1213  
1192           d. id = "load ing";   1214           d. id = "load ing";
1193           d. style.posi tion = "ab solute";   1215           d. style.posi tion = "ab solute";
1194           d. style.zInd ex = "5000 0";   1216           d. style.zInd ex = "5000 0";
1195           d. style.text Align = "c enter";   1217           d. style.text Align = "c enter";
1196           d. style.widt h = e.clie ntWidth +  "px";   1218           d. style.widt h = e.clie ntWidth +  "px";
1197           d. style.heig ht = (wind ow.innerHe ight ? (wi ndow.inner Height + 3 0) : scree n.height)  + "px";               1219           d. style.heig ht = (wind ow.innerHe ight ? (wi ndow.inner Height + 3 0) : scree n.height)  + "px";            
1198           d. style.top  = getScrol l() - 30 +  "px";   1220           d. style.top  = getScrol l() - 30 +  "px";
1199           d. style.left  = 0 + "px ";   1221           d. style.left  = 0 + "px ";
1200           d. style.disp lay = "inl ine";   1222           d. style.disp lay = "inl ine";
1201            d.style.ba ckgroundIm age   =   "url(
img/loadin g_bg.gif)" ;         
  1223            d.style.ba ckgroundIm age   =   "url( "   +   urlImg   +   " img/loadin g_bg.gif)" ;       
1202     1224  
1203           s. style.bord er = "1px  solid #B5B 5B5";   1225           s. style.bord er = "1px  solid #B5B 5B5";
1204           s. style.back groundColo r = "#F3F3 F3";   1226           s. style.back groundColo r = "#F3F3 F3";
1205           s. style.colo r = "#3333 33";   1227           s. style.colo r = "#3333 33";
1206           s. style.padd ing = "20p x";   1228           s. style.padd ing = "20p x";
1207           s. style.font Weight = " bold";   1229           s. style.font Weight = " bold";
1208           s. style.line Height = d .style.hei ght;   1230           s. style.line Height = d .style.hei ght;
1209     1231  
1210           d. appendChil d(s);   1232           d. appendChil d(s);
1211           s. innerHTML  = sid + ". ..";   1233           s. innerHTML  = sid + ". ..";
1212       }   1234       }
1213   }   1235   }
1214     1236  
1215     1237  
1216     1238  
1217   /**   1239   /**
1218    * create  and displa y loading  message   1240    * create  and displa y loading  message
1219    */   1241    */
1220   Forum.prot otype.hide HTML = fun ction (w,  h, html)   1242   Forum.prot otype.hide HTML = fun ction (w,  h, html)
1221   {   1243   {
1222       var l  = document .getElemen tById ("sh ow_html");   1244       var l  = document .getElemen tById ("sh ow_html");
1223          1245       
1224       if (l)   1246       if (l)
1225       {   1247       {
1226           do cument.bod y.removeCh ild(l);   1248           do cument.bod y.removeCh ild(l);
1227       }   1249       }
1228   }   1250   }
1229     1251  
1230   /**   1252   /**
1231    * create  and displa y loading  message   1253    * create  and displa y loading  message
1232    */   1254    */
1233   Forum.prot otype.show HTML = fun ction (htm l, w, h)   1255   Forum.prot otype.show HTML = fun ction (htm l, w, h)
1234   {   1256   {
1235       var d  = document .getElemen tById ("sh ow_html");   1257       var d  = document .getElemen tById ("sh ow_html");
1236       var e  = document .body;    1258       var e  = document .body; 
1237     1259  
1238       if (d)   1260       if (d)
1239       {   1261       {
1240           va r div = d. firstChild ;   1262           va r div = d. firstChild ;
1241           di v.innerHTM L = html;   1263           di v.innerHTM L = html;
1242           d. style.top  = getScrol l() - 30 +  "px";   1264           d. style.top  = getScrol l() - 30 +  "px";
1243           d. style.left  = 0 + "px ";   1265           d. style.left  = 0 + "px ";
1244           d. style.disp lay = "blo ck";   1266           d. style.disp lay = "blo ck";
1245           if  (w) div.s tyle.width  = w + 'px ';   1267           if  (w) div.s tyle.width  = w + 'px ';
1246           if  (h) div.s tyle.heigh t = h + 'p x';   1268           if  (h) div.s tyle.heigh t = h + 'p x';
1247           di v.style.to p = parseI nt(d.style .height)/2  - h/2 + ' px';   1269           di v.style.to p = parseI nt(d.style .height)/2  - h/2 + ' px';
1248           di v.style.wi dth = pars eInt(d.sty le.width)/ 2 - w/2 +  'px';   1270           di v.style.wi dth = pars eInt(d.sty le.width)/ 2 - w/2 +  'px';
1249       }   1271       }
1250       else   1272       else
1251       {   1273       {
1252           va r d = docu ment.creat eElement(" div");   1274           va r d = docu ment.creat eElement(" div");
1253           va r div = do cument.cre ateElement ("div");   1275           va r div = do cument.cre ateElement ("div");
1254     1276  
1255           e. appendChil d (d);   1277           e. appendChil d (d);
1256     1278  
1257           d. id = "show _html";   1279           d. id = "show _html";
1258           d. style.posi tion = "ab solute";   1280           d. style.posi tion = "ab solute";
1259           d. style.zInd ex = "4900 0";   1281           d. style.zInd ex = "4900 0";
1260           d. style.text Align = "c enter";   1282           d. style.text Align = "c enter";
1261           d. style.widt h = e.clie ntWidth +  "px";   1283           d. style.widt h = e.clie ntWidth +  "px";
1262           d. style.heig ht = (wind ow.innerHe ight ? (wi ndow.inner Height + 3 0) : scree n.height)  + "px";               1284           d. style.heig ht = (wind ow.innerHe ight ? (wi ndow.inner Height + 3 0) : scree n.height)  + "px";            
1263           d. style.top  = getScrol l() - 30 +  "px";   1285           d. style.top  = getScrol l() - 30 +  "px";
1264           d. style.left  = 0 + "px ";   1286           d. style.left  = 0 + "px ";
1265           d. style.disp lay = "inl ine";   1287           d. style.disp lay = "inl ine";
1266            d.style.ba ckgroundIm age   =   "url(
img/loadin g_bg.gif)" ;         
  1288            d.style.ba ckgroundIm age   =   "url( "   +   urlImg   +   " img/loadin g_bg.gif)" ;       
1267     1289  
1268           di v.innerHTM L = html;   1290           di v.innerHTM L = html;
1269           di v.style.po sition = " absolute";   1291           di v.style.po sition = " absolute";
1270           if  (w) div.s tyle.width  = w + 'px ';   1292           if  (w) div.s tyle.width  = w + 'px ';
1271           if  (h) div.s tyle.heigh t = h + 'p x';   1293           if  (h) div.s tyle.heigh t = h + 'p x';
1272           di v.style.to p = parseI nt(d.style .height)/2  - h/2 + ' px';   1294           di v.style.to p = parseI nt(d.style .height)/2  - h/2 + ' px';
1273           di v.style.le ft = parse Int(d.styl e.width)/2  - w/2 + ' px';   1295           di v.style.le ft = parse Int(d.styl e.width)/2  - w/2 + ' px';
1274     1296  
1275           d. appendChil d(div);   1297           d. appendChil d(div);
1276       }   1298       }
1277   }   1299   }
1278     1300  
1279     1301  
1280   /*   1302   /*
1281    * correct  auto heig ht in expl orer   1303    * correct  auto heig ht in expl orer
1282    */   1304    */
1283   Forum.prot otype.chec kHeight =  function ( )   1305   Forum.prot otype.chec kHeight =  function ( )
1284   {   1306   {
1285   //  e_c =  document.g etElementB yId('conte nt');   1307   //  e_c =  document.g etElementB yId('conte nt');
1286   //  if (!e _c) return ;   1308   //  if (!e _c) return ;
1287   //  e_c.st yle.height  = "100px" ;   1309   //  e_c.st yle.height  = "100px" ;
1288   //  e_c.st yle.height  = "auto";   1310   //  e_c.st yle.height  = "auto";
1289   }   1311   }
1290     1312  
1291     1313  
1292   Forum.prot otype.hide HiddenPost  = functio n (id)   1314   Forum.prot otype.hide HiddenPost  = functio n (id)
1293   {   1315   {
1294        this.loadi ng   ('
POST   IS   LOADING
');
  1316        this.loadi ng   (' [L[ POST   IS   LOADING ]] ');
1295     1317  
1296       var m  = document .getElemen tById('pos t_row_'+id );   1318       var m  = document .getElemen tById('pos t_row_'+id );
1297       if (!m   1319       if (!m
1298       {   1320       {
1299           re turn false ;   1321           re turn false ;
1300       }      1322       }   
1301     1323  
1302       var $t his = this ;   1324       var $t his = this ;
1303     1325  
1304       var h  = function  (r)   1326       var h  = function  (r)
1305       {           1327       {        
1306           m. innerHTML  = r;   1328           m. innerHTML  = r;
1307     1329  
1308           $t his.stopLo ading ();   1330           $t his.stopLo ading ();
1309     1331  
1310           $t his.checkH eight ();   1332           $t his.checkH eight ();
1311       }   1333       }
1312     1334  
1313       new Bx XslTransfo rm(this._b ase + "?ac tion=hide_ hidden_pos t&post_id= " + id, ur lXsl + "fo rum_posts. xsl", h);   1335       new Bx XslTransfo rm(this._b ase + "?ac tion=hide_ hidden_pos t&post_id= " + id, ur lXsl + "fo rum_posts. xsl", h);
1314     1336  
1315       //docu ment.h.mak eHist('act ion=goto&f orum_id='  + this._fo rum + "&"  + start);   1337       //docu ment.h.mak eHist('act ion=goto&f orum_id='  + this._fo rum + "&"  + start);
1316     1338  
1317       return  false;           1339       return  false;        
1318   }   1340   }
1319     1341  
1320   Forum.prot otype.show HiddenPost  = functio n (id, run )   1342   Forum.prot otype.show HiddenPost  = functio n (id, run )
1321   {   1343   {
1322        this.loadi ng   ('
POST   IS   LOADING
');
  1344        this.loadi ng   (' [L[ POST   IS   LOADING ]] ');
1323     1345  
1324       var m  = document .getElemen tById('pos t_row_'+id );   1346       var m  = document .getElemen tById('pos t_row_'+id );
1325       if (!m   1347       if (!m
1326       {   1348       {
1327           re turn false ;   1349           re turn false ;
1328       }      1350       }   
1329     1351  
1330       var $t his = this ;   1352       var $t his = this ;
1331     1353  
1332       var h  = function  (r)   1354       var h  = function  (r)
1333       {           1355       {        
1334           m. innerHTML  = r;   1356           m. innerHTML  = r;
1335     1357  
1336           va r mm = doc ument.getE lementById ('post_row _'+id);   1358           va r mm = doc ument.getE lementById ('post_row _'+id);
1337           if  (mm)   1359           if  (mm)
1338           {   1360           {
1339                mm.inner HTML = $th is.replace TildaA (mm .innerHTML );   1361                mm.inner HTML = $th is.replace TildaA (mm .innerHTML );
1340           }   1362           }
1341     1363  
1342     1364  
1343           $t his.runScr ipts ('pos t_row_'+id );   1365           $t his.runScr ipts ('pos t_row_'+id );
1344     1366  
1345           $t his.stopLo ading ();   1367           $t his.stopLo ading ();
1346     1368  
1347           $t his.checkH eight ();   1369           $t his.checkH eight ();
1348     1370  
1349           if  (run) eva l (run);   1371           if  (run) eva l (run);
1350       }   1372       }
1351     1373  
1352       new Bx XslTransfo rm(this._b ase + "?ac tion=show_ hidden_pos t&post_id= " + id, ur lXsl + "fo rum_posts. xsl", h);   1374       new Bx XslTransfo rm(this._b ase + "?ac tion=show_ hidden_pos t&post_id= " + id, ur lXsl + "fo rum_posts. xsl", h);
1353     1375  
1354       //docu ment.h.mak eHist('act ion=goto&f orum_id='  + this._fo rum + "&"  + start);   1376       //docu ment.h.mak eHist('act ion=goto&f orum_id='  + this._fo rum + "&"  + start);
1355     1377  
1356       return  false;      1378       return  false;   
1357   }   1379   }
1358     1380  
1359   /*   1381   /*
1360    * align t he post, a fter the a vatar load   1382    * align t he post, a fter the a vatar load
1361    */   1383    */
1362   Forum.prot otype.alig nPost = fu nction (im g, points)   1384   Forum.prot otype.alig nPost = fu nction (im g, points)
1363   {   1385   {
1364       if (im g.parentNo de && poin ts >= this ._min_poin ts)   1386       if (im g.parentNo de && poin ts >= this ._min_poin ts)
1365       {   1387       {
1366           va r d = img. parentNode .parentNod e.parentNo de;    1388           va r d = img. parentNode .parentNod e.parentNo de; 
1367           va r y = 35;/ /img.paren tNode.y |  img.parent Node.offse tTop;    1389           va r y = 35;/ /img.paren tNode.y |  img.parent Node.offse tTop; 
1368           if  ((img.cli entHeight  + y ) > d. clientHeig ht)    1390           if  ((img.cli entHeight  + y ) > d. clientHeig ht) 
1369                d.style. height = i mg.clientH eight + 5  + "px";    1391                d.style. height = i mg.clientH eight + 5  + "px"; 
1370           do cument.f.c heckHeight ();    1392           do cument.f.c heckHeight (); 
1371       }   1393       }
1372   }   1394   }
1373     1395  
1374   /*   1396   /*
1375    * good vo te post    1397    * good vo te post 
1376    */   1398    */
1377   Forum.prot otype.vote Good = fun ction (pos t_id)   1399   Forum.prot otype.vote Good = fun ction (pos t_id)
1378   {                   1400   {                
1379       var $t his = this ;   1401       var $t his = this ;
1380     1402  
1381       var h  = function  (r)   1403       var h  = function  (r)
1382       {           1404       {        
1383           va r o = new  BxXmlReque st('','',' ');             1405           va r o = new  BxXmlReque st('','',' ');          
1384           va r ret = o. getRetNode Value (r,  'ret');   1406           va r ret = o. getRetNode Value (r,  'ret');
1385           if  ('1' == r et)   1407           if  ('1' == r et)
1386           {   1408           {
1387                var e =  document.g etElementB yId ('poin ts_'+post_ id);   1409                var e =  document.g etElementB yId ('poin ts_'+post_ id);
1388                e.innerH TML = pars eInt(e.inn erHTML) +  1;   1410                e.innerH TML = pars eInt(e.inn erHTML) +  1;
1389                $this.hi deVoteButt ons (post_ id);   1411                $this.hi deVoteButt ons (post_ id);
1390                $this.hi deReportBu tton  (pos t_id);   1412                $this.hi deReportBu tton  (pos t_id);
1391                return f alse;   1413                return f alse;
1392           }   1414           }
1393     1415  
1394           al ert ('Vote  error');   1416           al ert ('Vote  error');
1395           re turn false ;   1417           re turn false ;
1396       }   1418       }
1397     1419  
1398       new Bx XmlRequest  (this._ba se + "?act ion=vote_p ost_good&p ost_id="+p ost_id, h,  true);   1420       new Bx XmlRequest  (this._ba se + "?act ion=vote_p ost_good&p ost_id="+p ost_id, h,  true);
1399     1421  
1400       return  false;           1422       return  false;        
1401   }   1423   }
1402     1424  
1403   /*   1425   /*
1404    * flag/un flag    1426    * flag/un flag 
1405    */   1427    */
1406   Forum.prot otype.flag  = functio n (topic_i d)   1428   Forum.prot otype.flag  = functio n (topic_i d)
1407   {                   1429   {                
1408       var $t his = this ;   1430       var $t his = this ;
1409     1431  
1410       var h  = function  (r)   1432       var h  = function  (r)
1411       {           1433       {        
1412           va r o = new  BxXmlReque st('','',' ');             1434           va r o = new  BxXmlReque st('','',' ');          
1413           va r ret = o. getRetNode Value (r,  'ret');   1435           va r ret = o. getRetNode Value (r,  'ret');
1414           if  ('1' == r et)   1436           if  ('1' == r et)
1415           {   1437           {
1416                 alert   ('
Topic   has   been   successful ly   added   to   your   flagged   topics
');
  1438                 alert   (' [L[ Topic   has   been   successful ly   added   to   your   flagged   topics ]] ');
1417                return f alse;   1439                return f alse;
1418           }   1440           }
1419           if  ('-1' ==  ret)   1441           if  ('-1' ==  ret)
1420           {   1442           {
1421                 alert   ('
Topic   has   been   successful ly   removed   from   your   flagged   topics
');
  1443                 alert   (' [L[ Topic   has   been   successful ly   removed   from   your   flagged   topics ]] ');
1422                return f alse;   1444                return f alse;
1423           }   1445           }
1424     1446  
1425            alert   ('
Please   login   to   flag   topics
');
  1447            alert   (' [L[ Please   login   to   flag   topics ]] ');
1426           re turn false ;   1448           re turn false ;
1427       }   1449       }
1428     1450  
1429       new Bx XmlRequest  (this._ba se + "?act ion=flag_t opic&topic _id="+topi c_id, h, t rue);   1451       new Bx XmlRequest  (this._ba se + "?act ion=flag_t opic&topic _id="+topi c_id, h, t rue);
1430     1452  
1431       return  false;   1453       return  false;
1432   }   1454   }
1433     1455  
1434   /*   1456   /*
1435    * report  post    1457    * report  post 
1436    */   1458    */
1437   Forum.prot otype.repo rt = funct ion (post_ id)   1459   Forum.prot otype.repo rt = funct ion (post_ id)
1438   {                   1460   {                
1439       var $t his = this ;   1461       var $t his = this ;
1440     1462  
1441       var h  = function  (r)   1463       var h  = function  (r)
1442       {           1464       {        
1443           va r o = new  BxXmlReque st('','',' ');             1465           va r o = new  BxXmlReque st('','',' ');          
1444           va r ret = o. getRetNode Value (r,  'ret');   1466           va r ret = o. getRetNode Value (r,  'ret');
1445           if  ('1' == r et)   1467           if  ('1' == r et)
1446           {   1468           {
1447                 alert   ('
Post   has   been   reported
');
  1469                 alert   (' [L[ Post   has   been   reported ]] ');
1448                return f alse;   1470                return f alse;
1449           }   1471           }
1450     1472  
1451            alert   ('
Report   error
');
  1473            alert   (' [L[ Report   error ]] ');
1452           re turn false ;   1474           re turn false ;
1453       }   1475       }
1454     1476  
1455       new Bx XmlRequest  (this._ba se + "?act ion=report _post&post _id="+post _id, h, tr ue);   1477       new Bx XmlRequest  (this._ba se + "?act ion=report _post&post _id="+post _id, h, tr ue);
1456     1478  
1457       return  false;           1479       return  false;        
1458   }   1480   }
1459     1481  
1460   /*   1482   /*
1461    * place - 1 vote for  post   1483    * place - 1 vote for  post
1462    */   1484    */
1463   Forum.prot otype.vote Bad = func tion (post _id)   1485   Forum.prot otype.vote Bad = func tion (post _id)
1464   {   1486   {
1465       var $t his = this ;   1487       var $t his = this ;
1466     1488  
1467       var h  = function  (r)   1489       var h  = function  (r)
1468       {           1490       {        
1469           va r o = new  BxXmlReque st('','',' ');             1491           va r o = new  BxXmlReque st('','',' ');          
1470           va r ret = o. getRetNode Value (r,  'ret');   1492           va r ret = o. getRetNode Value (r,  'ret');
1471           if  ('1' == r et)   1493           if  ('1' == r et)
1472           {   1494           {
1473                var e =  document.g etElementB yId ('poin ts_'+post_ id);   1495                var e =  document.g etElementB yId ('poin ts_'+post_ id);
1474                e.innerH TML = pars eInt(e.inn erHTML) -  1;   1496                e.innerH TML = pars eInt(e.inn erHTML) -  1;
1475                $this.hi deHiddenPo st (post_i d);   1497                $this.hi deHiddenPo st (post_i d);
1476                return f alse;   1498                return f alse;
1477           }   1499           }
1478     1500  
1479           al ert ('Vote  error');   1501           al ert ('Vote  error');
1480           re turn false ;   1502           re turn false ;
1481       }   1503       }
1482     1504  
1483       new Bx XmlRequest  (this._ba se + "?act ion=vote_p ost_bad&po st_id="+po st_id, h,  true);   1505       new Bx XmlRequest  (this._ba se + "?act ion=vote_p ost_bad&po st_id="+po st_id, h,  true);
1484     1506  
1485       return  false;                    1507       return  false;                 
1486   }   1508   }
1487     1509  
1488   /*   1510   /*
1489    * make vo te buttons  inactive   1511    * make vo te buttons  inactive
1490    */   1512    */
1491   Forum.prot otype.hide VoteButton s = functi on (post_i d)   1513   Forum.prot otype.hide VoteButton s = functi on (post_i d)
1492   {   1514   {
1493       var e  = document .getElemen tById('rat e_'+post_i d);   1515       var e  = document .getElemen tById('rat e_'+post_i d);
1494       var a  = e.getEle mentsByTag Name('img' );   1516       var a  = e.getEle mentsByTag Name('img' );
1495       if (a[ 0])    1517       if (a[ 0]) 
1496       {   1518       {
1497           a[ 0].src = u rlImg + 'v ote_good_g ray.gif';   1519           a[ 0].src = u rlImg + 'v ote_good_g ray.gif';
1498           a[ 0].parentN ode.onclic k = functi on () {};   1520           a[ 0].parentN ode.onclic k = functi on () {};
1499       }   1521       }
1500       if (a[ 1])    1522       if (a[ 1]) 
1501       {   1523       {
1502           a[ 1].src = u rlImg + 'v ote_bad_gr ay.gif';   1524           a[ 1].src = u rlImg + 'v ote_bad_gr ay.gif';
1503           a[ 1].parentN ode.onclic k = functi on () {};   1525           a[ 1].parentN ode.onclic k = functi on () {};
1504       }      1526       }   
1505   }   1527   }
1506     1528  
1507   /*   1529   /*
1508    * make re port butto n inactive   1530    * make re port butto n inactive
1509    */   1531    */
1510   Forum.prot otype.hide ReportButt on = funct ion (post_ id)   1532   Forum.prot otype.hide ReportButt on = funct ion (post_ id)
1511   {   1533   {
1512       var e  = document .getElemen tById('rep ort_'+post _id);   1534       var e  = document .getElemen tById('rep ort_'+post _id);
1513       var a  = e.getEle mentsByTag Name('img' );   1535       var a  = e.getEle mentsByTag Name('img' );
1514       if (a[ 0])    1536       if (a[ 0]) 
1515       {   1537       {
1516           a[ 0].src = u rlImg + 'r eport_gray .gif';   1538           a[ 0].src = u rlImg + 'r eport_gray .gif';
1517           a[ 0].parentN ode.onclic k = functi on () {};   1539           a[ 0].parentN ode.onclic k = functi on () {};
1518       }   1540       }
1519   }   1541   }
1520     1542  
1521   Forum.prot otype.getP ostText =  function ( post_id)   1543   Forum.prot otype.getP ostText =  function ( post_id)
1522   {   1544   {
1523       var e  = document .getElemen tById(post _id);   1545       var e  = document .getElemen tById(post _id);
1524       if (!e ) return ' ';   1546       if (!e ) return ' ';
1525     1547  
1526       return  e.innerHT ML;   1548       return  e.innerHT ML;
1527   }   1549   }
1528     1550  
1529   function g etScroll()   1551   function g etScroll()
1530   {   1552   {
1531       if (na vigator.ap pName == " Microsoft  Internet E xplorer")   1553       if (na vigator.ap pName == " Microsoft  Internet E xplorer")
1532       {   1554       {
1533   //      re turn docum ent.body.s crollTop;   1555   //      re turn docum ent.body.s crollTop;
1534           re turn docum ent.docume ntElement. scrollTop   1556           re turn docum ent.docume ntElement. scrollTop
1535       }   1557       }
1536       else   1558       else
1537       {   1559       {
1538           re turn windo w.pageYOff set;   1560           re turn windo w.pageYOff set;
1539       }   1561       }
1540   }   1562   }
1541     1563  
1542     1564  
1543   Forum.prot otype.live Post = fun ction (ts)   1565   Forum.prot otype.live Post = fun ction (ts)
1544   {   1566   {
1545       var to  = 3000;   // timeout   1567       var to  = 3000;   // timeout
1546       var $t his = this ;   1568       var $t his = this ;
1547     1569  
1548       var lt  = documen t.getEleme ntById('li ve_tracker ');   1570       var lt  = documen t.getEleme ntById('li ve_tracker ');
1549     1571  
1550       var h  = function  (r)   1572       var h  = function  (r)
1551       {           1573       {        
1552           va r o = new  BxXmlReque st('','',' ');             1574           va r o = new  BxXmlReque st('','',' ');          
1553           va r ret = o. getRetNode Value (r,  'ret');   1575           va r ret = o. getRetNode Value (r,  'ret');
1554           // ret = pars eInt(ret);   1576           // ret = pars eInt(ret);
1555           if  (ret > 0)   1577           if  (ret > 0)
1556           {               1578           {            
1557                // get n ew post an d insert i   1579                // get n ew post an d insert i
1558     1580  
1559                var hh =  function  (r)               1581                var hh =  function  (r)            
1560                {               1582                {            
1561                    if ( !lt) retur n;   1583                    if ( !lt) retur n;
1562     1584  
1563                    // d elete olde st   1585                    // d elete olde st
1564     1586  
1565                    var  ln = lt.la stChild;   1587                    var  ln = lt.la stChild;
1566                    whil e (ln.clas sName != ' live_post' )   1588                    whil e (ln.clas sName != ' live_post' )
1567                    {   1589                    {
1568                         ln = ln.pr eviousSibl ing;   1590                         ln = ln.pr eviousSibl ing;
1569                         if (!ln) b reak;   1591                         if (!ln) b reak;
1570                    }   1592                    }
1571     1593  
1572                                      if (ln)   1594                    if ( ln)
1573                    lt.r emoveChild  (ln);   1595                         lt.removeC hild (ln);
1574     1596  
1575                    // i nsert new   1597                    // i nsert new                  
1576                    lt.i nnerHTML =  r + lt.in nerHTML;   1598                    lt.i nnerHTML =  r + lt.in nerHTML;
1577          1599       
1578                    // w atch lates t post   1600                    // w atch lates t post
1579                    setT imeout('f. livePost(' +ret+')',  to);   1601                    setT imeout('f. livePost(' +ret+')',  to);
1580     1602  
1581                    // s uper effec t, get new  inserted  item   1603                    // s uper effec t, get new  inserted  item
1582                    var  fn = lt.fi rstChild;   1604                    var  fn = lt.fi rstChild;
1583                    whil e (fn.clas sName != ' live_post' )   1605                    whil e (fn.clas sName != ' live_post' )
1584                    {   1606                    {
1585                         fn = fn.ne xtSibling;   1607                         fn = fn.ne xtSibling;
1586                         if (!fn) b reak;   1608                         if (!fn) b reak;
1587                    }   1609                    }
1588                    setT imeout('f. fade(\'' +  fn.id + ' \',1,1,1)' , 100);   1610                    setT imeout('f. fade(\'' +  fn.id + ' \',1,1,1)' , 100);
1589                }   1611                }
1590     1612  
1591                 new   BxXslTrans form   ($this._ba se   +   "?action=g et_new_pos t&ts="   +   ts   +"&now="   +   (new   Date()),   urlXsl   +   "live_trac ker
.xsl",hh);
  1613                 new   BxXslTrans form   ($this._ba se   +   "?action=g et_new_pos t&ts="   +   ts   +"&now="   +   (new   Date()),   urlXsl   +   "live_trac ker _main .xsl",hh);
1592              1614           
1593                return f alse;   1615                return f alse;
1594           }       1616           }    
1595     1617  
1596           //  watch lat est post        1618           //  watch lat est post     
1597           se tTimeout(' f.livePost ('+ts+')',  to);   1619           se tTimeout(' f.livePost ('+ts+')',  to);
1598     1620  
1599           re turn false ;   1621           re turn false ;
1600       }   1622       }
1601     1623  
1602          1624       
1603       if (lt )   1625       if (lt )
1604           ne w BxXmlReq uest (this ._base + " ?action=is _new_post& ts=" + ts  +"&now=" +  (new Date ()), h, tr ue);       1626           ne w BxXmlReq uest (this ._base + " ?action=is _new_post& ts=" + ts  +"&now=" +  (new Date ()), h, tr ue);    
1605     1627  
1606       return  false;           1628       return  false;        
1607   }   1629   }
1608     1630  
1609     1631  
1610   Forum.prot otype.fade  = functio n (id, r,  g, b)   1632   Forum.prot otype.fade  = functio n (id, r,  g, b)
1611   {   1633   {
1612       r += 5 ;   1634       r += 5 ;
1613       g += 5 ;   1635       g += 5 ;
1614       b += 5 ;   1636       b += 5 ;
1615     1637  
1616       if (r  > 59) r =  59;   1638       if (r  > 59) r =  59;
1617       if (g  > 59) g =  59;   1639       if (g  > 59) g =  59;
1618       if (b  > 59) b =  59;   1640       if (b  > 59) b =  59;
1619     1641  
1620       var e  = document .getElemen tById (id) ;   1642       var e  = document .getElemen tById (id) ;
1621       e.styl e.height =  b + 'px';   1643       e.styl e.height =  b + 'px';
1622     1644  
1623       if (r  < 59 || g  < 59 || b  < 59)    1645       if (r  < 59 || g  < 59 || b  < 59) 
1624           se tTimeout(' f.fade(\''  + id + '\ ','+r+','+ g+','+b+') ', 100);   1646           se tTimeout(' f.fade(\''  + id + '\ ','+r+','+ g+','+b+') ', 100);
1625   }   1647   }
1626     1648  
1627   Forum.prot otype.setW indowTitle  = functio n (s)   1649   Forum.prot otype.setW indowTitle  = functio n (s)
1628   {   1650   {
1629     1651  
1630       if ((! s || !s.le ngth) && d ocument.ge tElementBy Id('forum_ title'))   1652       if ((! s || !s.le ngth) && d ocument.ge tElementBy Id('forum_ title'))
1631                s = docu ment.getEl ementById( 'forum_tit le').inner HTML;   1653                s = docu ment.getEl ementById( 'forum_tit le').inner HTML;
1632     1654  
1633       if (!s  || !s.len gth)   1655       if (!s  || !s.len gth)
1634           wi ndow.docum ent.title  = defTitle ;   1656           wi ndow.docum ent.title  = defTitle ;
1635       else   1657       else
1636        window.doc ument.titl e   =   s   +   '   ::   Orc a   F o rum ';   1658            window.doc ument.titl e   =   s   +   ' [L[ a dd   this   t o   title]] ';
1637   }   1659   }
1638     1660  
1639   Forum.prot otype.runS cripts = f unction (i d)   1661   Forum.prot otype.runS cripts = f unction (i d)
1640   {   1662   {
1641       var ee  = documen t.getEleme ntById(id) ;   1663       var ee  = documen t.getEleme ntById(id) ;
1642       var a  = ee.getEl ementsByTa gName('scr ipt');   1664       var a  = ee.getEl ementsByTa gName('scr ipt');
1643       var aj s = new Ar ray(a.leng th);   1665       var aj s = new Ar ray(a.leng th);
1644     1666  
1645       if (!a .length) r eturn;   1667       if (!a .length) r eturn;
1646     1668  
1647       for (v ar i=0 ; i <a.length  ; ++i)   1669       for (v ar i=0 ; i <a.length  ; ++i)
1648       {            1670       {         
1649           if  (!a[i]) c ontinue;   1671           if  (!a[i]) c ontinue;
1650     1672  
1651           aj s[i] = a[i ].innerHTM L;   1673           aj s[i] = a[i ].innerHTM L;
1652       }   1674       }
1653     1675  
1654       for (v ar i=0 ; i <ajs.lengt h ; ++i)   1676       for (v ar i=0 ; i <ajs.lengt h ; ++i)
1655       {   1677       {
1656           ev al (ajs[i] );   1678           ev al (ajs[i] );
1657       }   1679       }
1658   }   1680   }
1659     1681  
1660   Forum.prot otype.repl aceTildaA  = function  (s)   1682   Forum.prot otype.repl aceTildaA  = function  (s)
1661   {   1683   {
1662       return  s.replace  (/\xC2/gm ,'');       1684       return  s.replace  (/\xC2/gm ,'');    
1663   }   1685   }