59. File Comparison Report

Produced on Wed Jun 18 08:02:02 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.

59.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.1.1\orca\js BxForum.js Wed Apr 9 17:44:50 2008 UTC
2 Dolphin-v.6.1.2\orca\js BxForum.js Wed Jun 18 06:23:58 2008 UTC

59.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 6 3360
Changed 5 10
Inserted 0 0
Removed 0 0

59.3 Comparison options

Whitespace All differences in whitespace within lines are ignored
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

59.4 Active regular expressions

No regular expressions were active.

59.5 Comparison detail

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