1629. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 1/2/2018 11:57:32 AM Eastern Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

1629.1 Files compared

# Location File Last Modified
1 Tue Jan 2 16:57:32 2018 UTC
2 HTRE_P2.zip\src.zip\output\IHTA OLH Files.zip\ihta_admin.zip\admin.zip\admin ehlpdhtm.js Mon May 11 14:38:08 2015 UTC

1629.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 0 0
Changed 0 0
Inserted 1 5479
Removed 0 0

1629.3 Comparison options

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

1629.4 Active regular expressions

No regular expressions were active.

1629.5 Comparison detail

        1   // Dynamic  HTML Java Script 
        2   // Copyrig ht © 1998- 2012 Adobe  Systems I ncorporate d. All rig hts reserv ed.
        3   // Version =9.0
        4  
        5   // Warning :Do not mo dify this  file. It i s generate d by Adobe  RoboHelp®  and chang es will be  overwritt en.
        6  
        7   //// Segme nt Begin - - (JavaScr ipt 1.0)
        8  
        9   /// Sectio n Begin -  General an d relative  topics(Ja vaScript 1 .0)
        10  
        11   //{{HH_SYM BOL_SECTIO N
        12   var HH_Chm Filename =  "";
        13   var HH_Win dowName =  "";
        14   var HH_Glo ssaryFont  = "";
        15   var HH_Glo ssary = "" ;
        16   var HH_Ave nue = "";
        17   var HH_Act iveX = fal se;
        18   //}}HH_SYM BOL_SECTIO N
        19  
        20   //Begin to  support p revious ge neric para meters
        21   //Get the  informatio n about th e browser.
        22   var gstrBs Agent          = navi gator.user Agent.toLo werCase();
        23   var gnBsVe r                       = parseI nt(navigat or.appVers ion);
        24  
        25   var gbBsOp era            = (gst rBsAgent.i ndexOf('op era') != - 1);
        26   var gbBsKo nqueror        = (gst rBsAgent.i ndexOf('ko nqueror')  != -1);
        27   var gbBsSa fari           = (gst rBsAgent.i ndexOf('sa fari') !=  -1);
        28   var gbBsIE                = (gst rBsAgent.i ndexOf('ms ie') != -1 ) && !gbBs Opera && ! gbBsKonque ror && !gb BsSafari;
        29   var gbBsNS                = (gst rBsAgent.i ndexOf('mo zilla') !=  -1) && (( gstrBsAgen t.indexOf( 'spoofer')  == -1) &&  (gstrBsAg ent.indexO f('compati ble') == - 1)) && !gb BsOpera &&  !gbBsKonq ueror && ! gbBsSafari ;
        30  
        31   var gbBsMa c                       = (gstrB sAgent.ind exOf('mac' ) != -1);
        32   var gbBsWi ndows          = ((gs trBsAgent. indexOf('w in') != -1 ) || (gstr BsAgent.in dexOf('16b it') != -1 ));
        33   var gbBsSu nOS            = (gst rBsAgent.i ndexOf("su nos") != - 1);
        34  
        35   var gbBsIE 3Before        = ((gb BsIE) && ( gnBsVer <=  2));
        36   var gbBsNS 3Before        = ((gb BsNS) && ( gnBsVer <=  3));
        37  
        38   var gbBsNS 2                       = ((gbBs NS) && (gn BsVer <= 2 ));
        39   var gbBsNS 3                       = ((gbBs NS) && (gn BsVer == 3 ));
        40   var gbBsIE 300301         = ((gb BsIE) && ( gnBsVer ==  2) && ((g strBsAgent .indexOf(" 3.00") !=  -1)||(gstr BsAgent.in dexOf("3.0 a") != -1) ||(gstrBsA gent.index Of("3.0b") !=-1)||(gs trBsAgent. indexOf("3 .01")!=-1) ));
        41   var gbBsIE 302            = ((gb BsIE) && ( gnBsVer ==  2) && (gs trBsAgent. indexOf("3 .02") != - 1));
        42  
        43   var gbBsNS 4                       = ((gbBs NS) && (gn BsVer >= 4 ));
        44   var gbBsNS 6                       = ((gbBs NS) && (gn BsVer >= 5 ));
        45   var     gb BsNS7                   = false;
        46  
        47   var gbBsIE 4                       = ((gbBs IE) && (gn BsVer >= 4 ));
        48   var gbBsIE 5                       = false;
        49   var gbBsIE 55             = fals e;
        50   var gbBsIE 7                       = false;
        51  
        52   var gbBsOp era6           = fals e;
        53   var gbBsOp era7           = fals e;
        54  
        55   var gbBsKo nqueror3       = fals e;
        56   var gbSafa ri3            = fals e ;
        57   var gbAIR                          = (gstrB sAgent.ind exOf('adob eair')!=-1 );
        58   var gbChro me             = (gst rBsAgent.i ndexOf('ch rome')!=-1 );
        59   var isLoca l              = docu ment.locat ion.protoc ol.substri ng(0, 4) = = "file";
        60   var gbChro meLocal         = win dow.chrome  && isLoca l ;
        61   var gbInsi deCHM          = docu ment.locat ion.href.s earch("::" )>0 && doc ument.loca tion.href. search(/ch m/i)>0;
        62   var gbBsIs Mobile         = (gst rBsAgent.i ndexOf("mo bile") !=  -1);
        63   if(gbBsIsM obile == f alse)
        64   {
        65           gb BsIsMobile  = isTouch Device();
        66   }
        67   function i sTouchDevi ce() {
        68           re turn !!('o ntouchstar t' in wind ow) ? 1 :  0;
        69   }
        70  
        71   gbBsIE = ( navigator. appName.in dexOf("Mic rosoft") ! = -1) && ! gbBsOpera  && !gbBsKo nqueror &&  !gbBsSafa ri;;
        72   if (gbBsIE )
        73   {
        74           if  (parseInt (navigator .appVersio n) >= 4) {
        75                    gbBs IE4 = true ;
        76                    if ( gbBsIE4) {
        77                             var nP os = gstrB sAgent.ind exOf("msie ");
        78                             var st rIEversion  = gstrBsA gent.subst ring(nPos  + 5);
        79                             var nV ersion =   parseFloat (strIEvers ion);
        80                             if (nV ersion >=  5)
        81                                      gbBsIE5  = true;
        82                             if (nV ersion >=  5.5)
        83                             {
        84                                      if(nVers ion >= 7)
        85                                               gbBsIE7 =  true;
        86                                      gbBsIE55  = true;
        87                             }
        88                    }
        89           }
        90   }
        91  
        92   var re  =  new RegExp ("rv:([0-9 ]{1,}[\.0- 9]{0,})");
        93   if (re.exe c(navigato r.appVersi on) != nul l)
        94   {
        95           gb BsIE = tru e;
        96           gb BsIE4 = tr ue;
        97           gb BsIE5 = tr ue;
        98           gb BsIE55 = t rue;
        99   }
        100  
        101   var isNetS cape = (na vigator.ap pName.inde xOf("Netsc ape") != - 1);
        102   var isMSIE  = (gstrBs Agent.inde xOf('msie' ) != -1);
        103   if(isNetSc ape && isM SIE)
        104   {
        105           // It is the  (Preview)  Browser Co ntrol
        106           gb BsIE = tru e;
        107           gb BsIE4 = tr ue;
        108           gb BsIE5 = tr ue;
        109           gb BsIE55 = t rue;
        110   }
        111  
        112   if (gbBsNS 6)
        113   {
        114           va r nPos=gst rBsAgent.i ndexOf("ge cko");
        115           if (nPos!=-1)
        116           {
        117                    var  nPos2=gstr BsAgent.in dexOf("/",  nPos);
        118                    if(n Pos2!=-1)
        119                    {
        120                             var nV ersion=par seFloat(gs trBsAgent. substring( nPos2+1));
        121                             if (nV ersion>=20 020823)
        122                                      gbBsNS7= true;
        123                    }
        124           }        
        125   }
        126   if (gbBsOp era)
        127   {
        128           va r nPos = g strBsAgent .indexOf(" opera");
        129           if (nPos!=-1)
        130           {
        131                    var  nVersion =  parseFloa t(gstrBsAg ent.substr ing(nPos+6 ));
        132                    if ( nVersion > = 6)
        133                    {
        134                             gbBsOp era6=true;
        135                             if (nV ersion >=7 )
        136                                      gbBsOper a7=true;         
        137                    }
        138           }
        139   }
        140   if (gbBsKo nqueror)
        141   {
        142           va r nPos = g strBsAgent .indexOf(" konqueror" );
        143           if (nPos!=-1)
        144           {
        145                    var  nVersion =  parseFloa t(gstrBsAg ent.substr ing(nPos+1 0));
        146                    if ( nVersion > = 3)
        147                    {
        148                             gbBsKo nqueror3=t rue;
        149                    }
        150           }
        151   }
        152  
        153   if(gbBsSaf ari)
        154   {
        155           va r nPos = g strBsAgent .indexOf(" version/") ;
        156           if (nPos!=-1)
        157           {
        158                    var  nVersion =  parseFloa t(gstrBsAg ent.substr ing(nPos+8 ,nPos+9));
        159                    if ( nVersion > = 3)
        160                    {
        161                             gbSafa ri3=true;
        162                    }
        163           }
        164   }
        165  
        166   if(gbChrom e)
        167   {
        168           // for the ti me being u se same te sts as saf ari
        169           gb BsSafari       = true  ;
        170           gb Safari3        = true ;
        171   }
        172  
        173   function i nsertAdjac entHTML(ob j, where,  htmlStr)
        174   {
        175           if  (gbBsIE | | gbBsOper a7)
        176           {
        177                    obj. insertAdja centHTML(w here, html Str);
        178           }
        179           el se if (gbB sNS6 || gb BsSafari)
        180           {
        181                    var  r = obj.ow nerDocumen t.createRa nge();
        182                    r.se tStartBefo re(obj);
        183                    var      parsed HTML = r.c reateConte xtualFragm ent(htmlSt r);
        184                    
        185                    swit ch (where) {
        186                    case  'beforeBe gin':
        187                             obj.pa rentNode.i nsertBefor e(parsedHT ML,obj);
        188                             break;
        189                    case  'afterBeg in':
        190                             obj.in sertBefore (parsedHTM L,obj.firs tChild);
        191                             break;
        192                    case  'beforeEn d':
        193                             obj.ap pendChild( parsedHTML );
        194                             break;
        195                    case  'afterEnd ':
        196                             if (ob j.nextSibl ing){
        197                             obj.pa rentNode.i nsertBefor e(parsedHT ML,obj.nex tSibling);
        198                             } else  {
        199                             obj.pa rentNode.a ppendChild (parsedHTM L);
        200                             }
        201                             break;
        202                    }
        203           }
        204   }
        205  
        206  
        207   function s etAttribut e(obj, att r, val)
        208   {
        209           if  (gbBsIE)
        210                obj.setA ttribute(a ttr,val);
        211           el se
        212           {
        213                if (obj. setAttribu te)
        214                    obj. setAttribu te(attr,va l);
        215                else
        216                    obj. setPropert y(attr,val ,null);
        217           }        
        218   };
        219  
        220   function g etAttribut e(obj, att r)
        221   {
        222      if (gbB sIE)
        223                return o bj.getAttr ibute(attr );
        224           el se
        225           {
        226                if ((obj .getAttrib ute)&&(obj .getAttrib ute(attr)) )
        227                    retu rn obj.get Attribute( attr);    
        228                 else if  ((obj.get PropertyVa lue)&&(obj .getProper tyValue(at tr)))
        229                    retu rn obj.get PropertyVa lue(attr)  ;
        230                 else if  ((obj.get PropertyCS SValue)&&( obj.getPro pertyCSSVa lue(attr)) )
        231                    retu rn obj.get PropertyCS SValue(att r) ;
        232                 else
        233                    retu rn null ;
        234           }           
        235   };
        236  
        237   // Utiliti es functio ns.
        238   function B sscHasExtJ s()
        239   {
        240           if ( gbBsIE3B efore || g bBsNS3Befo re)
        241                    retu rn false;
        242           re turn true;
        243   }
        244  
        245   // Registe r event ha ndler
        246   var gBsOnL oads                    = new Ar ray();  //  An array  holds all  the onload  event han dler.
        247   var gBsOnC licks                   = new Ar ray();  //  An array  holds all  the onClic k event ha ndler.
        248   var gBsOnU nLoads                  = new Ar ray();  //  An array  holds all  the OnUnLo ad event h andler.
        249   var gBsOnM ouseOvers      = new  Array();   // An arra y holds al l the OnMo useOver ev ent handle r.
        250   var gBsOnM ouseOuts                = new Ar ray();  //  An array  holds all  the OnMous eOut event  handler.
        251  
        252   var gbOrig nalOnMouse Down = nul l;
        253  
        254   function B sscRegiste rOnLoad(fu ncHandler)
        255   {
        256           va r nLength  = gBsOnLoa ds.length;
        257           gB sOnLoads[n Length] =  funcHandle r;
        258   }
        259  
        260   function B sscRegiste rOnClick(f uncHandler )
        261   {
        262           va r nLength  = gBsOnCli cks.length ;
        263           gB sOnClicks[ nLength] =  funcHandl er;
        264   }
        265  
        266   function B sscRegiste rOnUnLoad( funcHandle r)
        267   {
        268           va r nLength  = gBsOnUnL oads.lengt h;
        269           gB sOnUnLoads [nLength]  = funcHand ler;
        270   }
        271  
        272   function B sscRegiste rOnMouseOv er(funcHan dler)
        273   {
        274           va r nLength  = gBsOnMou seOvers.le ngth;
        275           gB sOnMouseOv ers[nLengt h] = funcH andler;
        276   }
        277  
        278   function B sscRegiste rOnMouseOu t(funcHand ler)
        279   {
        280           va r nLength  = gBsOnMou seOuts.len gth;
        281           gB sOnMouseOu ts[nLength ] = funcHa ndler;
        282   }
        283  
        284   function B sGeneralOn Load()
        285   {
        286           if  (!gbBsIE4  && !gbBsN S4)
        287                    retu rn;
        288  
        289           //  Make ever ything vis ible in na vigator
        290   //      if  (gbBsNS4)  {
        291   //               // M ake some s pecial eff ects items  visible
        292   //               var  arr ;
        293   //               if ( gbBsNS6)
        294   //                    arr = docu ment.getEl ementsByTa gName('*') ;
        295   //               else
        296   //                    arr = docu ment.layer s ;
        297   //               for  (var iLaye r = 0; iLa yer < arr. length; iL ayer++) {
        298   //                        arr[iL ayer].visi bility = " visible";
        299   //                        arr[iL ayer].left  = 0 + 'px ';
        300   //               }
        301   //      }        
        302           
        303   }
        304  
        305   // If resi ze the net scape brow ser, need  to reload  it.
        306   function B sReDo()
        307   {
        308     if (inne rWidth !=  origWidth  || innerHe ight != or igHeight)
        309        locat ion.reload ();
        310   }
        311   // End of  the local  functions.
        312  
        313   // The fol lowing fun ctions are  used by t he html fi les.
        314   function B SSCOnLoad( event)
        315   {
        316           if ( !BsscHas ExtJs() )
        317                    retu rn;
        318           fo r (var nEl ement = gB sOnLoads.l ength - 1;  nElement  >= 0; nEle ment--)
        319                    gBsO nLoads[nEl ement]();
        320   }
        321  
        322   function B SSCOnClick (event)
        323   {
        324           if  (!BsscHas ExtJs()) r eturn;
        325                    
        326           fo r (var nEl ement = gB sOnClicks. length - 1 ; nElement  >= 0; nEl ement--)
        327                    gBsO nClicks[nE lement]();
        328   }
        329  
        330   function B SSCOnUnloa d(event)
        331   {
        332           if  (!BsscHas ExtJs()) r eturn;
        333           fo r (var nEl ement = gB sOnUnLoads .length -  1; nElemen t >= 0; nE lement--)
        334                    gBsO nUnLoads[n Element]() ;
        335   }
        336  
        337   function B SSCOnMouse Over(event )
        338   {
        339           if  (!BsscHas ExtJs()) r eturn;
        340           fo r (var nEl ement = gB sOnMouseOv ers.length  - 1; nEle ment >= 0;  nElement- -)
        341                    gBsO nMouseOver s[nElement ]();
        342   }
        343  
        344   function B SSCOnMouse Out(event)
        345   {
        346           if  (!BsscHas ExtJs()) r eturn;
        347           fo r (var nEl ement = gB sOnMouseOu ts.length  - 1; nElem ent >= 0;  nElement-- )
        348           {
        349                    gBsO nMouseOuts [nElement] ();
        350           }
        351   }
        352   // End of  invocation  of the ev ent handle  functions .
        353  
        354   // Add the  GereralOn Load to th e onload a rray.
        355   if (typeof (BsscRegis terOnLoad)  != "undef ined")
        356   {
        357           Bs scRegister OnLoad(BsG eneralOnLo ad);
        358   }
        359   if (gbBsNS 4&&!gbBsNS 6) {
        360           or igWidth =  innerWidth ;
        361           or igHeight =  innerHeig ht;
        362           on resize = B sReDo;
        363   }
        364   //End to s upport pre vious gene ric parame ters
        365  
        366   //Begin to  support p revious HH ActiveX in voking
        367   function B sHHActivat eComponent s()
        368   {
        369           if ( HH_Activ eX && (HH_ ChmFilenam e != "") & & ((self = = top) ||  (self == t op.frames[ 0])))
        370           {
        371                    var  objBody =  getElement sByTag(doc ument,"BOD Y")[0];
        372                    if(  typeof(obj Body) == " object" )
        373                    {
        374                             insert AdjacentHT ML(objBody , "beforeE nd", '<OBJ ECT ID="HH ComponentA ctivator"  CLASSID="C LSID:399CB 6C4-7312-1 1D2-B4D9-0 0105A0422D F" width=0  height=0> </OBJECT>' );
        375                             if (ty peof(HHCom ponentActi vator) !=  "undefined " && HHCom ponentActi vator.obje ct)
        376                                      HHCompon entActivat or.Activat e(HH_ChmFi lename, HH _WindowNam e, HH_Glos saryFont,  HH_Glossar y, HH_Aven ue);
        377                    }
        378           }
        379   }
        380  
        381   function B sHHActivXO nLoad()
        382   {       
        383           if ( gbBsIE4  )
        384                    BsHH ActivateCo mponents()
        385   }
        386  
        387   if( typeof (BsscRegis terOnLoad)  != "undef ined" )
        388   {
        389           Bs scRegister OnLoad(BsH HActivXOnL oad);
        390   }
        391   //End to s upport pre vious HHAc tiveX invo king
        392  
        393   //Begin to  support p revious re lative top ics
        394   //If webHe lp needs R elated Top ics DHTMLc ode, it's  supposed t o add it h ere
        395   var gbPopu pMenuTimeo utExpired  = false;
        396   var gbInPo pupMenu =  false;
        397   var gbPopu pMenuTopic List = nul l;
        398   var gOlddo cumentClic k = null;
        399  
        400   ////////// ////////// ////////// ////////// ////////// ////////// ////////// ////////// //////////
        401   //
        402   // Popup M enu code
        403   //
        404   ////////// ////////// ////////// ////////// ////////// ////////// ////////// ////////// //////////
        405  
        406   var g_bIsP opupMenuIn it = false ;
        407   function _ WritePopup MenuLayer( )
        408   {
        409           if  (!g_bIsPo pupMenuIni t)
        410           {
        411              if (gbBsNS 4&&!gbBsNS 6) {
        412   //Do not t ry to writ e ininle s tyles for  NS!  NS ca n not hand le it and  will not s top downlo ading the  html page. ..
        413                    docu ment.write ("<DIV CLA SS='WebHel pPopupMenu ' ID='Popu pMenu'></D IV>");
        414              } else{
        415              document.w rite("<DIV  ID='Popup Menu' STYL E='positio n:absolute ; left:0px ; top:0px;  z-index:4 ; visibili ty:hidden; '></DIV>") ;
        416              if (!(gbBs NS4&&!gbBs NS6)) {
        417                    docu ment.write ("<STYLE T YPE='text/ css'>");
        418                    if ( gbBsMac&&g bBsIE4) {
        419                             docume nt.write(" .PopupOver  {font-fam ily:'Arial '; color:w hite; back ground:nav y; font-si ze:10pt; f ont-style: normal;fon t-weight:n ormal;text -decoratio n:none;}") ;
        420                             docume nt.write(" .PopupNotO ver {font- family:'Ar ial'; colo r:black; b ackground: #c0c0c0; f ont-size:1 0pt; font- style:norm al;font-we ight:norma l;text-dec oration:no ne;}");
        421                    } el se {
        422                             docume nt.write(" .PopupOver  {font-fam ily:'Arial '; color:w hite; back ground:nav y; font-si ze:8pt; fo nt-style:n ormal;font -weight:no rmal;text- decoration :none;}");
        423                             docume nt.write(" .PopupNotO ver {font- family:'Ar ial'; colo r:black; b ackground: #c0c0c0; f ont-size:8 pt; font-s tyle:norma l;font-wei ght:normal ;text-deco ration:non e;}");
        424                    }
        425                    docu ment.write ("</STYLE> ");
        426               }
        427              }
        428              g_bIsPopup MenuInit =  true;
        429           }
        430   }
        431  
        432   //Seek for  the bsscr ight frame  
        433   function _ SeekFrameB yName( cRo ot, strNam e )
        434   {
        435           if ( cRoot ==  null )      return n ull;
        436           if ( cRoot.fr ames == nu ll )       return nul l;
        437           if ( cRoot.fr ames[strNa me] != nul l )     re turn cRoot .frames[st rName];
        438           fo r (var i=0 ; i<cRoot. frames.len gth; i++)
        439           {
        440                    var  cObj = nul l;
        441                    if ( !gbBsNS6) 
        442                             cObj =  _SeekFram eByName( c Root.frame s(i).docum ent, strNa me );
        443                    else
        444                             cObj =  _SeekFram eByName( c Root.frame s[i], strN ame );
        445                    if(  cObj != nu ll )               re turn cObj;
        446           };
        447           re turn null;
        448   }
        449   function _ GetFrameBy Name( cRoo t, strName  )
        450   {
        451           if ( cRoot ==  null )      return n ull;
        452           va r cRet = _ SeekFrameB yName(cRoo t, strName );
        453           if ( cRet !=  null )       return c Ret;
        454           if  (cRoot.pa rent != cR oot)
        455                    retu rn _GetFra meByName(  cRoot.pare nt, strNam e );
        456           el se
        457                    retu rn null;
        458   }
        459  
        460   var gfn_ar guments =  null;
        461   function _ PopupMenu_ Invoke(fn_ arguments)
        462   {
        463           gf n_argument s = fn_arg uments;
        464           if  (gbBsOper a6&&gbBsMa c)
        465           {
        466                    var  wndOldPopu pLinks= wi ndow.open( document.l ocation.hr ef, "popup links");
        467                    wndO ldPopupLin ks.close() ;
        468                    setT imeout("_P opupMenu_I nvoke_2(); ",100);
        469           }
        470           el se
        471           {
        472                    _Pop upMenu_Inv oke_2();
        473           }
        474   }
        475  
        476   function G etXOffset( el) {
        477       var of fX = 0;
        478       while  (el && typ eof (el.of fsetLeft)  != 'undefi ned' && ty peof (el.o ffsetParen t) != 'und efined') 
        479       {
        480           of fX = offX  + el.offse tLeft;
        481           el  = el.offs etParent;
        482       }
        483       return  offX;
        484   }
        485  
        486   function G etYOffset( el) 
        487   {
        488       var of fY = 0;
        489       while  (el && typ eof (el.of fsetTop) ! = 'undefin ed' && typ eof (el.of fsetParent ) != 'unde fined') 
        490       {
        491           of fY = offY  + el.offse tTop;
        492           el  = el.offs etParent;
        493       }
        494       return  offY;
        495   }
        496  
        497   function _ PopupMenu_ Invoke_2()
        498   {
        499           va r fn_argum ents = gfn _arguments ;
        500           gf n_argument s = null;
        501           
        502           //  Make sure  we have r easonable  arguments
        503           va r argLen =  fn_argume nts.length ;
        504           if  (argLen <  3) {
        505                    retu rn false;
        506           }
        507  
        508           //  Check to  see if we  only have  one target
        509           va r strTarge t = "";
        510           va r targetDo c = null;
        511           if  (fn_argum ents[1] ==  '') {
        512                    if ( BSSCPopup_ IsPopup())  {
        513                             target Doc = pare nt;
        514                             strTar get = "TAR GET= _pare nt";
        515                    }
        516                    else
        517                             target Doc = wind ow.documen t;
        518           }  else {
        519                    targ etDoc = _G etFrameByN ame( paren t, fn_argu ments[1] ) ;
        520  
        521                    strT arget = "T ARGET='" +  fn_argume nts[1] + " '";
        522           }
        523  
        524           if  ((!gbBsIE 4 && !gbBs NS4 && !gb BsOpera7 & & !gbBsKon queror3 && !gbBsSafar i) || ((gb BsMac) &&  (gbBsIE4)  && (window .event.src Element.ta gName == " AREA"))) {
        525           
        526                    var  argLen       = fn_arg uments.len gth;
        527  
        528                    // C reate the  window tha t the hype rlinks wil l go into
        529                    var  nHeight =  argLen * 1 5;
        530                    var  nWidth = 4 00;
        531                    var  strParam =  "titlebar =no,toolba r=no,statu s=no,locat ion=no,men ubar=no,re sizable=ye s,scrollba rs=auto";
        532                    strP aram += ", height=" +  nHeight +  ",width=2 00";
        533                    strP aram += ", resizable" ;
        534  
        535                    var  wndTemp=nu ll;
        536                    // C reate a te mporary wi ndow first  to ensure  the real  popup come s up on to p
        537                    if ( !gbBsOpera )
        538                             wndTem p = window .open("",  "temp", st rParam);
        539  
        540                    // C reate the  real popup  window
        541                    var  wndPopupLi nks=null;
        542                    if ( gbBsOpera& &gbBsMac)
        543                    {
        544                             wndTem p = window .open(docu ment.locat ion.href,  "temp", st rParam);
        545                             wndPop upLinks= w indow.open (document. location.h ref, "popu plinks", s trParam);
        546                    }
        547                    else
        548                             wndPop upLinks= w indow.open ("", "popu plinks", s trParam);
        549                    wndP opupLinks. document.o pen("text/ html");
        550  
        551                    // C lose the t emporary
        552                    if ( wndTemp)
        553                             wndTem p.close();
        554  
        555                    var  sHTML="<ht ml><head>" ;
        556                    sHTM L += "<";
        557                    sHTM L += "/hea d>";
        558                    sHTM L+="<body  onBlur=\'s elf.focus( );\'>";
        559                    var  strParaLin e = "";
        560                    for  (var i = 0 ; i < (arg Len - 2) /  2; i++) {
        561                             strPar aLine = "" ;
        562                             strPar aLine += " <a href=\" javascript :";
        563                             if (gb BsIE) {
        564                                      strParaL ine += "on Blur=null;  ";
        565                             }
        566                             strPar aLine += " opener.loc ation=\'";
        567                             strPar aLine += f n_argument s[2 * i +  3];
        568                             strPar aLine += " \';close() ;\"";
        569                             strPar aLine += s trTarget;
        570  
        571                             strPar aLine += " >";
        572                             strPar aLine += f n_argument s[2 * i +  2];
        573                             strPar aLine += " </a>";
        574                             strPar aLine += " <br>";
        575                             sHTML+ =strParaLi ne;
        576                    }
        577                    sHTM L+="</body ></html>";
        578                    wndP opupLinks. document.w rite(sHTML );
        579                    wndP opupLinks. document.c lose();
        580                    wind ow.gbInPop upMenu = t rue;
        581                    if ( !gbBsIE) {
        582                             wndPop upLinks.fo cus();
        583                    }
        584                    retu rn false;
        585           }
        586  
        587           if  (((argLen  < 5) && ( (isNaN(fn_ arguments[ 2])) || (g bPopupMenu TopicList  == null)))  ||
        588                    ((ar gLen < 4)  && ((!isNa N(fn_argum ents[2]))  && (gbPopu pMenuTopic List != nu ll)))) {
        589                    // G et the pla ce that we  will be p utting the  topic int o
        590                    var  strURL = " ";
        591                    if ( isNaN(fn_a rguments[2 ]) ||  (gb PopupMenuT opicList = = null)) {
        592                             strURL  = fn_argu ments[3];
        593                    }
        594                    else     {
        595                             strURL  = gbPopup MenuTopicL ist[fn_arg uments[2]] .strURL;
        596                    }
        597  
        598                    if ( targetDoc  != null) {
        599                             target Doc.locati on.href =  strURL;
        600                    }
        601                    else  {
        602                             if (fn _arguments [1] != nul l && typeo f(fn_argum ents[1]) ! = "undefin ed")
        603                                      window.o pen(strURL , fn_argum ents[1]);
        604                             else
        605                                      window.o pen(strURL );
        606                    }                 
        607                    wind ow.gbInPop upMenu = t rue;
        608                    retu rn false;
        609           }
        610           
        611           va r strMenu  = "";
        612           if  (gbBsNS4& &!gbBsNS6)  {
        613                    strM enu = '<TA BLE BORDER ="1" CELLS PACING=0 C ELLPADDING =3 BGCOLOR ="#c0c0c0" >';
        614           }  else {
        615                    strM enu = '<TA BLE STYLE= "border:2p x outset w hite;" CEL LSPACING=0 ';
        616                    if ( gbBsMac) {
        617                             strMen u += ' CEL LPADDING=4 ';
        618                    } el se {
        619                             strMen u += ' CEL LPADDING=2 ';
        620                    }        
        621                    strM enu += ' B GCOLOR=#c0 c0c0>';
        622           }
        623           //  Add each  of the ite ms
        624           va r i = 2;
        625           wh ile (i <=  argLen - 1 ) {
        626                    strM enu += '<T R><TD><NOB R>'
        627                    // I f the dest ination is  a number  then look  it up in t he topic l ist
        628                    if ( isNaN(fn_a rguments[i ]) ||  (gb PopupMenuT opicList = = null)) {
        629                             strMen u += '<DIV  class="Po pupNotOver " STYLE="p adding-lef t:3pt; pad ding-right :3pt;"><A  HREF="' +  fn_argumen ts[i + 1]  + '"' + st rTarget;
        630                    } el se {
        631                             strMen u += '<DIV  class="Po pupNotOver " STYLE="p adding-lef t:3pt; pad ding-right :3pt;"><A  HREF="' +  gbPopupMen uTopicList [fn_argume nts[i]].st rURL + '"'  + strTarg et;
        632                    }
        633                    strM enu += ' o nclick="Po pupMenu_Ha ndleClick( event);"';
        634                    strM enu += ' o nmouseover ="PopupMen u_Over(eve nt);"';
        635                    strM enu += ' o nmouseout= "PopupMenu _Out(event );"';
        636                    strM enu += '>' ;
        637                    if ( isNaN(fn_a rguments[i ]) || (gbP opupMenuTo picList ==  null)) {
        638                             strMen u += '<SPA N CLASS="P opupNotOve r">' + fn_ arguments[ i] + '</SP AN>';
        639                    } el se {
        640                             strMen u += '<SPA N CLASS="P opupNotOve r">' + gbP opupMenuTo picList[fn _arguments [i]].strTi tle + '</S PAN>';
        641                    }
        642                    strM enu += '</ A></DIV></ NOBR></TD> </TR>';
        643  
        644                    if ( isNaN(fn_a rguments[i ]) || (gbP opupMenuTo picList ==  null)) {
        645                             i += 2 ;
        646                    } el se {
        647                             i += 1 ;
        648                    }
        649           }
        650           st rMenu += " </TABLE>";
        651  
        652           if  (gbBsMac)  {
        653           //  totally h ack. becau se ie5 in  mac need s omething.  </TABLE> i s one of t hem. mac i s mad.
        654                    strM enu +="<TA BLE></TABL E>";
        655           }
        656  
        657           va r layerPop up = null;
        658           va r stylePop up = null;
        659           va r nEventX  = 0;
        660           va r nEventY  = 0;
        661           va r nWindowW idth = 0;
        662  
        663           va r nPopupHe ight = 0;
        664           va r nPopupWi dth = 0;
        665  
        666           va r e = fn_a rguments[0 ];
        667           if  (typeof ( window.eve nt) != 'un defined' & & typeof ( window.eve nt.clientX ) != 'unde fined' &&  typeof (wi ndow.event .clientX)  == 'number ') 
        668       {
        669                nEventX  = window.e vent.clien tX;
        670                nEventY  = window.e vent.clien tY;
        671           }
        672           el se 
        673       {
        674           if  (typeof ( e.clientX)  != 'undef ined') 
        675           {
        676                    nEve ntX = e.cl ientX;
        677                    nEve ntY = e.cl ientY;
        678                }
        679                else if  (typeof (e .pageX) !=  'undefine d') 
        680           {
        681                    nEve ntX = e.pa geX;
        682                    nEve ntY = e.pa geY;
        683  
        684                    nEve ntX -= get ScrollLeft ();
        685                    nEve ntY -= get ScrollTop( );
        686  
        687                }
        688           }
        689  
        690           _B SPSGetClie ntSize();
        691  
        692           va r bFoundBr owser = tr ue;
        693           if  (gbBsIE4  || gbBsOpe ra7) 
        694       {
        695                layerPop up = getEl ement("Pop upMenu");
        696                    laye rPopup.inn erHTML = s trMenu;
        697                    styl ePopup = l ayerPopup. style;
        698                nPopupHe ight = lay erPopup.sc rollHeight ;
        699                nPopupWi dth = laye rPopup.scr ollWidth;
        700                if (gbBs Mac) 
        701           {
        702                    nPop upWidth =  80; // we  have no id ea how to  get the dy namic widt h of the p opup.
        703                }
        704           }
        705           el se if (gbB sNS6 || gb BsKonquero r3 || gbBs Safari) 
        706       {
        707                layerPop up = getEl ement("Pop upMenu");
        708                    laye rPopup.sty le.visibil ity = "hid den";
        709                    laye rPopup.inn erHTML = s trMenu;
        710                nPopupHe ight = lay erPopup.of fsetHeight ;
        711                nPopupWi dth = laye rPopup.off setWidth;
        712           }
        713           el se if (gbB sNS4) 
        714       {
        715                layerPop up = docum ent.layers .PopupMenu ;
        716                layerPop up.visibil ity = "hid e";
        717                stylePop up = layer Popup.docu ment;
        718                stylePop up.write(s trMenu);
        719                stylePop up.close() ;
        720  
        721                nPopupHe ight = lay erPopup.cl ip.height;
        722                nPopupWi dth = laye rPopup.cli p.width;
        723           }
        724           el se
        725                bFoundBr owser = fa lse;
        726  
        727           if  (bFoundBr owser)
        728       {
        729                if (nEve ntY + nPop upHeight +  20 < gBsC lientHeigh t) 
        730           {
        731                    nEve ntY += 20;
        732                }
        733                else 
        734           {
        735                nEventY  = gBsClien tHeight -  nPopupHeig ht - 20;
        736                }
        737  
        738           if  (nEventX  + nPopupWi dth + 20 <  gBsClient Width) 
        739           {
        740                nEventX  += 20;
        741           }
        742           el se 
        743           {
        744                nEventX  = gBsClien tWidth - n PopupWidth  - 20;
        745           }
        746  
        747           va r par = la yerPopup.o ffsetParen t;
        748           va r offX = 0 , offY = 0 ;
        749           if  (typeof(p ar) != 'un defined' & & par) 
        750           {
        751                offX = G etXOffset( par);
        752                offY = G etYOffset( par);
        753           }
        754  
        755           nE ventX += g etScrollLe ftElement( par);
        756           nE ventX -= o ffX;
        757           nE ventY += g etScrollTo pElement(p ar);
        758           nE ventY -= o ffY;
        759       }
        760  
        761           if  (gbBsIE4  || gbBsOpe ra7) 
        762       {
        763                stylePop up.top = n EventY;
        764                if (type of (styleP opup.top)  != 'number ' ) 
        765           {
        766                    styl ePopup.top  = nEventY  + "px";
        767                }
        768                stylePop up.left =  nEventX;
        769                if (type of (styleP opup.left)  != 'numbe r' ) 
        770           {
        771                    styl ePopup.lef t = nEvent X + "px";
        772                }
        773  
        774                stylePop up.visibil ity = "vis ible";
        775                if (!gOl ddocumentC lick && do cument.onc lick)
        776                    gOld documentCl ick = docu ment.oncli ck;
        777                document .onclick =  PopupMenu _HandleCli ck;
        778           }
        779           el se if (gbB sNS6 || gb BsKonquero r3 || gbBs Safari) 
        780       {
        781                if (gbBs NS6 || gbC hrome || g bSafari3)
        782                    laye rPopup.sty le.top = n EventY + " px";
        783                else
        784                    laye rPopup.sty le.top = n EventY;
        785                if (gbBs NS6 || gbC hrome || g bSafari3)
        786                    laye rPopup.sty le.left =  nEventX +  "px";
        787                else
        788                    laye rPopup.sty le.left =  nEventX;
        789                // set a gain to av oid the st upid frash  in netsca pe 6.
        790                layerPop up.innerHT ML = strMe nu;
        791                layerPop up.style.v isibility  = "visible ";
        792                //window .captureEv ents(Event .MOUSEDOWN );
        793                if (!gOl ddocumentC lick && do cument.onc lick)
        794                    gOld documentCl ick = docu ment.oncli ck;
        795                window.o nclick = P opupMenu_H andleClick ;
        796           }
        797           el se if (gbB sNS4) 
        798       {
        799                layerPop up.left =  nEventX;
        800                layerPop up.top = n EventY;
        801                layerPop up.visibil ity = "vis ible";
        802                window.c aptureEven ts(Event.M OUSEDOWN);
        803                if (!gOl ddocumentC lick && do cument.onm ousedown)
        804                    gOld documentCl ick = docu ment.onmou sedown;
        805                window.o nmousedown  = PopupMe nu_HandleC lick;
        806           }
        807  
        808           if (window.ad dEventList ener)
        809           {
        810                    var  popupDivEl em = getEl ement("Pop upMenu");
        811                    if(t ypeof(popu pDivElem)  != 'undefi ned')
        812                             popupD ivElem.add EventListe ner("touch start", on PopupDivTo uched, fal se);
        813  
        814                    wind ow.documen t.addEvent Listener(" touchstart ", onPopup ParentTouc hed, false );
        815           }
        816           
        817  
        818           wi ndow.gbInP opupMenu =  true;
        819           wi ndow.gbPop upMenuTime outExpired  = false;
        820           se tTimeout(" PopupMenu_ Timeout(); ", 100);
        821           re turn false ;
        822   }
        823  
        824   function P opupMenu_T imeout()
        825   {
        826           wi ndow.gbPop upMenuTime outExpired  = true;
        827   }
        828  
        829   function P opupMenu_O ver(e)
        830   {
        831       if (gb BsIE4||gbB sOpera7)
        832                    e.sr cElement.c lassName =  "PopupOve r";
        833       else i f (gbBsNS6 )
        834                    e.ta rget.paren tNode.clas sName = "P opupOver";
        835           re turn;
        836   }
        837  
        838   function P opupMenu_O ut(e)
        839   {
        840       if (gb BsIE4||gbB sOpera7)
        841                    e.sr cElement.c lassName =  "PopupNot Over";
        842       else i f (gbBsNS6 )
        843                    e.ta rget.paren tNode.clas sName = "P opupNotOve r";
        844           re turn;
        845   }
        846   function o nPopupDivT ouched(e)
        847   {
        848           if (typeof(e)  != 'undef ined' && e )
        849                    e.st opPropagat ion();
        850   }
        851  
        852   function o nPopupPare ntTouched( e)
        853   {
        854           if (window.re moveEventL istener)
        855           {
        856                    var  popupDivEl em = getEl ement("Pop upMenu");
        857                    if(t ypeof(popu pDivElem)  != 'undefi ned')
        858                             popupD ivElem.rem oveEventLi stener("to uchstart",  onPopupDi vTouched,  false);
        859                    wind ow.removeE ventListen er("touchs tart", onP opupParent Touched, f alse);
        860           }
        861  
        862           Po pupMenu_Ha ndleClick( e);
        863   }
        864  
        865   function P opupMenu_H andleClick (e)
        866   {
        867           if  (window.g bPopupMenu TimeoutExp ired) {
        868                    wind ow.gbInPop upMenu = f alse;
        869                    if ( gbBsNS4 &&  !gbBsNS6)  {
        870                             window .releaseEv ents(Event .MOUSEDOWN );
        871                    }
        872  
        873                    var  layerPopup  = null;
        874                    if ( gbBsNS4&&! gbBsNS6) {
        875                             layerP opup = doc ument.laye rs.PopupMe nu;
        876                             layerP opup.visib ility = "h ide";
        877                    } el se {
        878                             layerP opup = get Element("P opupMenu") ;
        879                             layerP opup.style .visibilit y = "hidde n";
        880                    }
        881           
        882                    if ( gOlddocume ntClick)
        883                    {
        884                             if (gb BsNS4 && ! gbBsNS6)
        885                                      document .onmousedo wn = gOldd ocumentCli ck;
        886                             else
        887                                      document .onclick =  gOlddocum entClick;
        888                    }
        889           }
        890           re turn;
        891   }
        892  
        893   function B SSCPopup_C lickMac()
        894   {
        895           if  ((!DHTMLP opupSuppor t()) && (g bBsIE4 ||  gbBsOpera7 ))
        896           {        
        897                    var  bClickOnAn chor = fal se;
        898                    var  el;
        899                    if ( (window.ev ent != nul l) &&
        900                         (window.ev ent.srcEle ment != nu ll))
        901                    {
        902                         el = windo w.event.sr cElement;
        903                             while  (el != nul l)
        904                             {
        905                                      if ((el. tagName ==  "A") || ( el.tagName  == "AREA" ))      {
        906                                               bClickOnAn chor = tru e;
        907                                               break;
        908                                      }
        909                                      if (el.t agName ==  "BODY") {
        910                                               break;
        911                                      }
        912                                      el = get ParentNode (el);
        913                             }
        914                    }
        915                    if ( BSSCPopup_ IsPopup())
        916                    {
        917                             if (!b ClickOnAnc hor) {
        918                                      parent.w indow.gPop upWindow =  null;
        919                                      self.clo se();
        920                             }
        921                    }
        922                    else
        923                    {
        924                             bClose PopupWindo w = true;
        925                             if ((b ClickOnAnc hor) &&
        926                                      (el.href ) &&
        927                                 (( el.href.in dexOf("jav ascript:BS SCPopup")  != -1) ||  (el.href.i ndexOf("ja vascript:n ull") != - 1) || (el. href.index Of("javasc ript:void( 0)") != -1 )))
        928                             {
        929                                      bClosePo pupWindow  = false;
        930                             }
        931                             if (bC losePopupW indow)
        932                             {
        933                                      if (wind ow.gPopupW indow != n ull && !wi ndow.gPopu pWindow.cl osed )
        934                                      {
        935                                               window.gPo pupWindow. close();
        936                                      }
        937                             }
        938                    }
        939           }
        940   }
        941  
        942   function B sPopupOnCl ick()
        943   {
        944           if  (!gbBsIE4  && !gbBsO pera7)
        945                    retu rn;
        946  
        947           BS SCPopup_Cl ickMac();
        948   }
        949  
        950   function _ BSSCOnErro r(message)
        951   {
        952           if (-1 != mes sage.index Of("denied ") 
        953                    || - 1 != messa ge.indexOf ("Object r equired"))
        954            r eturn true ;
        955   }
        956  
        957   //End to s upport pre vious rela tive topic s
        958  
        959   /// Sectio n End - Ge neral and  relative t opics (Jav aScript 1. 0)
        960  
        961   /// Sectio n Begin  -  Popup (Ja vaScript 1 .0)
        962   //Begin to  support p revious po pup functi ons
        963  
        964   //variable s used to  isolate th e browser  type
        965   var gBsSty VisShow        = null ;
        966   var gBsSty VisHide        = null ;
        967   var gBsCli entWidth       = 640;
        968   var gBsCli entHeight  = 480;
        969  
        970   // here is  the varib le for jud ge popup w indows siz e. these p arameter i s for IE5. 0, it may  need adjus t for othe rs.
        971   var gBRate H_W            = 0.61 8; // 1.61 8 Golden c ut.
        972   var gBMaxX OfParent       = 0.8;  
        973   var gBMaxY OfParent       = 0.8;
        974   var gBscro llHeight    = 16;
        975   var gBscro llWidth    =  16;
        976   var gBperm itXDelta       = 3;
        977   var gBperm itYDelta       = 3;
        978  
        979  
        980   var arrayP opupURL =  new Array( );
        981   var arrayA bsPopupURL  = new Arr ay();
        982   var arrayI ntervalId  = new Arra y();
        983  
        984   var arrayD irty = new  Array();
        985  
        986   function g etBRateH_W ()
        987   {
        988           re turn 0.618  ;
        989   }
        990  
        991   function g etBscrollW idth()
        992   {
        993           re turn 16 ;
        994   }
        995  
        996   function g etBscrollH eight()
        997   {
        998           re turn 16 ;
        999   }
        1000  
        1001   function g etBMaxXOfP arent()
        1002   {
        1003           re turn 0.8 ;
        1004   }
        1005  
        1006   function g etBMaxYOfP arent()
        1007   {
        1008           re turn 0.8 ;
        1009   }
        1010  
        1011   function s etInterval ID(nIndex, id)
        1012   {
        1013       arrayI ntervalId[ nIndex] =  id;
        1014   }
        1015  
        1016   function g etInterval ID(nIndex)
        1017   {
        1018           if  (nIndex = = -1 || ar rayInterva lId.length  <= nIndex
        1019                return - 1;
        1020           el se
        1021           re turn array IntervalId [nIndex];
        1022   }
        1023  
        1024   function s etAbsPopup URL(nIndex , strURL)
        1025   {
        1026           ar rayAbsPopu pURL[nInde x] = strUR L;
        1027   }
        1028  
        1029   function g etAbsPopup URL(nIndex )
        1030   {
        1031           if  (nIndex = = -1 || ar rayAbsPopu pURL.lengt h <= nInde x) return  null;
        1032           el se 
        1033                    retu rn arrayAb sPopupURL[ nIndex];
        1034   }
        1035  
        1036   function g etPopupURL (nIndex)
        1037   {
        1038           if  (nIndex = = -1 || ar rayPopupUR L.length < = nIndex)  return nul l;
        1039           el se 
        1040                    retu rn arrayPo pupURL[nIn dex];
        1041   }
        1042  
        1043   function g etPopupID( nIndex)
        1044   {
        1045           re turn gstrP opupID + n Index;
        1046   }
        1047  
        1048   function g etPopupSha dowID(nInd ex)
        1049   {
        1050           re turn gstrP opupShadow ID + nInde x;
        1051   }
        1052  
        1053   function g etPopupTop icID(nInde x)
        1054   {
        1055           re turn gstrP opupTopicI D + nIndex ;
        1056   }
        1057  
        1058   function g etPopupIFr ameID(nInd ex)
        1059   {
        1060           re turn gstrP opupIFrame ID + nInde x;
        1061   }
        1062  
        1063   function g etPopupIFr ameName(nI ndex)
        1064   {
        1065           re turn gstrP opupIFrame Name + nIn dex;
        1066   }
        1067  
        1068  
        1069   function g etPopupTop icStyle(nI ndex)
        1070   {
        1071           re turn getEl ement(getP opupTopicI D(nIndex)) .style;
        1072   }
        1073  
        1074   function g etPopupSha dowStyle(n Index)
        1075   {
        1076           re turn getEl ement(getP opupShadow ID(nIndex) ).style;
        1077   }
        1078  
        1079   function g etPopupIFr ame(nIndex )
        1080   {
        1081           if (gbAIR)
        1082           {
        1083                    retu rn window. frames[get PopupIFram eName(nInd ex)];
        1084           }
        1085           el se
        1086           {
        1087                    if ( gbBsNS6||g bSafari3)
        1088                             return  eval("win dow.frames ['" + getP opupIFrame Name(nInde x) + "']") ;
        1089                    else
        1090                             return  eval("doc ument.fram es['" + ge tPopupIFra meName(nIn dex) + "'] ");
        1091           }
        1092   }
        1093  
        1094   function g etPopupDiv Style(nInd ex)
        1095   {
        1096           re turn getEl ement(getP opupID(nIn dex)).styl e;
        1097   }
        1098  
        1099   function g etPopupIFr ameStyle(n Index)
        1100   {
        1101           re turn getEl ement(getP opupIFrame ID(nIndex) ).style;
        1102   }
        1103  
        1104  
        1105   function f indDiv(str URL)
        1106   {
        1107           fo r (var i =  0; i < ar rayPopupUR L.length;  i ++ ) {
        1108                    if ( arrayPopup URL[i] ==  strURL) {
        1109                             return  i;
        1110                    }
        1111           }
        1112           re turn -1;
        1113   }
        1114  
        1115   var gnToke n = -1;
        1116   function t akeToken()
        1117   {
        1118           gn Token ++;
        1119           if  (gnToken  > 10000) g nToken = 0 ;
        1120           re turn gnTok en;
        1121   }
        1122  
        1123   function I sValidToke n(nToken)
        1124   {
        1125           re turn (gnTo ken == nTo ken);
        1126   }
        1127  
        1128   function a ddDiv(strU RL)
        1129   {
        1130           fo r (var i =  0; i < ar rayPopupUR L.length;  i ++) {
        1131                    if ( arrayPopup URL[i] ==  null) {
        1132                             arrayP opupURL[i]  = strURL;
        1133                             return  i;
        1134                    }
        1135           }        
        1136           ar rayPopupUR L[i] = str URL;
        1137           ar rayDirty[i ] = true;
        1138           re turn i;
        1139   }
        1140  
        1141   function s etDirty()
        1142   {
        1143           fo r (var i =  0; i < ar rayPopupUR L.length;  i ++ )
        1144                    arra yDirty[i]  = true;
        1145   }
        1146  
        1147   function I sDirty(nIn dex)
        1148   {
        1149           if  (nIndex = = -1)
        1150                    retu rn true;
        1151           el se 
        1152                    if ( arrayDirty .length >  nIndex) 
        1153                             return  arrayDirt y[nIndex];
        1154                    else
        1155                             return  true;
        1156   }
        1157  
        1158   function h ideAll()
        1159   {
        1160           fo r (var i =  0; i < ar rayPopupUR L.length;  i ++ )
        1161           {
        1162                    getP opupDivSty le(i).visi bility = g BsStyVisHi de;
        1163                    getP opupIFrame Style(i).v isibility  = gBsStyVi sHide;
        1164                    if(g bBsIE)
        1165                         removeThis (document. all(getPop upID(i)));
        1166           }
        1167           if (gbBsIE)
        1168                    arra yPopupURL. length = 0 ;
        1169   }
        1170  
        1171   function g etCurrentP opupIFrame ()
        1172   {
        1173           fo r (var i =  0; i < ar rayPopupUR L.length;  i ++)
        1174                    if ( getPopupDi vStyle(i). visibility  == gBsSty VisShow)
        1175                             return  getPopupI Frame(i);
        1176           re turn null;
        1177   }
        1178  
        1179   function s etClear(nI ndex)
        1180   {
        1181           if  (nIndex ! = -1)
        1182                    arra yDirty[nIn dex] = fal se;
        1183   }
        1184  
        1185   function _ BSSCCreate PopupDiv(s trURL)
        1186   {
        1187           va r nIndex =  findDiv(s trURL);
        1188           if  (nIndex = = -1 ) {
        1189                    nInd ex = addDi v(strURL);
        1190                    BsPo pup_Create Div(nIndex );
        1191           }
        1192           el se {
        1193                    if ( IsDirty(nI ndex)) {
        1194                             if("ob ject" == t ypeof(getP opupIFrame (nIndex).d ocument))
        1195                                      getPopup IFrame(nIn dex).docum ent.locati on.href =  strURL;
        1196                    }
        1197           }
        1198           re turn nInde x;
        1199   }
        1200  
        1201   //Here is  the browse r type 
        1202   function _ BSPSGetBro wserInfo()
        1203   {
        1204           if  (gbBsNS4& &!gbBsNS6)
        1205           {
        1206                    gBsS tyVisShow    = "show" ;
        1207                    gBsS tyVisHide    = "hide" ;
        1208           }
        1209           el se
        1210           {
        1211                    gBsS tyVisShow    = "visib le";
        1212                    gBsS tyVisHide    = "hidde n";
        1213           }
        1214   }
        1215  
        1216   _BSPSGetBr owserInfo( );
        1217  
        1218   //Get clie nt size in fo
        1219   function _ BSPSGetCli entSize()
        1220   {
        1221           if ( typeof(  window.inn erWidth )  == 'number ' )
        1222           {
        1223                    gBsC lientWidth   = innerW idth;
        1224                    gBsC lientHeigh t = innerH eight;
        1225           }
        1226           el se if( doc ument.docu mentElemen t && ( doc ument.docu mentElemen t.clientWi dth || doc ument.docu mentElemen t.clientHe ight ) )
        1227           {
        1228                    gBsC lientWidth  = documen t.document Element.cl ientWidth;
        1229                    gBsC lientHeigh t = docume nt.documen tElement.c lientHeigh t;
        1230           } 
        1231           el se if( doc ument.body  && ( docu ment.body. clientWidt h || docum ent.body.c lientHeigh t ) ) 
        1232           {
        1233                    gBsC lientWidth  = documen t.body.cli entWidth;
        1234                    gBsC lientHeigh t = docume nt.body.cl ientHeight ;
        1235           }
        1236   }
        1237  
        1238   var gstrPo pupID = 'B SSCPopup';
        1239   var gstrPo pupShadowI D = 'BSSCP opupShadow ';
        1240   var gstrPo pupTopicID  = 'BSSCPo pupTopic';
        1241   var gstrPo pupIFrameI D = 'BSSCP opupIFrame ';
        1242   var gstrPo pupIFrameN ame = 'BSS CPopupIFra meName';
        1243  
        1244   var gstrPo pupSecondW indowName  = 'BSSCPop up';
        1245  
        1246   var gPopup Window = n ull;
        1247   var gnPopu pClickX =  0;
        1248   var gnPopu pClickY =  0;
        1249  
        1250   var gnPopu pScreenCli ckX = 0;
        1251   var gnPopu pScreenCli ckY = 0;
        1252  
        1253   var gbPopu pTimeoutEx pired = fa lse;
        1254  
        1255   function D HTMLPopupS upport()
        1256   {
        1257           if  (((gbBsIE 4) && (!gb BsMac))||g bBsOpera7| | gbBsNS7  || gbSafar i3||gbAIR)  {
        1258                    retu rn true;
        1259           }
        1260           re turn false ;
        1261   }
        1262  
        1263   function B SSCPopup_I sPopup()
        1264   {
        1265           if  (DHTMLPop upSupport( ) && (this .name.inde xOf(gstrPo pupIFrameN ame) != -1 )) {
        1266                    retu rn true;
        1267           }  else if (( gbBsNS4 ||  gbBsIE4 | | gbBsOper a7) && (th is.name.in dexOf(gstr PopupID) ! = -1)) {
        1268                    retu rn true;
        1269           }  else {
        1270                    retu rn false;
        1271           }
        1272   }
        1273  
        1274   // If ther e is a hyp erlink in  a popup wi ndow, disp lay the hy perlink in
        1275   // the ori ginal wind ow. (bsscr ight)
        1276   //commenti ng this as  we are op ening popu p links in  its paren t
        1277   //also in  multiscree n bsscrigh t is not t he the nam e of topic  frame, re levant onl y in webhe lp
        1278   /*if (BSSC Popup_IsPo pup() && ! gbBsIE4 &&  !gbBsOper a7) {
        1279   document.w rite("<bas e target=\ "bsscright \">");
        1280   }*/
        1281  
        1282   // Local f unctions.
        1283   function B sPopup_Cre ateDiv(nIn dex)
        1284   {
        1285           if (!DHTMLPop upSupport( ))
        1286                    retu rn;
        1287           //  DO NOT SE T Width an d height f or the div , otherwiz e it will  make IE4 p opup do no t work whe n view the  topic alo ne.
        1288           va r strPopup Div = "<DI V ID='" +  getPopupID (nIndex) +  "' STYLE= 'position: absolute;  top:-100;  left:0; z- index:600;  visibilit y:hidden;' >";
        1289           st rPopupDiv  += "<DIV I D='" + get PopupShado wID(nIndex ) + "' STY LE=\"posit ion:absolu te;top:0;  left:0;  b ackground- color:#C0C 0C0;\"></D IV>";
        1290           st rPopupDiv  += "<DIV I D='" + get PopupTopic ID(nIndex)  + "' STYL E=\"positi on:absolut e;top:0; l eft:0;  ba ckground-c olor:#FFFF FF;border: 1px #00000 0 outset;\ ">";
        1291           st rPopupDiv  += "<IFRAM E title=\" Popup Wind ow\" ID='"  + getPopu pIFrameID( nIndex) +  "' name='"  + getPopu pIFrameNam e(nIndex)  + "' src =  '" + getP opupURL(nI ndex) + "'  framebord er=0 scrol ling=auto> </IFRAME>" ;
        1292           st rPopupDiv  += "</DIV> </DIV>";
        1293  
        1294           va r objBody  = getEleme ntsByTag(d ocument, " BODY")[0];
        1295           if ( typeof(o bjBody) !=  "object"  )
        1296                    retu rn;
        1297  
        1298           in sertAdjace ntHTML(obj Body, "bef oreEnd", s trPopupDiv );
        1299   }
        1300  
        1301   function h andleLoadN S()
        1302   {
        1303           if  (this.id)
        1304           {
        1305                    var  nIndex = p arseInt(th is.id.subs tring(gstr PopupIFram eID.length ));
        1306                    BSSC Popup_Post Work(nInde x);
        1307           }
        1308   }
        1309  
        1310   function B SSCPopup_P ostWork(nI ndex)
        1311   {
        1312           ge tPopupDivS tyle(nInde x).visibil ity = gBsS tyVisShow;
        1313           ge tPopupIFra meStyle(nI ndex).visi bility =gB sStyVisSho w;
        1314  
        1315           se tClear(nIn dex);
        1316           wi ndow.gbPop upTimeoutE xpired = t rue;
        1317  
        1318           tr y{
        1319                    BSSC Popup_Chan geTargetto Blank(getP opupIFrame (nIndex).d ocument);
        1320                    if ( gbBsNS6)
        1321                             getPop upIFrame(n Index).doc ument.body .addEventL istener("c lick",BSSC PopupClick ed,false);
        1322                    else
        1323                             getPop upIFrame(n Index).doc ument.body .onclick =  BSSCPopup Clicked;
        1324           }c atch(e){}
        1325  
        1326           if  (!gbOrign alOnMouseD own && doc ument.onmo usedown)
        1327                    gbOr ignalOnMou seDown = d ocument.on mousedown;
        1328  
        1329           if  (gbChrome  || gbBsNS 6)
        1330                    docu ment.addEv entListene r("mousedo wn", BSSCP opupParent Clicked,fa lse);
        1331           el se
        1332                    docu ment.onmou sedown = B SSCPopupPa rentClicke d;
        1333   }
        1334  
        1335   function B SSCPopup_T imeout(nIn dex, nToke n)
        1336   {
        1337       if (!I sValidToke n(nToken))  return;
        1338  
        1339           if  (gbBsNS6| |((getPopu pIFrame(nI ndex).docu ment.ready State == " complete")  &&
        1340                    (get PopupIFram e(nIndex). document.b ody != nul l))) {
        1341                    BSSC Popup_Post Work(nInde x);
        1342           }  else {
        1343                    setT imeout("BS SCPopup_Ti meout(" +  nIndex + " ," + nToke n + ")", 1 00);
        1344           }
        1345   }
        1346  
        1347   // VH 08/1 0/00 
        1348   // do not  change tar get to par ent if the  href is u sing javas cript
        1349   function B SSCPopup_C hangeTarge ttoBlank(t agsObject)
        1350   {
        1351           va r collA =  getElement sByTag(tag sObject, " A");
        1352           BS SCPopup_Ch angeTarget toBlank2(c ollA);
        1353  
        1354           va r collIMG  = getEleme ntsByTag(t agsObject, "IMG");
        1355           BS SCPopup_Ch angeTarget toBlank2(c ollIMG);
        1356   }
        1357  
        1358   function B SSCPopup_C hangeTarge ttoBlank2( colls)
        1359   {
        1360           if  (colls !=  null)  {
        1361                    for  (var j = 0 ; j < coll s.length;  j ++ )
        1362                    {
        1363                             var st rtemp = co lls[j].get Attribute( 'href');
        1364                             if (st rtemp)
        1365                             {
        1366                                      strtemp  = strtemp. toLowerCas e();
        1367                                      if (strt emp.indexO f("javascr ipt:") ==  -1)
        1368                                      if (coll s[j].targe t == "") {
        1369                                               if (IsInte rnal(strte mp))
        1370                                                       co lls[j].tar get = "_pa rent";
        1371                                               else
        1372                                                       co lls[j].tar get = "_bl ank";
        1373                                      }
        1374                             }
        1375                    }
        1376           }
        1377   }
        1378  
        1379   function B SPSPopupTo picWinHelp (strURL)
        1380   {
        1381           _B SSCPopup(s trURL);
        1382           re turn;
        1383   }
        1384  
        1385   function D elayBSSCPo pup_AfterL oad(nIndex  ,nToken , cuswidth , cusheight  )
        1386   {
        1387   //before d oing any t hing clear  the inter val functi on
        1388       var in tervalID =  getInterv alID(nInde x);
        1389       if(int ervalID!=- 1)
        1390           cl earInterva l(interval ID);
        1391           
        1392       BSSCPo pup_AfterL oad(nIndex  ,nToken , cuswidth , cusheight  );
        1393   }
        1394  
        1395   function _ BSSCPopup( strURL, wi dth, heigh t)
        1396   {
        1397           va r cuswidth  = 0;
        1398           va r cusheigh t = 0;
        1399           if  ("undefin ed" != typ eof(width)  && "undef ined" != t ypeof(heig ht)) {
        1400                    cusw idth = wid th;
        1401                    cush eight= hei ght;
        1402           }
        1403           
        1404           if  (DHTMLPop upSupport( )) {
        1405                    if(! gbAIR && ! gbInsideCH M)
        1406                             rhPopu pEx.create Popup(strU RL, width,  height);
        1407                    else  
        1408                    {        
        1409                             var nT oken = tak eToken();  // take  t oken first .
        1410                             var nI ndex = _BS SCCreatePo pupDiv(str URL, nToke n, cuswidt h, cusheig ht);
        1411                             window .gbPopupTi meoutExpir ed = false ;
        1412                             var nt Width = gB sClientWid th;
        1413                             var nt Height = g BsClientHe ight;
        1414                             _BSPSG etClientSi ze();
        1415                             if (nt Width != g BsClientWi dth || ntH eight != g BsClientHe ight) {
        1416                                      setDirty ();
        1417                             }
        1418           
        1419                             if (Is Dirty(nInd ex)) 
        1420                             {
        1421                                      if(gbAIR )
        1422                                      {
        1423                                          var  tempappTim er = setIn terval(fun ction(){De layBSSCPop up_AfterLo ad(nIndex  ,nToken ,c uswidth ,c usheight ) }, 400);
        1424                                          setI ntervalID( nIndex,tem pappTimer) ;
        1425                                      }
        1426                                      else
        1427                                      {
        1428                                               if (gbBsMa c) {
        1429                                                       se tTimeout(" BSSCPopup_ AfterLoad( " + nIndex  + "," + n Token + ", " + cuswid th + "," +  cusheight   +")", 40 0);
        1430                                               } else {
        1431                                                       se tTimeout(" BSSCPopup_ AfterLoad( " + nIndex  + "," + n Token + ", " + cuswid th + "," +  cusheight  + ")", 10 0);
        1432                                               }
        1433                                      }
        1434                             }
        1435                             else {
        1436                                      MoveDivA ndShow(nIn dex ,nToke n, cuswidt h, cusheig ht);
        1437                             }
        1438                    }
        1439           }  else {
        1440                    _BSS CPopup2(st rURL, cusw idth, cush eight);
        1441           }
        1442           re turn;
        1443   }
        1444  
        1445   if (gbBsIE 55)
        1446   {
        1447           va r ehlpdhtm _fOldBefur eUnload =  window.onb eforeunloa d;
        1448           va r gnBsUnlo ad=0;
        1449           wi ndow.onbef oreunload  = window_B Unload;
        1450   }
        1451           
        1452   function w indow_BUnl oad()
        1453   {
        1454           gn BsUnload++ ;
        1455           if  (gnBsUnlo ad>1)
        1456                    retu rn;
        1457           fo r (var i =  0; i < ar rayPopupUR L.length;  i ++)
        1458                    remo veThis(doc ument.all( getPopupID (i)));
        1459           ar rayPopupUR L.length =  0;       
        1460           if  (ehlpdhtm _fOldBefur eUnload)
        1461                    ehlp dhtm_fOldB efureUnloa d();
        1462   }
        1463  
        1464   function _ BSSCPopup2 (strURL, w idth, heig ht)
        1465   {
        1466           if  (gbBsOper a6&&gbBsMa c)
        1467           {
        1468                    var  wmTemp = w indow.open (document. location.h ref, gstrP opupSecond WindowName );
        1469                    wmTe mp.close() ;
        1470                    setT imeout("_B SSCPopup3( \""+strURL +"\","+wid th+","+hei ght+");",1 00);
        1471           }
        1472           el se
        1473                    _BSS CPopup3(st rURL, widt h, height) ;
        1474   }
        1475                    
        1476   function _ BSSCPopup3 (strURL, w idth, heig ht)
        1477   {
        1478           if  (window.n ame == gst rPopupSeco ndWindowNa me) {
        1479                    wind ow.locatio n = strURL ;
        1480           }  else {
        1481                    if ( !gbBsMac | | !gbBsNS4 ) {
        1482                             BSSCHi dePopupWin dow();
        1483                    }
        1484                    var  nX = 0;
        1485                    var  nY = 0;
        1486                    var  nHeight =  300;
        1487                    var  nWidth = 4 00;
        1488                    if ( width > 0  && height  > 0) {
        1489                             nHeigh t = height ;
        1490                             nWidth  = width;
        1491                    }
        1492                    _BSP SGetClient Size();
        1493  
        1494                    nX =  window.gn PopupScree nClickX;
        1495                    nY =  window.gn PopupScree nClickY;
        1496  
        1497                    if ( nY + nHeig ht + 40 >  screen.ava ilHeight)  {
        1498                             nY = s creen.avai lHeight -  nHeight -  40;
        1499                    }
        1500                    if ( nX + nWidt h + 40 > s creen.avai lWidth) {
        1501                             nX = s creen.avai lWidth - n Width - 40 ;
        1502                    }
        1503  
        1504                    // L aunch a se parate win dow
        1505                    var  strParam=" titlebar=n o,toolbar= no,status= no,locatio n=no,menub ar=no,resi zable=yes, scrollbars =yes";
        1506                    if ( gbBsNS) {
        1507                             if (gb BsNS6) {
        1508                                      strParam  += ",Heig ht=" + nHe ight + "px ,Width=" +  nWidth+"p x";
        1509                                      strParam  += ",scre enX=" + nX  + ",scree nY=" + nY;
        1510                                      strParam  += ",depe ndent=yes" ;
        1511                             }
        1512                             else {
        1513                                      strParam  += ",Oute rHeight="  + nHeight  + ",OuterW idth=" + n Width;
        1514                                      strParam  += ",scre enX=" + nX  + ",scree nY=" + nY;
        1515                                      strParam  += ",depe ndent=yes" ;
        1516                             }
        1517                    }
        1518                    else  {
        1519                             strPar am += ",he ight=" + n Height + " ,width=" +  nWidth;
        1520                             strPar am += ",le ft=" + nX  + ",top="  + nY;
        1521                    }
        1522                    if ( gbBsSafari )
        1523                    {
        1524                             if (wi ndow.gPopu pWindow)
        1525                                      window.g PopupWindo w.close();              
        1526                             window .gPopupWin dow = wind ow.open(st rURL, "",  strParam);
        1527                             window .gPopupWin dow.name =  gstrPopup SecondWind owName;
        1528                             window .gPopupWin dow.moveTo (nX, nY);
        1529                             window .gPopupWin dow.docume nt.locatio n.reload() ;
        1530                    }        
        1531                    else
        1532                    {
        1533                             var wm Temp=null;
        1534                             if (gb BsKonquero r3)
        1535                             {
        1536                                      if (wind ow.gPopupW indow)
        1537                                               window.gPo pupWindow. close();
        1538                             }
        1539                             if (gb BsOpera&&g bBsMac)
        1540                             {
        1541                                      wmTemp=  window.ope n(document .location. href, "Tem p", strPar am);
        1542                             }
        1543                             window .gPopupWin dow = wind ow.open(st rURL, gstr PopupSecon dWindowNam e, strPara m);
        1544                             if (!g bBsIE)
        1545                                      window.g PopupWindo w.focus();
        1546                                      
        1547                             if (wm Temp)
        1548                                      wmTemp.c lose();
        1549                    }
        1550  
        1551                    if ( gbBsNS4)
        1552                             setEve ntHandle() ;
        1553                    else  if (gbBsI E4 || gbBs Opera7||gb BsKonquero r3)
        1554                             setTim eout("setP opupFocus( );", 100);
        1555           }
        1556           re turn;
        1557   }
        1558  
        1559   function s etEventHan dle()
        1560   {
        1561           wi ndow.gPopu pWindow.ca ptureEvent s(Event.CL ICK | Even t.BLUR);
        1562           wi ndow.gPopu pWindow.on click = No nIEPopup_H andleClick ;
        1563           wi ndow.gPopu pWindow.on blur = Non IEPopup_Ha ndleBlur;
        1564   }
        1565  
        1566   function s etPopupFoc us()
        1567   {
        1568           wi ndow.gPopu pWindow.fo cus();
        1569   }
        1570  
        1571   function N onIEPopup_ HandleBlur (e)
        1572   {
        1573           wi ndow.gPopu pWindow.fo cus();
        1574   }
        1575  
        1576   function N onIEPopup_ HandleClic k(e)
        1577   {
        1578           //  Because n avigator w ill give t he event t o the hand ler before  the hyper link, let' s
        1579           //  first rou te the eve nt to see  if we are  clicking o n a Popup  menu in a  popup.
        1580           do cument.rou teEvent(e) ;
        1581  
        1582           //  If a popu p menu is  active the n don't do  anything  with the c lick
        1583           if  (window.g PopupWindo w.gbInPopu pMenu) {
        1584                    wind ow.gPopupW indow.capt ureEvents( Event.CLIC K);
        1585                    wind ow.gPopupW indow.oncl ick = NonI EPopup_Han dleClick;
        1586                    retu rn false;
        1587           }
        1588  
        1589           //  Close the  popup win dow
        1590           if (e.target. href)
        1591           {
        1592                    if(e .target.hr ef.indexOf ("javascri pt:")==-1)  
        1593                    {
        1594                             if (e. target.tar get=="")
        1595                                      window.l ocation.hr ef = e.tar get.href;
        1596                             else
        1597                                      window.o pen(e.targ et.href, e .target.ta rget);
        1598                             this.c lose();
        1599                    }
        1600           } 
        1601           el se
        1602                    this .close();
        1603           re turn false ;
        1604   }
        1605  
        1606   function B SSCPopup_A fterLoad(n Index, nTo ken, cuswi dth, cushe ight)
        1607   {
        1608           if  (!window. getPopupIF rame(nInde x).documen t) {
        1609                    _BSS CPopup2(ge tPopupURL( nIndex), c uswidth, c usheight);
        1610                    retu rn;
        1611           }
        1612           
        1613       if (!I sValidToke n(nToken))  return;
        1614  
        1615           if  (gbSafari 3||gbAIR)
        1616           {
        1617                             setAbs PopupURL(n Index, win dow.getPop upIFrame(n Index).doc ument.loca tion.href) ; // chang e URL to a bs url.
        1618                    BSSC Popup_Resi zeAfterLoa d(nIndex,  nToken, cu swidth, cu sheight);
        1619                    retu rn;
        1620           }
        1621           
        1622           if  (gbBsNS6)
        1623           {
        1624                    setA bsPopupURL (nIndex, w indow.getP opupIFrame (nIndex).d ocument.lo cation.hre f); // cha nge URL to  abs url.
        1625                    setT imeout("BS SCPopup_Re sizeAfterL oad(" + nI ndex + ","  + nToken  + "," + cu swidth + " ," + cushe ight + ")" , 200);
        1626                    retu rn;
        1627           }
        1628           
        1629           if  ((window. getPopupIF rame(nInde x).documen t.readySta te == "com plete") &&
        1630                    (win dow.getPop upIFrame(n Index).doc ument.body  != null))  {
        1631                             if (wi ndow.getPo pupIFrame( nIndex).do cument.loc ation.href .indexOf(" about:blan k") != -1)  { // add  this check . IE will  use about: blank" as  the defaul t vaule fo r Iframe.
        1632                                      window.g etPopupIFr ame(nIndex ).document .location  = getPopup URL(nIndex );
        1633                                      setTimeo ut("BSSCPo pup_AfterL oad(" + nI ndex + ","  + nToken  + "," + cu swidth + " ," + cushe ight + ")" , 200);
        1634                             }
        1635                             else
        1636                                      {
        1637                                               setAbsPopu pURL(nInde x, window. getPopupIF rame(nInde x).documen t.location .href); //  change UR L to abs u rl.
        1638                                               BSSCPopup_ ResizeAfte rLoad(nInd ex, nToken , cuswidth , cusheigh t);
        1639                                      }
        1640           }  else {
        1641                    setT imeout("BS SCPopup_Af terLoad("  + nIndex +  "," + nTo ken + ","  + cuswidth  + "," + c usheight +  ")", 200) ;
        1642           }
        1643   }
        1644  
        1645   function B SSCPopup_R esizeAfter Load(nInde x, nToken,  cuswidth,  cusheight )
        1646   {
        1647           if  (window.g bPopupTime outExpired ) return;
        1648  
        1649       if (!I sValidToke n(nToken))  return;
        1650  
        1651           ge tPopupDivS tyle(nInde x).visibil ity = gBsS tyVisHide;
        1652           ge tPopupIFra meStyle(nI ndex).visi bility = g BsStyVisHi de;
        1653           if (gbBsIE)
        1654           {
        1655                //fix fo r Popup Bl ank issue
        1656                getPopup IFrameStyl e(nIndex). visibility  = gBsStyV isShow;
        1657                    getP opupDivSty le(nIndex) .visibilit y = gBsSty VisShow;
        1658           }
        1659  
        1660           //  Determine  the width  and heigh t for the  window
        1661           _B SPSGetClie ntSize();
        1662  
        1663           va r size = n ew BSSCSiz e(0, 0);
        1664  
        1665           if  (cuswidth  <= 0 || c usheight < = 0)
        1666                                      BSSCGetC ontentSize (window.ge tPopupIFra me(nIndex) , size);
        1667                             else {
        1668                    size .x = cuswi dth;
        1669                    size .y = cushe ight;
        1670           }
        1671  
        1672           //  Determine  the width  and heigh t for the  window
        1673           va r nWidth =  size.x;
        1674           va r nHeight  = size.y;
        1675  
        1676           //  for small  popup siz e, we shou ld allow a ny size.
        1677           //  The popup  size shou ld be ok i f bigger t han 0
        1678           if  (nWidth <  0 || nHei ght < 0) r eturn;  //  there mus t be somet hing terri bly wrong.                
        1679           
        1680           // make the w idth and h eight same  for all t he browser s now
        1681           nW idth = nWi dth + 22;
        1682           nH eight = nH eight + 10 ;
        1683           
        1684           ge tPopupDivS tyle(nInde x).width =  nWidth+ " px" ;
        1685           ge tPopupDivS tyle(nInde x).height  = nHeight+  "px" ;
        1686           
        1687           ge tPopupShad owStyle(nI ndex).widt h = nWidth  + "px" ;
        1688           ge tPopupShad owStyle(nI ndex).heig ht = nHeig ht + "px"  ;
        1689           
        1690           
        1691           ge tPopupTopi cStyle(nIn dex).width  = nWidth  + "px" ;
        1692           ge tPopupTopi cStyle(nIn dex).heigh t = nHeigh t + "px" ;
        1693           
        1694           ge tPopupIFra meStyle(nI ndex).widt h = nWidth  + "px" ;
        1695           ge tPopupIFra meStyle(nI ndex).heig ht = nHeig ht + "px"  ;
        1696                    
        1697           if  (gbBsIE55  || gbBsNS 6 || gbSaf ari3||gbAI R)
        1698           {
        1699                    getP opupIFrame Style(nInd ex).top =  0;
        1700                    getP opupIFrame Style(nInd ex).left =  0;
        1701           }
        1702           
        1703           va r strURL =  getPopupU RL(nIndex) ;
        1704           if  (strURL.i ndexOf("#" ) != -1&&g bBsNS6)
        1705                    getP opupIFrame (nIndex).l ocation.re load();
        1706           el se if (str URL.indexO f("#") !=  -1||gbBsNS 6)
        1707                    getP opupIFrame (nIndex).l ocation.hr ef = strUR L;  // rel oad again,  this will  fix the b ookmark mi sunderstan d in IE5.
        1708                    
        1709           Mo veDivAndSh ow(nIndex,  nToken, c uswidth, c usheight);
        1710   }
        1711  
        1712   function g etScrollLe ft()
        1713   {
        1714           if ( typeof(  window.pag eXOffset)  == 'number ' ) 
        1715                    retu rn window. pageXOffse t ;
        1716           el se if( doc ument.body  && ( docu ment.body. scrollLeft  || docume nt.body.sc rollTop ) 
        1717                    retu rn documen t.body.scr ollLeft ;
        1718           el se if( doc ument.docu mentElemen t && docum ent.docume ntElement. scrollLeft   ) 
        1719                    retu rn documen t.document Element.sc rollLeft;
        1720           el se
        1721                    retu rn 0 ;       
        1722   }
        1723  
        1724   function g etScrollTo p()
        1725   {
        1726           if ( typeof(  window.pag eYOffset)  == 'number ' ) 
        1727                    retu rn window. pageYOffse t ;
        1728           el se if( doc ument.body  && docume nt.body.sc rollTop ) 
        1729                    retu rn documen t.body.scr ollTop ;
        1730           el se if( doc ument.docu mentElemen t && docum ent.docume ntElement. scrollTop   ) 
        1731                    retu rn documen t.document Element.sc rollTop;
        1732           el se
        1733                    retu rn 0 ;       
        1734   }
        1735  
        1736   function g etScrollLe ftElement( el) 
        1737   {
        1738       var x  = 0;
        1739       while  (el && typ eof (el.sc rollLeft)  == 'number ') 
        1740       {
        1741           if  (el == do cument.bod y) 
        1742           {
        1743                var top  = document .body.scro llLeft ||  document.d ocumentEle ment.scrol lLeft;
        1744                x += top ;
        1745           }
        1746           el se
        1747                x += el. scrollLeft ;
        1748           el  = el.offs etParent;
        1749       }
        1750       return  x;
        1751   }
        1752  
        1753   function g etScrollTo pElement(e l) 
        1754   {
        1755       var x  = 0;
        1756       while  (el && typ eof (el.sc rollTop) = = 'number'
        1757       {
        1758           if  (el == do cument.bod y) 
        1759           {
        1760                var top  = document .body.scro llTop || d ocument.do cumentElem ent.scroll Top;
        1761                x += top ;
        1762           }
        1763           el se
        1764                x += el. scrollTop;
        1765           el  = el.offs etParent;
        1766       }
        1767       return  x;
        1768   }
        1769  
        1770  
        1771   function M oveDivAndS how(nIndex , nToken,  cuswidth,  cusheight)
        1772   {
        1773           if  (window.g etPopupIFr ame(nIndex ).document .location. href != ge tAbsPopupU RL(nIndex) ) { // if  redirect,  reload aga in.
        1774                             window .getPopupI Frame(nInd ex).docume nt.locatio n = getPop upURL(nInd ex);
        1775                             if(gbA IR)
        1776                             {
        1777                                      BSSCPopu p_AfterLoa d(nIndex , nToken ,cu swidth ,cu sheight );
        1778                             }
        1779                             else
        1780                                      setTimeo ut("BSSCPo pup_AfterL oad(" + nI ndex + ","  + nToken  + "," + cu swidth + " ," + cushe ight + ")" , 200);
        1781                             return ;
        1782           }
        1783  
        1784           //  Determine  the posit ion of the  window
        1785           va r nClickX  = window.g nPopupClic kX;
        1786           va r nClickY  = window.g nPopupClic kY;
        1787           va r nTop = 0 ;
        1788           va r nLeft =  0;
        1789           
        1790           va r nWidth =  parseInt( getPopupDi vStyle(nIn dex).width );
        1791           va r nHeight  = parseInt (getPopupD ivStyle(nI ndex).heig ht);
        1792           
        1793           if  (nClickY  + nHeight  + 20 < gBs ClientHeig ht + getSc rollTop())  {
        1794                    nTop  = nClickY  + 10;
        1795           }  else {
        1796                    nTop  = (getScr ollTop() +  gBsClient Height) -  nHeight -  20;
        1797           }
        1798           if  (nClickX  + nWidth <  gBsClient Width + ge tScrollLef t()) {
        1799                    nLef t = nClick X;
        1800           }  else {
        1801                    nLef t = (getSc rollLeft()  + gBsClie ntWidth) -  nWidth -  20;
        1802           }
        1803  
        1804           if (!gbBsIE55 )
        1805           {
        1806                    if ( nTop < get ScrollTop( )) nTop  =  getScroll Top() + nT op;
        1807                    if ( nLeft< get ScrollLeft ())  nLeft  = getScro llLeft() +  nLeft;
        1808                    
        1809                    if(n Top+nHeigh t>gBsClien tHeight +  getScrollT op())
        1810                    {
        1811                             nTop =  (getScrol lTop() + g BsClientHe ight) - nH eight - 20 ;
        1812                    }
        1813           }
        1814       
        1815           if  (isNaN(nL eft))
        1816                    getP opupDivSty le(nIndex) .left = nC lickX + "p x"; 
        1817           el se
        1818                    getP opupDivSty le(nIndex) .left = nL eft+ "px";     
        1819           
        1820           if  (isNaN(nT op))
        1821                    getP opupDivSty le(nIndex) .top = nCl ickY  + "p x";
        1822           el se
        1823                    getP opupDivSty le(nIndex) .top = nTo p + "px";
        1824  
        1825           //  Set the l ocation of  the backg round bloc ks
        1826           ge tPopupShad owStyle(nI ndex).left  = 6 + "px ";
        1827           ge tPopupShad owStyle(nI ndex).top  = 6 + "px" ;
        1828           if  (gbBsIE55 )
        1829           {
        1830                    getP opupShadow Style(nInd ex).left =  4;
        1831                    getP opupShadow Style(nInd ex).top =  4;
        1832           }
        1833           
        1834           if  (gbBsMac& &gbBsIE4)  {
        1835                    // T otal hack  on the iMa c to get t he IFrame  to positio n properly
        1836                    getP opupIFrame Style(nInd ex).pixelL eft = 100;
        1837                    getP opupIFrame Style(nInd ex).pixelL eft = 0;
        1838                    // E xplicitly  call BSSCO nLoad beca use the Ma c doesn't  seem to do  it
        1839                    getP opupIFrame (nIndex).w indow.BSSC OnLoad();
        1840           }
        1841  
        1842           if (gbChrome)
        1843           {
        1844                    BSSC Popup_Post Work(nInde x);     
        1845           }
        1846           el se if (gbB sNS6&&IsDi rty(nIndex ))
        1847                    getE lement(get PopupIFram eID(nIndex )).addEven tListener( "load", ha ndleLoadNS , false);
        1848           el se
        1849                    BSSC Popup_Time out(nIndex  , nToken  );
        1850           re turn;
        1851   }
        1852  
        1853   function         BSSC Size(x, y)
        1854   {
        1855           th is.x = x;
        1856           th is.y = y;
        1857   }
        1858  
        1859   function B SSCGetCont entSize(th isWindow,  size)
        1860   {
        1861           if  (!gbBsIE4  && !gbBsO pera7 && ! gbBsNS4 &&  !gbSafari 3 && !gbAI R)
        1862                    retu rn;
        1863  
        1864  
        1865           if  ((gbBsMac &&gbBsIE4) ||gbBsOper a7) {
        1866                    size .x = 320;
        1867                    size .y = 180;
        1868                    retu rn;
        1869           }
        1870  
        1871           //  Resize th e width un til it is  wide enoug h to handl e the cont ent
        1872           //  The trick  is to sta rt wide an d determin e when the  scrollHei ght change s
        1873           //  because t hen we kno w a scroll bar is nec essary. We  can then  go back
        1874           //  to the ne xt widest  size (for  no scrollb ar)
        1875  
        1876           va r ClientRa te = gBsCl ientHeight  / gBsClie ntWidth;
        1877  
        1878           
        1879           va r GoldenSi ze = new B SSCSize(0, 0);
        1880           Go ldenSize.x  = gBsClie ntWidth *  getBMaxXOf Parent();
        1881           Go ldenSize.y  = gBsClie ntHeight * getBMaxYOf Parent() ;
        1882  
        1883           if  (ClientRa te > gBRat eH_W) {
        1884                    Gold enSize.y =  GoldenSiz e.x * gBRa teH_W;
        1885           }
        1886           el se {
        1887                    Gold enSize.x =  GoldenSiz e.y / gBRa teH_W;
        1888           }
        1889  
        1890           //  Try to us ing parent  specified  max x.
        1891           va r x = 0;
        1892           va r maxgoldx  = GoldenS ize.x;
        1893           va r maxx = g BsClientWi dth * getB MaxXOfPare nt();
        1894           
        1895           //  This doub le resize  causes the  document  to re-rend er (and we  need it t o)
        1896           if  (!gbBsIE5  && !gbChr ome && !gb AIR)
        1897                    this Window.mov eTo(10000, 10000); //  this is u sed to fix  the flash  on IE4.
        1898           if (!gbAIR)
        1899           {
        1900           th isWindow.r esizeTo(1,  1);
        1901           th isWindow.r esizeTo(ma xgoldx, ge tScrollHei ght(thisWi ndow) + ge tBscrollHe ight());
        1902           }
        1903                    
        1904           va r miny = g etScrollHe ight(thisW indow) + g etBscrollH eight();
        1905           
        1906           if  (miny > G oldenSize. y) // the  popup does  not fix i n the pare nt wanted  golden are a. so try  to expand  itself as  large as i t can
        1907           {
        1908                    if(g bBsIE55)
        1909                    {
        1910                             thisWi ndow.resiz eTo(maxx ,  getScroll Height(thi sWindow) +  getBscrol lHeight()) ;
        1911                    }
        1912                    
        1913                    miny  =  getScr ollHeight( thisWindow ) + getBsc rollHeight ();
        1914                    maxy  = gBsClie ntHeight *  getBMaxYO fParent();
        1915                    
        1916                    if ( miny > max y) { // th e popup mu st have a  scroll, OK  let it be .
        1917                             miny =  maxy;
        1918                             size.x  = maxx;
        1919                             size.y  = maxy;
        1920                             thisWi ndow.docum ent.body.s croll = 'y es'; // At  this time  we do wan t to show  scroll any  more. so  it will lo oks better  a little.
        1921                    }
        1922                    else  { // popu p still ca n fit in t he parent  area by so meway. now  we choose  the same  h/w rate a s parent.
        1923                             size.y  = miny;
        1924                             
        1925                             //  do wnsize fro m maxx , n ow I try t o using bi nary divid e.
        1926                             x = ma xx;
        1927                             deltax  = -maxx/2 ;
        1928                             //j =  0;
        1929                             while  (true) {
        1930                                      x = x +  deltax;
        1931                                      if(!gbAI R)
        1932                                      thisWind ow.resizeT o(x, miny) ;
        1933                                      diffy =  getScrollH eight(this Window) +  getBscroll Height() -  x * Clien tRate;
        1934                                      if (diff y >  gBper mitYDelta  ) // it is  higher th an wanted,  so x need  to be wid e a little  bitter
        1935                                               deltax = M ath.abs(de ltax) /2;
        1936                                      else if  (diffy <   -gBpermitY Delta) //  it is shor ter than w anted, so  x need to  be narrow  a little b itter
        1937                                               deltax = - Math.abs(d eltax) /2;
        1938                                      else 
        1939                                               // the y i s close en ough to wa nted.
        1940                                               break;
        1941                                      if (Math .abs(delta x) < gBper mitXDelta)  // the ne xt change  is too sli ght and it  can be ig nore.
        1942                                               break;
        1943                             }
        1944                             size.x  = getScro llWidth(th isWindow);  //+ gBscr ollWidth;
        1945                             size.y  = getScro llHeight(t hisWindow) ;// + gBsc rollHeight ;       
        1946                             thisWi ndow.docum ent.body.s croll = 'n o';
        1947                    }
        1948           }
        1949           el se {
        1950                    if ( getScrollW idth(thisW indow) > m axgoldx) {
        1951                             size.x  = maxx; 
        1952                             size.y  = miny;  
        1953                             thisWi ndow.docum ent.body.s croll = 'y es';
        1954                    }
        1955                    else  {
        1956                             //  do wnsize fro m maxgoldx  , now I t ry to usin g binary d ivide.                    
        1957                             x = ma xgoldx;
        1958                             deltax  = -maxgol dx/2;
        1959                             while  (true) {
        1960                                      x = x +  deltax;
        1961                                      if(!gbAI R)
        1962                                      thisWind ow.resizeT o(x, miny) ;
        1963                                      diffy =  getScrollH eight(this Window) +  getBscroll Height() -  x * getBR ateH_W();
        1964                                      if (diff y >  gBper mitYDelta  ) // it is  higher th an wanted,  so x need  to be wid e a little  bitter
        1965                                               deltax = M ath.abs(de ltax) /2;
        1966                                      else if  (diffy <   -gBpermitY Delta) //  it is shor ter than w anted, so  x need to  be narrow  a little b itter
        1967                                               deltax = - Math.abs(d eltax) /2;
        1968                                      else 
        1969                                               // the y i s close en ough to wa nted.
        1970                                               break;
        1971                                      if (Math .abs(delta x) < gBper mitXDelta)  // the ne xt change  is too sli ght and it  can be ig nore.
        1972                                               break;
        1973                             }
        1974                             size.x  = getScro llWidth(th isWindow);
        1975                             size.y  = getScro llHeight(t hisWindow)  ;
        1976                             thisWi ndow.docum ent.body.s croll = 'n o'; // At  this time  we do not  want to sh ow scroll  any more.  so it will  looks bet ter a litt le.
        1977  
        1978                    }
        1979           }
        1980           if  (gbBsNS6)
        1981                    size .y = size. y + 20 ;  
        1982           
        1983           if (!gbAIR)
        1984           th isWindow.r esizeTo(si ze.x, size .y);
        1985           re turn;
        1986   }
        1987  
        1988   function g etScrollWi dth(thisWi ndow)
        1989   {
        1990      var w =   thisWind ow.documen t.body.scr ollWidth ?  thisWindo w.document .body.scro llWidth :  thisWindow .window.pa geXOffset   ; 
        1991      return  w ? w : 0;
        1992  
        1993  
        1994   function g etScrollHe ight(thisW indow)
        1995   {
        1996      var h =  thisWindo w.document .body.scro llHeight ?  thisWindo w.document .body.scro llHeight :  thisWindo w.window.p ageYOffset   ; 
        1997      return  h ? h : 0;
        1998   }
        1999  
        2000  
        2001   function B SSCPopupPa rentClicke d()
        2002   {
        2003           if  (!window. gbPopupTim eoutExpire d) {
        2004                    retu rn false;
        2005           }
        2006           
        2007           do cument.onm ousedown =  gbOrignal OnMouseDow n;
        2008  
        2009           //  Simply hi de the pop up
        2010           hi deAll();
        2011  
        2012           wi ndow.gbPop upTimeoutE xpired = f alse;
        2013  
        2014           re turn true;
        2015   }
        2016  
        2017   function i sInsideHyp erLink(obj )
        2018   {
        2019           if  (obj&&obj !=getParen tNode(obj) )
        2020           {
        2021                    if ( obj.tagNam e=="A"||ob j.tagName= ="IMG" ||  obj.tagNam e=="VIDEO" )
        2022                             return  true;
        2023                    else
        2024                             return  isInsideH yperLink(g etParentNo de(obj));
        2025           }
        2026           el se
        2027                    retu rn false;
        2028   }
        2029  
        2030   function B SSCPopupCl icked(e)
        2031   {
        2032           if  (!window. gbPopupTim eoutExpire d) {
        2033                    retu rn false;
        2034           }
        2035  
        2036           va r popupIFr ame = getC urrentPopu pIFrame();
        2037           if  (popupIFr ame == nul l) {
        2038                    retu rn true;
        2039           }
        2040  
        2041           if  (gbBsIE4  && (!((pop upIFrame.w indow.even t != null)  &&
        2042                    (pop upIFrame.w indow.even t.srcEleme nt != null ) &&
        2043                    isIn sideHyperL ink(popupI Frame.wind ow.event.s rcElement) ))) {
        2044                    docu ment.onmou sedown = g bOrignalOn MouseDown;
        2045                    
        2046                    // S imply hide  the popup
        2047                    hide All();
        2048                    wind ow.gbPopup TimeoutExp ired = fal se;
        2049                    retu rn true;
        2050           }
        2051           el se if (!gb AIR && (gb BsNS6 || g bChrome) & & (!((e !=  null) &&
        2052                             (e.tar get!= null ) && isIns ideHyperLi nk(e.targe t))))
        2053           {
        2054                document .removeEve ntListener ("mousedow n", BSSCPo pupParentC licked,fal se);
        2055                if(gbOri gnalOnMous eDown)
        2056                         document.a ddEventLis tener("mou sedown", g bOrignalOn MouseDown, false);
        2057                    // S imply hide  the popup
        2058                    hide All();
        2059                    wind ow.gbPopup TimeoutExp ired = fal se;
        2060                    retu rn true;             
        2061           }
        2062   }
        2063  
        2064   //trace th e mouse ov er's posit ion for ho tspot
        2065   function   BSPSPopupO nMouseOver (event)
        2066   {
        2067           rh PopupEx.se tClickPosi tion(event .clientX,  event.clie ntY);        
        2068           if  (gbBsIE4  || gbBsOpe ra7||gbBsK onqueror3)  {
        2069                    wind ow.gnPopup ClickX = e vent.clien tX + getSc rollLeft() ;
        2070                    wind ow.gnPopup ClickY = e vent.clien tY + getSc rollTop();
        2071                    wind ow.gnPopup ScreenClic kX = event .screenX;
        2072                    wind ow.gnPopup ScreenClic kY = event .screenY;
        2073           }  else if (g bBsSafari)  {
        2074                    wind ow.gnPopup ClickX = e vent.clien tX + getSc rollLeft() ;
        2075                    wind ow.gnPopup ClickY = e vent.clien tY + getSc rollTop();
        2076                    wind ow.gnPopup ScreenClic kX = event .screenX +  window.sc reenX;
        2077                    wind ow.gnPopup ScreenClic kY = event .screenY +  window.sc reenY;
        2078           }  else if (g bBsNS4) {
        2079                    wind ow.gnPopup ClickX = e vent.pageX  - window. pageXOffse t;
        2080                    wind ow.gnPopup ClickY = e vent.pageY  - window. pageYOffse t;
        2081                    wind ow.gnPopup ScreenClic kX = event .screenX -  window.pa geXOffset;
        2082                    wind ow.gnPopup ScreenClic kY = event .screenY -  window.pa geYOffset;
        2083           }
        2084   }
        2085  
        2086   function B SSCHidePop upWindow()
        2087   {
        2088           if  (window.g PopupWindo w != null)  {
        2089                    if ( gbBsNS4) {
        2090                             if ((t ypeof wind ow.gPopupW indow != " undefined" ) && (!win dow.gPopup Window.clo sed)) {
        2091                                      window.g PopupWindo w.close();
        2092                                      window.g PopupWindo w = null;
        2093                             }
        2094                    }
        2095           }
        2096           re turn;
        2097   }
        2098  
        2099   // Add the  PopupOnCl ick to the  onclick a rray.
        2100   if (typeof (BsscRegis terOnClick ) != "unde fined")
        2101   {
        2102           Bs scRegister OnClick(Bs PopupOnCli ck);
        2103   }
        2104   //End to s upport pre vious popu p function s
        2105  
        2106   /// Sectio n End  - P opup (Java Script 1.0 )
        2107  
        2108   /// Sectio n Begin -  Embedded S tub (JavaS cript 1.0)
        2109  
        2110   function B SSCCreateP opupDiv()
        2111   {
        2112           re turn;
        2113   }
        2114  
        2115   function W ritePopupM enuLayer()
        2116   {
        2117           if  (BsscHasE xtJs()) {_ WritePopup MenuLayer( );}
        2118   }
        2119  
        2120   function B SSCPopup(s trURL, wid th, height )
        2121   {
        2122           va r re = new  RegExp("' ", 'g');
        2123           st rURL = str URL.replac e(re, "%27 ");
        2124  
        2125           if  (BsscHasE xtJs())      {
        2126                    _BSS CPopup(str URL, width , height);
        2127           }e lse{
        2128                    //Cr eate a tem porary win dow first  to ensure  the real p opup comes  up on top
        2129                    var  wndTemp =  null;
        2130                    if ( !gbBsNS3)  {
        2131                             wndTem p = window .open("",  "temp", "t itlebar=no ,toolbar=n o,status=n o,location =no,menuba r=no,resiz able=yes,s crollbars= yes,height =3,width=4 ");
        2132                    }
        2133                    // C reate the  real popup  window
        2134                    var  wndPopup =  window.op en(strURL,  "BSSCPopu p", "title bar=no,too lbar=no,st atus=no,lo cation=no, menubar=no ,resizable =yes,scrol lbars=yes, height=300 ,width=400 ");
        2135                    // C lose the t emporary
        2136                    if ( !gbBsNS3)  {
        2137                             wndTem p.close();
        2138                    } el se {
        2139                             wndPop up.focus() ;
        2140                    }
        2141           }
        2142   }
        2143  
        2144   var gbWndT emp = null , gbWndPop upLinks =  null;
        2145   var gbstrP araTotal =  "";
        2146  
        2147   function P opupMenu_I nvoke()
        2148   {
        2149           if  (typeof(w fRelatedTo pic) == 'f unction' & & typeof(I sFlashSupp orted) ==  'function' )
        2150           {
        2151                    if ( Number(gsS kinVersion ) > 2 && I sFlashSupp orted())
        2152                    {
        2153                             return  wfRelated Topic(Popu pMenu_Invo ke.argumen ts);
        2154                    }
        2155           }
        2156           if  (BsscHasE xtJs()) {
        2157                    retu rn _PopupM enu_Invoke (PopupMenu _Invoke.ar guments);
        2158           }
        2159           if  (gbBsNS3B efore || g bBsIE3Befo re )    {
        2160                    var  argLen       = PopupM enu_Invoke .arguments .length;
        2161                    if ( argLen < 5 ) {
        2162                             window .document. location.h ref = Popu pMenu_Invo ke.argumen ts[3];
        2163                             return  false;
        2164                    }
        2165                    gbWn dTemp = nu ll;
        2166                    gbWn dPopupLink s = null;
        2167                    gbst rParaTotal  = "";
        2168                    for  (var i = 0 ; i < (arg Len - 2) /  2; i++) {
        2169                             var st rParaLine  = "";
        2170                             if (gb BsNS2){
        2171                                      strParaL ine += "<a  href=\"";
        2172                                      strParaL ine += Pop upMenu_Inv oke.argume nts[2 * i  + 3];
        2173                                      strParaL ine += "\" >"
        2174                                      strParaL ine += Pop upMenu_Inv oke.argume nts[2 * i  + 2];
        2175                                      strParaL ine += "</ a>";
        2176                             } else  {
        2177                                      strParaL ine += "<a  href=\"ja vascript:" ;
        2178                                      strParaL ine += "go toUrl(\'";
        2179                                      strParaL ine += Pop upMenu_Inv oke.argume nts[2 * i  + 3];
        2180                                      strParaL ine += "\' );\"";
        2181                                      if (Popu pMenu_Invo ke.argumen ts[1] != ' ') {
        2182                                               strParaLin e += " TAR GET='" + P opupMenu_I nvoke.argu ments[1] +  "'";
        2183                                      }
        2184                                      strParaL ine += ">" ;
        2185                                      strParaL ine += Pop upMenu_Inv oke.argume nts[2 * i  + 2];
        2186                                      strParaL ine += "</ a>";
        2187                             }
        2188                             strPar aLine += " <br>";
        2189                             gbstrP araTotal + = strParaL ine;
        2190                    }
        2191                    var  nHeight =  argLen * 1 5;
        2192                    var  nWidth = 4 00;
        2193                    var  strParam =  "titlebar =no,toolba r=no,statu s=no,locat ion=no,men ubar=no,re sizable=ye s,scrollba rs=auto";
        2194                    strP aram += ", height=" +  nHeight +  ",width=2 00,resizab le";
        2195                    
        2196                    //Cr eate a tem porary win dow first  to ensure  the real p opup comes  up on top
        2197                    //va r wndTemp  = null;
        2198                    if ( !gbBsNS3)  {
        2199                             gbWndT emp = wind ow.open("" , "temp",  "titlebar= no,toolbar =no,status =no,locati on=no,menu bar=no,res izable=yes ,scrollbar s=yes,heig ht=3,width =4");
        2200                    } 
        2201                    gbWn dPopupLink s = window .open("",  "popuplink s", strPar am);
        2202  
        2203                    setT imeout("Wa it_PopupMe nuReady()" , 100);
        2204           }
        2205           re turn true;
        2206   }
        2207  
        2208   function W ait_PopupM enuReady()  
        2209   {
        2210           if  (gbWndPop upLinks !=  null && " object" ==  typeof(gb WndPopupLi nks.docume nt)) {
        2211                    Popu pMenu_Invo keReady();
        2212           }
        2213           el se 
        2214                    setT imeout("Wa it_PopupMe nuReady()" , 100);
        2215   }
        2216  
        2217   function P opupMenu_I nvokeReady ()
        2218   {
        2219           if  (gbWndPop upLinks !=  null) {
        2220                    gbWn dPopupLink s.document .open("tex t/html");
        2221                    gbWn dPopupLink s.document .write("<h tml><head> ");
        2222                    if ( gbBsNS2) {
        2223                             gbWndP opupLinks. document.w rite("<bas e href=\""  + locatio n +"\">");
        2224                    } el se {
        2225                             //YJ:  IE301,302  and NS3.x  works fine
        2226                             gbWndP opupLinks. document.w rite("<");
        2227                             gbWndP opupLinks. document.w rite("scri pt>");
        2228                             gbWndP opupLinks. document.w rite("func tion gotoU rl(aUrl) { opener.win dow.locati on=aUrl; c lose();}") ;
        2229                             gbWndP opupLinks. document.w rite("<");
        2230                             gbWndP opupLinks. document.w rite("/scr ipt>");
        2231                    }
        2232                    gbWn dPopupLink s.document .write("<" );
        2233                    gbWn dPopupLink s.document .write("/h ead>");
        2234                    gbWn dPopupLink s.document .write("<b ody onBlur =\'self.fo cus();\'>" );
        2235                    gbWn dPopupLink s.document .write(gbs trParaTota l);
        2236                    gbWn dPopupLink s.document .write("</ body></htm l>");
        2237                    gbWn dPopupLink s.document .close();
        2238  
        2239                    // C lose the t emporary
        2240                    if ( !gbBsNS3 & & gbWndTem p != null)  {
        2241                             gbWndT emp.close( );
        2242                    }els e {
        2243                             gbWndP opupLinks. focus();
        2244                    }
        2245  
        2246                    retu rn true;
        2247           }
        2248           re turn false ;
        2249   }
        2250  
        2251   /// Sectio n End - Em bedded Stu b (JavaScr ipt 1.0)
        2252  
        2253   //// Segme nt End --  (JavaScrip t 1.0)
        2254  
        2255   //// Segme nt Begin - - (JavaScr ipt 1.2)
        2256   /// Sectio n Begin  -  DHTM (Jav aScript 1. 2)
        2257  
        2258   //Begin to  support e xtended an d dropdown  text effe cts.
        2259   function I sParagraph (el)
        2260   {
        2261           re turn( el.t agName ==  "P" || el. tagName.in dexOf("H")  == 0 ) ?  true : fal se;
        2262   }
        2263  
        2264   //Begin to  support e xtended an d dropdown  text effe cts.
        2265   function k adovIsPara graph(el)
        2266   {
        2267           re turn IsPar agraph(el) ;
        2268   }
        2269  
        2270  
        2271   function I nitEachChi ld(el)
        2272   {       
        2273           fo r(var i=0;  i<getChil dNodes(el) .length; i ++)
        2274           {
        2275                    var  child = ge tChildNode s(el)[i];
        2276                    if(  child.tagN ame == "SC RIPT" || c hild.tagNa me == "!"  )
        2277                             contin ue;
        2278  
        2279                    if(  child.id ! = "" )
        2280                    {
        2281                             // to  wipe out t he onload  effects
        2282                             if (gb BsIE4&&!gb BsMac)
        2283                             {
        2284                                      var onLo adEffect =  getAttrib ute(child. style, "x- on-pageloa d" );
        2285                                      if( (onL oadEffect  != null) & & (onLoadE ffect > "" ) )
        2286                                               setAttribu te(child.s tyle, "x-o n-pageload ", "" );
        2287                             }
        2288                             
        2289                             var hr ef = getAt tribute(ch ild,"href" );
        2290                             if( hr ef != null  && href >  "" && hre f.indexOf(  "BSSCPopu p" ) >= 0  )
        2291                                      FilePopu pInit(chil d.id); //  Init for P opup
        2292                             else i f( child.c lassName = = "dropspo t" || chil d.classNam e == "expa ndspot" ||  
        2293                                                child.cla ssName ==  "glossterm " )
        2294                                      TextPopu pInit(chil d.id);// I nit for Ex panding/Gl ossary or  DropDown t ext
        2295                             else i f( child.c lassName = = "trigger ")
        2296                                      InitTrig ger(child. id);// Ini t for Trig ger
        2297                             else
        2298                             {
        2299                                      InitEffe cts(child. id);// Ini t for DHTM L effects
        2300                                      CEngine. SetOneTarg etInitialS tate( chil d.id );
        2301                             }
        2302                    }
        2303                    
        2304                    if(  (child.tag Name == "I MG") && (g etAttribut e(child,"d ynsrc") >  "") )
        2305                             child. start = "m ouseover"; // to star t a AVI fi le. fileop en doesn't  work
        2306  
        2307                    Init EachChild( child);
        2308           }
        2309   }
        2310  
        2311   function k adovInitEa chChild(el )
        2312   {       
        2313           In itEachChil d(el);
        2314   }
        2315  
        2316   function R etrieveTex tInner(el)
        2317   {       
        2318           va r x = "";
        2319           if ( (!el) ||  (el.tagNa me == "!")  || (el.ta gName == " SCRIPT" ))
        2320                    retu rn x;
        2321  
        2322           if ( IsParagr aph(el) )
        2323           {
        2324                    var  strNewID =  " ";
        2325                    if(  el.id != " " )
        2326                             strNew ID += "id= " + el.id  + "_NewSpa n ";
        2327                    x =  "<span" +  strNewID +  "style='"  + el.styl e.cssText  + "'>" + e l.innerHTM L + "</spa n>";
        2328           }
        2329           el se
        2330           {
        2331                    for( var i=0; i <getChildN odes(el).l ength; i++ )
        2332                             x += R etrieveTex tInner( ge tChildNode s(el)[i] ) ;
        2333           }
        2334           re turn x;
        2335   }
        2336  
        2337   function k adovRetrie veTextInne r(el)
        2338   {
        2339           re turn  Retr ieveTextIn ner(el);
        2340   }
        2341  
        2342   function R etrieveCle anHTML( st rRawHTML,  strTagOpen , strTagCl ose, nDist ance )
        2343   {       
        2344           va r nTagOpen  = strRawH TML.indexO f( strTagO pen, 0 );
        2345           if ( nTagOpen  < 0 )
        2346                    retu rn strRawH TML;
        2347  
        2348           va r nTagClos e = strRaw HTML.index Of( strTag Close, nTa gOpen);
        2349           if ( nTagClos e < nTagOp en )
        2350                    retu rn strRawH TML;
        2351                    
        2352           if ( typeof(n Distance)  == "number " && nDist ance > 0 )
        2353                    if(  (nTagClose  - nTagOpe n) != nDis tance )
        2354                             return  strRawHTM L;
        2355                    
        2356           va r strClean Once = str RawHTML.su bstring(0,  nTagOpen)  + strRawH TML.substr (nTagClose  + strTagC lose.lengt h) ;
        2357           re turn  Retr ieveCleanH TML( strCl eanOnce, s trTagOpen,  strTagClo se );
        2358   }
        2359  
        2360   function k adovRetrie veCleanHTM L( strRawH TML, strTa gOpen, str TagClose,  nDistance  )
        2361   {       
        2362           re turn Retri eveCleanHT ML( strRaw HTML, strT agOpen, st rTagClose,  nDistance  );
        2363   }       
        2364  
        2365   function A djustObjec tTag(strRa wHTML, nSt artPos)
        2366   {// adjust  object ta g for rela ted topics  HTML cont rol, becau se innerHT ML misses  out the it em setting s
        2367           
        2368           // Is there a ny DTC?
        2369           va r strDTCTa gOpen = '< !--Metadat a type="De signerCont rol" start span';
        2370           va r strDTCTa gClose = ' <!--Metada ta type="D esignerCon trol" ends pan-->';
        2371           va r nDTCTagO pen = strR awHTML.ind exOf( strD TCTagOpen,  nStartPos  );
        2372           if ( nDTCTagO pen < 0 )
        2373                    retu rn strRawH TML;
        2374           va r nDTCTagC lose = str RawHTML.in dexOf( str DTCTagClos e, nDTCTag Open );
        2375           if ( nDTCTagC lose < nDT CTagOpen)
        2376                    retu rn strRawH TML; // no  Design Ti me Control s;
        2377                    
        2378           // Is the DTC  HTML Help  Control?
        2379           va r strRTObj TagOpen =  'classid=c lsid:ADB88 0A6-D8FF-1 1CF-9377-0 0AA003B7A1 1';
        2380           va r strRTObj TagClose =  '</OBJECT >';
        2381           va r nRTObjTa gOpen = st rRawHTML.i ndexOf( st rRTObjTagO pen, nDTCT agOpen );
        2382           if ( nRTObjTa gOpen < nD TCTagOpen  )
        2383                    retu rn strRawH TML;
        2384           va r nRTObjTa gClose = s trRawHTML. indexOf( s trRTObjTag Close, nRT ObjTagOpen  );
        2385           if ( nRTObjTa gClose < n RTObjTagOp en )
        2386                    retu rn strRawH TML; // is  not a HTM L help con trol
        2387                    
        2388           //  Is it a r elated Top ics html h elp contro l?
        2389           va r strRTObj Label = '< PARAM NAME =\"Command \" VALUE=\ "Related T opics';
        2390           if ( strRawHT ML.indexOf (strRTObjL abel, nRTO bjTagOpen)  < 0 )
        2391                    retu rn strRawH TML;
        2392           
        2393           //  does the  commented  object tag  contain a  items par ameters              
        2394           va r strRTIte msOpen = ' <param nam e="Items"  value="';
        2395           va r strRTIte msClose =  '$$**$$" > ';
        2396           va r strRTIte msClose2 =  '$$**$$"> ';
        2397  
        2398           va r nRTItems Open = str RawHTML.in dexOf(strR TItemsOpen , nDTCTagO pen);
        2399           if ( nRTItems Open < nDT CTagOpen )
        2400                    retu rn strRawH TML;
        2401           va r nRTItems Close = st rRawHTML.i ndexOf(str RTItemsClo se, nRTIte msOpen);
        2402           if  (nRTItems Close == - 1)
        2403                    nRTI temsClose  = strRawHT ML.indexOf (strRTItem sClose2, n RTItemsOpe n);
        2404           if ( nRTItems Close < nR TItemsOpen  )
        2405                    retu rn strRawH TML;
        2406                    
        2407           //  found a i tems strin g
        2408           va r strItems  = strRawH TML.substr ing( nRTIt emsOpen +  strRTItems Open.lengt h, nRTItem sClose);
        2409           if ( strItems .length <  1 )
        2410                    retu rn strRawH TML;
        2411           
        2412           //  to recons truct the  item(s) pa ram tag(s)
        2413           va r strItems Array = st rItems.spl it('$$**$$ ');
        2414           if ( strItems Array.leng th < 1 )
        2415                    retu rn strRawH TML;
        2416           va r strRunTi meItemPara m = "";
        2417           fo r( var i =  0; i < st rItemsArra y.length;  i++ )
        2418           {
        2419                    strR unTimeItem Param += ' <PARAM  NA ME="Item'  + (i+1);
        2420                    strR unTimeItem Param += ' "' + '  VA LUE="';
        2421                    strR unTimeItem Param += s trItemsArr ay[i];
        2422                    strR unTimeItem Param += ' ">';
        2423           }
        2424           
        2425           //  to insert  the recon structed i tem params  into runt ime object  tag
        2426           va r strAdjus tedHTML =  strRawHTML .substring (0,nRTObjT agClose) +  strRunTim eItemParam  + strRawH TML.substr ing(nRTObj TagClose,  strRawHTML .length);
        2427           re turn Adjus tObjectTag (strAdjust edHTML, nD TCTagClose  + strDTCT agClose.le ngth);
        2428   }
        2429  
        2430   function k adovAdjust ObjectTag( strRawHTML , nStartPo s)
        2431   {// adjust  object ta g for rela ted topics  HTML cont rol, becau se innerHT ML misses  out the it em setting s
        2432    return Ad justObject Tag(strRaw HTML, nSta rtPos);
        2433   }
        2434  
        2435   function T extPopupOn Load( el )
        2436   {
        2437           if ( typeof(e l) == "str ing" )
        2438                    el =  getElemen t(el);
        2439           va r src = nu ll;
        2440           if (el.id)
        2441           {
        2442                    for  (var i=0;i <gPopupDat a.length;i ++)
        2443                             if (gP opupData[i ].el==el.i d)
        2444                             {
        2445                                      src=gPop upData[i]. popupId;
        2446                                      break;
        2447                             }
        2448           }
        2449           if  (!src)        
        2450                    retu rn 0;
        2451  
        2452           va r name = s rc;
        2453           if ( src.subs tr(0,1) ==  "#" ) 
        2454                    name  = src.sub str(1, src .length-1) ;
        2455           va r srcDiv =  getElemen t(name);
        2456           if ( !srcDiv  )
        2457                    retu rn 1;
        2458  
        2459           // srcDiv.sty le.display  = "none";
        2460           re turn 0;
        2461   }
        2462   function k adovTextPo pupOnLoad(  el )
        2463   {
        2464           re turn TextP opupOnLoad ( el );
        2465   }
        2466   function g etElements ByTag(obj, sTagName)
        2467   {
        2468           if (obj.getEl ementsByTa gName)
        2469                    retu rn obj.get ElementsBy TagName(sT agName);
        2470           el se if(obj. all)
        2471                    retu rn obj.all .tags(sTag Name);
        2472           re turn null;
        2473   }
        2474  
        2475   function g etElement( sID)
        2476   {
        2477           if (document. getElement ById)
        2478                    retu rn documen t.getEleme ntById(sID );
        2479           el se if(docu ment.all)
        2480                    retu rn documen t.all(sID) ;
        2481           re turn null;
        2482   }
        2483  
        2484   function g etParentNo de(obj)
        2485   {
        2486           if (obj.paren tNode)
        2487                    retu rn obj.par entNode;
        2488           el se if(obj. parentElem ent)
        2489                    retu rn obj.par entElement ;
        2490           re turn null;
        2491   }
        2492  
        2493   function g etChildNod es(obj)
        2494   {
        2495           if (obj.child Nodes)
        2496           {
        2497                    var  children =  new Array ();
        2498                    for  (var i = 0 ; i < obj. childNodes .length; i ++)
        2499                    {
        2500                             if (ob j.childNod es[i].node Type == 1)
        2501                                      children [children. length] =  obj.childN odes[i];
        2502                    }
        2503                    retu rn childre n;
        2504           }
        2505           el se if(obj. children)
        2506                    retu rn obj.chi ldren;
        2507           re turn null;     
        2508   }
        2509  
        2510   function r emoveThis( obj)
        2511   {
        2512           if (obj.paren tNode)
        2513                    obj. parentNode .removeChi ld(obj);
        2514           el se
        2515                    obj. outerHTML= "";
        2516   }
        2517  
        2518   function T extPopup(  el )
        2519   {
        2520           if  (!gbBsIE4  && !gbBsO pera7 && ! gbBsSafari  && !gbBsN S6 && !gbB sKonqueror 3 )
        2521                    retu rn;
        2522           
        2523           if  (window.e vent)
        2524                    wind ow.event.c ancelBubbl e = true;
        2525  
        2526           if ( typeof(e l) == "str ing" )
        2527                    el =  getElemen t(el);
        2528  
        2529           if  (!el||el= =window)
        2530                    retu rn;
        2531  
        2532           fo r(var i=0;  i<getChil dNodes(el) .length; i ++)
        2533           {
        2534                    var  child = ge tChildNode s(el)[i];
        2535                    if(  child && ( child.tagN ame == "IM G") )
        2536                    {
        2537                             if(chi ld.classNa me == "Twi sties")
        2538                             {
        2539                                      if( chil d.style &&  (child.st yle.displa y == "") )
        2540                                               child.styl e.display  = "none";
        2541                                      else if( child.styl e)
        2542                                               child.styl e.display  = "";
        2543                             }
        2544                    }
        2545  
        2546                    if(  child && ( child.tagN ame == "SP AN") )
        2547                    {
        2548                             if(chi ld.classNa me == "MTT ext")
        2549                             {
        2550                                      if( chil d.style &&  (child.st yle.displa y == "") )
        2551                                               child.styl e.display  = "none";
        2552                                      else if( child.styl e)
        2553                                               child.styl e.display  = "";
        2554                             }
        2555                    }
        2556           }
        2557           
        2558           va r src = nu ll; 
        2559           if (!src&&el. id)
        2560           {
        2561                    for  (var i=0;i <gPopupDat a.length;i ++)
        2562                             if (gP opupData[i ].el==el.i d)
        2563                             {
        2564                                      src=gPop upData[i]. popupId;
        2565                                      break;
        2566                             }
        2567           }
        2568           if (!src)
        2569                    retu rn;
        2570                    
        2571           va r name = s rc;
        2572           if ( src.subs tr(0,1) ==  "#" ) 
        2573           na me = src.s ubstr(1, s rc.length- 1);
        2574  
        2575           va r srcDiv =  getElemen t(name);
        2576           if ( !srcDiv  )
        2577                    retu rn;
        2578  
        2579           if ( srcDiv )
        2580           {
        2581                    if(  srcDiv.sty le.display  == "" )
        2582                             srcDiv .style.dis play = "no ne";
        2583                    else
        2584                    {
        2585                             if(src Div.classN ame == "ex pandtext")
        2586                             {
        2587                                      var inne r = Retrie veTextInne r(srcDiv);
        2588                                      if( inne r == "" )
        2589                                               inner = sr cDiv.inner HTML;
        2590                                      if(inner .indexOf(" &nbsp;") ! = 0 && inn er.indexOf (" ") != 0  && inner. indexOf("& #160;"))
        2591                                      {
        2592                                               //insertAd jacentHTML (srcDiv, ' afterBegin ', "&nbsp" );
        2593                                               try
        2594                                               {
        2595                                                       if (srcDiv.ch ildNodes)
        2596                                                       {
        2597                                                                var  firstChild  = srcDiv. childNodes [0];
        2598                                                                var  newText =  document.c reateTextN ode(" ");
        2599                                                                srcD iv.insertB efore(newT ext, first Child);
        2600                                                       }
        2601                                               }
        2602                                               catch(e)
        2603                                               {
        2604                                               }
        2605                                      }
        2606                             }
        2607  
        2608                             srcDiv .style.dis play = "";
        2609                    }
        2610           }
        2611           if (gbBsIE4)
        2612                    even t.returnVa lue=false;
        2613           re turn;
        2614   }
        2615  
        2616   function k adovTextPo pup( el )
        2617   {
        2618           Te xtPopup( e l );
        2619   }
        2620  
        2621   function F indParentP aragraph(  el )
        2622   {
        2623           if ( typeof(e l) == "str ing" )
        2624                    el =  getElemen t(el);
        2625           if ( (!el) ||  el.tagNam e == "BODY " )
        2626                    retu rn null;
        2627           if ( IsParagr aph(getPar entNode(el )) )
        2628                    retu rn getPare ntNode(el) ;
        2629           el se
        2630                    retu rn FindPar entParagra ph( getPar entNode(el ) );
        2631   }
        2632  
        2633   function k adovFindPa rentParagr aph( el )
        2634   {
        2635           re turn FindP arentParag raph( el ) ;
        2636   }
        2637  
        2638   //Begin HT ML code in voked func tion
        2639   function R egisterEve ntHandler(  obj, strE vent, strE ventHandle r )
        2640   {
        2641           CC SSP.Regist erEventHan dler( obj,  strEvent,  strEventH andler );
        2642   }
        2643  
        2644   function k adovRegist erEventHan dler( obj,  strEvent,  strEventH andler )
        2645   {
        2646    RegisterE ventHandle r( obj, st rEvent, st rEventHand ler );
        2647   }
        2648  
        2649  
        2650   function t extPopupDa ta(el, pop upId)
        2651   {
        2652           th is.el = el ;
        2653           th is.popupId  = "#"+pop upId;
        2654   }
        2655  
        2656   var gPopup Data = new  Array();
        2657  
        2658   function T extPopupIn it( el, po pupId)
        2659   {
        2660           if  (!gbBsIE4  && !gbBsO pera7 && ! gbBsSafari  && !gbBsN S6 && !gbB sKonqueror 3)
        2661                    retu rn;
        2662                    
        2663           if ( typeof(e l) == "str ing" )
        2664           {
        2665                    if ( popupId)
        2666                    {
        2667                             gPopup Data[gPopu pData.leng th]=new te xtPopupDat a(el, popu pId);
        2668                    }
        2669                    el =  getElemen t(el);
        2670           }
        2671                    
        2672           if ( el != nu ll )
        2673           {
        2674                    CCSS P.Register EventHandl er( el, "o nclick", " TextPopup( \"" + el.i d +"\");"  );
        2675                    CCSS P.Register EventHandl er( window , "onload" , "TextPop upOnLoad(\ "" + el.id  +"\");" ) ;
        2676           }
        2677   }
        2678  
        2679   function k adovTextPo pupInit( e l, popupId )
        2680   {
        2681           re turn TextP opupInit(  el, popupI d);
        2682   }
        2683   //End HTML  code invo ked functi on
        2684  
        2685   //End to s upport ext ended and  dropdown t ext effect s.
        2686  
        2687   //Begin to  convert i Write form at to Robo Editor For mat for DH TML effect s
        2688   function I nitTrigger sInHead( )
        2689   {
        2690     if( Obje ct.xDelaye dInitEleme nts )
        2691     {
        2692        var x  = Object. xDelayedIn itElements ;
        2693        for(i =0; i<x.le ngth; i++)
        2694           In itTrigger(  x[i] );
        2695     }
        2696   }
        2697  
        2698   function k adovInitTr iggersInHe ad( )
        2699   {
        2700           In itTriggers InHead( );
        2701   }
        2702  
        2703   //Begin HT ML code in voked func tion
        2704   function F ilePopupIn it( el )
        2705   {
        2706           if ( typeof(e l) == "str ing" )
        2707                    el =  getElemen t(el);
        2708  
        2709           if ( el != nu ll )
        2710                    CCSS P.Register EventHandl er( el, "o nmouseover ", "BSPSPo pupOnMouse Over(event );" );
        2711   }
        2712   function k adovFilePo pupInit( e l )
        2713   {
        2714           Fi lePopupIni t( el );
        2715   }
        2716  
        2717   function I nitTrigger ( element,  a_targets  )
        2718   {
        2719   //      if ( !gbBsIE4  )
        2720           //       retu rn;
        2721           va r srcEleme nt = eleme nt;
        2722           if ( typeof(s rcElement)  == "strin g" )
        2723           {
        2724                    srcE lement = g etElement( element,0) ;
        2725                    if(s rcElement  == null)
        2726                             return ;
        2727           }
        2728           
        2729           // if( !IsPar entVisible (srcElemen t) )
        2730           //       retu rn;
        2731           
        2732           va r targets  = null;
        2733           if (typeof(a_ targets) ! = "undefin ed")
        2734                    targ ets = a_ta rgets;
        2735           if (!targets)
        2736                    targ ets = getA ttribute(s rcElement,  "x-target s" );
        2737           if  (!targets )
        2738                    targ ets = getA ttribute(s rcElement. style,"x-t argets");
        2739           if  (!targets )
        2740                    retu rn; 
        2741           va r arrOneTa rget = tar gets.split ( "," );
        2742           fo r( var i =  0; i < ar rOneTarget .length; i  ++ )
        2743                    bssc FXInit( el ement, arr OneTarget[ i], null,  null, null , null );
        2744   }
        2745  
        2746   function k adovInitTr igger( ele ment )
        2747   {
        2748           In itTrigger(  element )
        2749   }
        2750  
        2751   function I sParentVis ible( el )
        2752   {
        2753           if ( typeof(e l) == "str ing" )
        2754                    el =  getElemen t(el);
        2755           if ( (!el) ||  el.tagNam e == "BODY " )
        2756                    retu rn true;
        2757           if ( el.style .display = = 'none' )  //el.visi bility ==  'hidden' |
        2758                    retu rn false;
        2759           el se
        2760                    retu rn IsParen tVisible(  getParentN ode(el) );
        2761   }
        2762  
        2763   function k adovIsPare ntVisible(  el )
        2764   {
        2765           re turn IsPar entVisible ( el );
        2766   }
        2767   function I nitEffects ( element,  effectsLi st )
        2768   {
        2769           // if( !gbBsI E4 )
        2770           //       retu rn;
        2771           va r srcEleme nt = eleme nt;
        2772           if ( typeof(s rcElement)  == "strin g" )
        2773           {
        2774                    srcE lement = g etElement( element,0) ;
        2775                    if(s rcElement  == null)
        2776                             return ;
        2777           }
        2778           
        2779           // if( !IsPar entVisible (srcElemen t) )
        2780           //       retu rn;
        2781  
        2782           if (effectsLi st)
        2783           {
        2784                    //sr cElement.s etAttribut e("style",  effectsLi st);
        2785                    var  str = effe ctsList;
        2786                    var  nStart = 0 ;
        2787                    var  indx = str .indexOf(" :", nStart );
        2788                    var  effect = n ull;
        2789                    var  value = nu ll;
        2790                    whil e(nStart > = 0 && ind x > 0 && i ndx < str. length)
        2791                    {
        2792                             effect  = effects List.subst r(nStart,  indx-nStar t);
        2793                             var in dx2 = str. indexOf("; ", nStart) ;
        2794                             if(ind x2 == -1)
        2795                                      indx2 =  str.length ;
        2796                             value  = effectsL ist.substr (indx+1, i ndx2);
        2797                             if(eff ect && val ue)
        2798                                 se tAttribute (srcElemen t,effect,  value);
        2799                             nStart  = effects List.index Of("x-on",  indx2+1);
        2800                             indx =  str.index Of(":", nS tart);
        2801                    }
        2802                    
        2803           }
        2804           
        2805           In itEffect(  srcElement , "x-on-ho ver" );
        2806           In itEffect(  srcElement , "x-on-pa geclick" ) ;
        2807           In itEffect(  srcElement , "x-on-pa geload" );
        2808           In itEffect(  srcElement , "x-on-tr igger-1" ) ;
        2809           In itEffect(  srcElement , "x-on-tr igger-2" ) ;
        2810   }
        2811  
        2812   function k adovInitEf fects( ele ment )
        2813   {
        2814           In itEffects(  element ) ;
        2815   }
        2816   //End HTML  code invo ked functi on
        2817  
        2818   function I nitEffect(  element,  prop )
        2819   {
        2820           va r values =  null;
        2821           if ( getAttri bute(eleme nt,prop))          
        2822                    valu es = getAt tribute(el ement, pro p );  
        2823           el se if( get Attribute(  element,  "currentSt yle" )  &&  element.c urrentStyl e.getAttri bute)
        2824                    valu es = eleme nt.current Style.getA ttribute(  prop );
        2825           el se  if (el ement.styl e.getAttri bute)
        2826                    valu es = eleme nt.style.g etAttribut e( prop );
        2827                    
        2828           if ( !values  )
        2829                    retu rn;
        2830       
        2831           va r function s = new Ar ray();
        2832           va r nIdx = 0 , nStart =  0;
        2833           va r nNext =  values.ind exOf( "\)" , 0);
        2834           wh ile( nNext  >= 0 && n Next < val ues.length  )
        2835           {
        2836                    func tions[nIdx ] = values .substr( n Start, nNe xt-nStart+ 1);
        2837                    nSta rt = nNext  + 1;
        2838                    nIdx ++;
        2839                    nNex t = values .indexOf(  "\)", nSta rt);
        2840           }
        2841                    
        2842           fo r( var i=0 ; i<functi ons.length ; i++)
        2843           {
        2844                    var  id = getAt tribute(el ement, "id " );
        2845                    var  translated Prop = Tra nslateProp (prop);
        2846  
        2847                    var  lp = funct ions[i].in dexOf( "("  );
        2848                    var  fnname = f unctions[i ].substrin g(0, lp);
        2849                    var  srcargs =  functions[ i].substri ng(lp+1, f unctions[i ].length-1 );
        2850                    
        2851                    var  nClickTime s = 1;
        2852                    var  arrForClic kCount = s rcargs.spl it( "," );
        2853                    for(  var j = 0 ; j < arrF orClickCou nt.length;  j++ )
        2854                    {//  to locate  and get th e "clicks= 99" settin gs
        2855                             var nP ageClick =  arrForCli ckCount[j] .indexOf(" clicks");
        2856                             if( nP ageClick > = 0 )
        2857                             {
        2858                                      nPageCli ck = arrFo rClickCoun t[j].index Of("=");
        2859                                      if( nPag eClick > 0  )
        2860                                      {
        2861                                               nClickTime s = arrFor ClickCount [j].substr ing( nPage Click + 1,  arrForCli ckCount[j] .length) *  1;
        2862                                               break;
        2863                                      }
        2864                             }
        2865                    }
        2866                    var  args = src args;
        2867                    if(  j < arrFor ClickCount .length )
        2868                    {//  to strip o ut the "cl icks=99" f rom the ar guments st ring
        2869                             args =  "";
        2870                             for( v ar k = 0;  k < arrFor ClickCount .length; k  ++ )
        2871                             {
        2872                                      if( k !=  j )
        2873                                      {
        2874                                               args += ar rForClickC ount[k];
        2875                                               if( k < ar rForClickC ount.lengt h - 1 )
        2876                                                       ar gs += ",";
        2877                                      }
        2878                             }
        2879                    }
        2880                    bssc FXInit( nu ll, id, tr anslatedPr op, fnname , args, nC lickTimes  );
        2881           }
        2882   }
        2883  
        2884   function k adovInitEf fect( elem ent, prop  )
        2885   {
        2886           In itEffect(  element, p rop );
        2887   }
        2888  
        2889   function T ranslatePr op( prop )
        2890   {
        2891           sw itch( prop  )
        2892           {
        2893           ca se "x-on-h over" :      return " bsschover" ;
        2894           ca se "x-on-p ageclick"  : return " bsscpagecl ick";
        2895           ca se "x-on-p ageload" :   return " bsscpagelo ad";
        2896           ca se "x-on-t rigger-1"  : return " bssctrigge r1";
        2897           ca se "x-on-t rigger-2"  : return " bssctrigge r2";
        2898           }
        2899           re turn null;
        2900   }
        2901  
        2902   function k adovTransl ateProp( p rop )
        2903   {
        2904           re turn Trans lateProp(  prop );
        2905   }
        2906  
        2907   //End to c onvert iWr ite format  to RoboEd itor Forma t for DHTM L effects
        2908  
        2909   //Begin th e definiti on of one  entry to D HTML effec ts
        2910   function b sscFXInit(  trigger_I D, target_ ID, event_ type, 
        2911           ac tion_type,  action_se tting, eve nt_addiona l )
        2912   {
        2913           // if( typeof (target_ID ) != "stri ng" )//MUS T have a t arget_ID
        2914           //       retu rn; // we  don't supp ort Naviga tor yet
        2915           
        2916           if ( typeof(e vent_type)  == "strin g" )
        2917                    even t_type = e vent_type. toLowerCas e();
        2918           if ( typeof(a ction_type ) == "stri ng" )
        2919                    acti on_type =  action_typ e.toLowerC ase();
        2920           if ( typeof(a ction_sett ing) == "s tring" )
        2921                     act ion_settin g = action _setting.t oLowerCase ();
        2922           
        2923           //  to get th e target e lement the n add it t o the targ et list
        2924           va r eleTarge t = CCSSP. GetObject(  target_ID  );
        2925           if ( (eleTarg et != null ) && (even t_type !=  null) && ( action_typ e != null)  )
        2926           {
        2927                    
        2928                    CEng ine.AddOne Target( ta rget_ID, e leTarget ) ;
        2929                    CEng ine.BuildT argetObjec t(target_I D, event_t ype, actio n_type, ac tion_setti ng, event_ addional);
        2930           }
        2931           
        2932           //  to valida te the tri gger_ID pa rameter
        2933           if ( typeof(t rigger_ID)  == "strin g" && trig ger_ID !=  "" )
        2934                    CEng ine.BuildT riggerObje ct( trigge r_ID, targ et_ID );
        2935   }       
        2936   //End the  definition  of one en try to DHT ML effects
        2937  
        2938   /// Sectio n End  - D HTM (JavaS cript 1.2)
        2939  
        2940   /// Sectio n Begin  -  CCSSP DHT M (JavaScr ipt 1.2)
        2941  
        2942   //Begin Ja vaScript l ibary for  cross-plat form posit ioning obj ect.
        2943   function C CSSP(){} / / construc tor of CCS SP class
        2944  
        2945   CCSSP.GetO bject = fu nction( ob j )
        2946   {//convert  object na me string  or referen ce into a  valid obje ct referen ce
        2947           if ( typeof(o bj) == "ob ject" )
        2948                    retu rn obj;
        2949           el se if( typ eof(obj) = = "string"  && obj !=  "")
        2950           {
        2951                    if ( gbBsNS6)
        2952                         return get Element(ob j);     
        2953                    else  if( gbBsN S4 )
        2954                             return  eval("doc ument." +  obj);
        2955                    else
        2956                             return  eval("doc ument.all( \"" + obj  + "\")");
        2957           }
        2958           el se
        2959                    retu rn null;
        2960   }
        2961  
        2962   CCSSP.Move ObjectTo =  function( obj, x, y)
        2963   {//positio ning an ob ject at a  specific p ixel coord inate
        2964           if ( gbBsNS4  && !gbBsNS 6) 
        2965                    obj. moveTo(x,y );
        2966           el se
        2967           {
        2968                    if ( x == '')
        2969                    x =  0 ;
        2970                if (y ==  '')
        2971                    y =  0 ;
        2972                obj.styl e.left = p arseInt(x)  + 'px';
        2973                obj.styl e.top = pa rseInt(y)  + 'px'; 
        2974           }
        2975   }
        2976  
        2977   CCSSP.SetT imer = fun ction(obj,  timeout)
        2978   {
        2979           if ( obj.time r == null  )
        2980           {
        2981                    if(g bAIR)
        2982                    {
        2983                             obj.ti mer = setI nterval(fu nction(){C Engine.Per formAnimat ion( obj.a niIndex)},  timeout ) ;
        2984                    }
        2985                    else
        2986                             obj.ti mer = setI nterval("C Engine.Per formAnimat ion(" + ob j.aniIndex  + ")", ti meout );
        2987           }
        2988   }
        2989  
        2990  
        2991   CCSSP.Move ObjectBy =  function( obj, dx, d y)
        2992   {//moveing  a object  by x and/o r y pixel
        2993           if  (gbBsNS6)
        2994           {
        2995                var left  = parseIn t(obj.styl e.left);
        2996                obj.styl e.setPrope rty('left' ,(left + d x ) + 'px' ,0) ;
        2997                var top  =  parseIn t(obj.styl e.top);
        2998                obj.styl e.setPrope rty('top'  , (top + d y) + 'px'  ,0);
        2999           }
        3000           el se if( gbB sNS4 )
        3001                    obj. moveBy(dx, dy);
        3002           el se
        3003           {
        3004                    obj. style.pixe lLeft += d x;
        3005                    obj. style.pixe lTop += dy ;
        3006           }
        3007   }
        3008  
        3009   CCSSP.SetO bjectBGCol or = funct ion(obj, c olor)
        3010   {//set the  backgroun d color of  an object
        3011           if   (gbBsNS6 )
        3012                obj.styl e.setPrope rty( "back ground-col or" , colo r , 0);
        3013           el se if( gbB sNS4 )
        3014                    obj. bgColor =  color;
        3015           el se
        3016                    obj. style.back groundColo r = color;
        3017   }
        3018  
        3019   CCSSP.Show Object = f unction(ob j, bShow)
        3020   {// set th e object t o be visib le or invi sible
        3021           if  (gbBsNS6)
        3022                obj.styl e.setPrope rty('visib ility', (b Show == tr ue) ? 'vis ible' : 'h idden',nul l);
        3023           el se if( gbB sNS4 )
        3024                    obj. visibility  = (bShow  == true) ?  'show' :  'hide';
        3025           el se
        3026                    obj. style.visi bility = ( bShow == t rue) ? 'vi sible' : ' hidden';//  when hidd en, it sti ll occupy  some space .
        3027   }
        3028  
        3029   CCSSP.GetO bjectLeft  = function (obj)
        3030   {// retrie ve the x c oordinate  of a posio nable obje ct
        3031           if  (gbBsNS6)
        3032                return o bj.style.l eft ;
        3033           el se if( gbB sNS4 )
        3034                    retu rn obj.lef t;
        3035           el se
        3036                    retu rn obj.sty le.pixelLe ft;
        3037   }
        3038  
        3039   CCSSP.GetO bjectTop =  function( obj)
        3040   {// retrie ve the y c oordinate  of a posio nable obje ct
        3041           if  (gbBsNS6)
        3042                return o bj.style.t op ;
        3043           el se if( gbB sNS4 )
        3044                    retu rn obj.top ;
        3045           el se
        3046                    retu rn obj.sty le.pixelTo p;
        3047   }
        3048  
        3049   CCSSP.GetO bjectConta inLeft = f unction(ob j)
        3050   {// retrie ve the x c oordinate  of a posio nable obje ct relativ e to it's  parent ele ment
        3051           if ( typeof(o bj.pageX)  != 'undefi ned')
        3052                    retu rn obj.pag eX;
        3053           el se if( typ eof(obj.cl ientLeft)  != 'undefi ned' )
        3054                    retu rn obj.cli entLeft;
        3055           el se
        3056                return o bj.offsetL eft;      
        3057   }
        3058  
        3059   CCSSP.GetO bjectWindo wLeft = fu nction(obj )
        3060   {// retrie ve the x c oordinate  of a posio nable obje ct relativ e to brows er window
        3061           if ( gbBsNS4  && !gbBsNS 6)
        3062                    retu rn obj.pag eX;
        3063           el se
        3064           {
        3065                    var  nOffsetWin dowLeft =  0;
        3066                    for( var elemen t = obj; e lement; el ement = el ement.offs etParent)
        3067                             nOffse tWindowLef t += CCSSP .GetObject ContainLef t(element) ;
        3068                    retu rn nOffset WindowLeft ;
        3069           }
        3070   }
        3071  
        3072   CCSSP.GetO bjectConta inTop = fu nction(obj )
        3073   {// retrie ve the y c oordinate  of a posio nable obje ct relativ e to it's  parent ele ment
        3074           if ( typeof(o bj.pageY)  != 'undefi ned')
        3075                    retu rn obj.pag eY;
        3076           el se if( typ eof(obj.cl ientTop) ! = 'undefin ed' && obj  == docume nt.body)
        3077                    retu rn obj.cli entTop;
        3078           el se
        3079                    retu rn obj.off setTop;   
        3080   }
        3081  
        3082   CCSSP.GetO bjectWindo wTop = fun ction(obj)
        3083   {// retrie ve the y c oordinate  of a posio nable obje ct relativ e to brows er window
        3084           if ( gbBsNS4  && !gbBsNS 6)
        3085                    retu rn obj.pag eY;
        3086           el se
        3087           {
        3088                    var  nOffsetWin dowTop = 0 ;
        3089                    for( var elemen t = obj; e lement; el ement = el ement.offs etParent)
        3090                             nOffse tWindowTop  += CCSSP. GetObjectC ontainTop( element);
        3091                    retu rn nOffset WindowTop;
        3092           }
        3093   }
        3094  
        3095   CCSSP.GetO bjectHeigh t = functi on(obj)
        3096   {// retrie ve the hei ght of a p osionable  object
        3097           if ( gbBsNS4  && !gbBsNS 6)
        3098                    retu rn obj.cli p.height;
        3099           el se
        3100                    retu rn obj.off setHeight;
        3101   }
        3102  
        3103   CCSSP.GetO bjectWidth  = functio n(obj)
        3104   {// retrie ve the wid th of a po sionable o bject
        3105           if ( gbBsNS4  && !gbBsNS 6)
        3106                    retu rn obj.cli p.width;
        3107           el se
        3108                    retu rn obj.off setWidth;
        3109   }
        3110  
        3111   CCSSP.Regi sterEventH andler = f unction( s rcObj, raw EventName,  funcHandl er )
        3112   { // to ad d the "fun cHandler"  as the "ra wEventName " 's handl er to the  "srcObj" o bject,the  original e vent handl er will be  combined
        3113  
        3114           if ( srcObj = = window & & rawEvent Name == 'o nload' )
        3115           {
        3116                    var  bSet = fal se;
        3117                    if(  window.add EventListe ner )
        3118                    {
        3119                             window .addEventL istener( ' load', new  Function( "event", f uncHandler  ),false);
        3120                             bSet =  true;
        3121                    }
        3122                    else  if( windo w.attachEv ent )
        3123                    {
        3124                             window .attachEve nt('onload ', new Fun ction("eve nt", funcH andler ),  false);
        3125                             bSet =  true;
        3126                    }
        3127                    
        3128                    if(  bSet )
        3129                             return ;
        3130           }
        3131           
        3132           if  (gbBsNS4  && !gbBsNS 6)
        3133                    retu rn ;
        3134                    
        3135           va r oldHandl er = "";
        3136  
        3137           if  (gbBsMac  &&gbBsIE4& &!gbBsIE5)
        3138           {
        3139                    if ( typeof(src Obj[rawEve ntName.toL owerCase() ])=="unkno wn")
        3140                    { // search for  <SCRIPT>  tag which  define the  event han dler
        3141                             for( v ar i = 0;  i < docume nt.scripts .length; i ++ ) 
        3142                             {
        3143                                      var scri pt = docum ent.script s[i];
        3144                                      if( (scr ipt.htmlFo r == srcOb j.id || sc ript.htmlF or == srcO bj ) && sc ript.event  == rawEve ntName )
        3145                                      {
        3146                                               oldHandler  = script. innerHTML;
        3147                                               break;
        3148                                      }
        3149                             }
        3150                    }
        3151           }
        3152           el se
        3153           {
        3154                    var  oldInlineH andler = s rcObj[rawE ventName.t oLowerCase ()];
        3155                    if(  oldInlineH andler !=  null && ty peof(oldIn lineHandle r) != "und efined")
        3156                    {
        3157                             var fu nctionDefi nition = o ldInlineHa ndler.toSt ring();
        3158                             var bo dyStart =  functionDe finition.i ndexOf( "{ " );
        3159                             var bo dyEnd = fu nctionDefi nition.las tIndexOf(  "}" );
        3160                             if( bo dyStart >  0 || bodyE nd > bodyS tart )
        3161                                      oldHandl er = funct ionDefinit ion.substr ( bodyStar t + 1, bod yEnd - bod yStart - 2  );
        3162                    }
        3163                    else  if( gbBsI E4 )
        3164                    { // search for  <SCRIPT>  tag which  define the  event han dler
        3165                             for( v ar i = 0;  i < docume nt.scripts .length; i ++ ) 
        3166                             {
        3167                                      var scri pt = docum ent.script s[i];
        3168                                      if( (scr ipt.htmlFo r == srcOb j.id || sc ript.htmlF or == srcO bj ) && sc ript.event  == rawEve ntName )
        3169                                      {
        3170                                               oldHandler  = script. innerHTML;
        3171                                               break;
        3172                                      }
        3173                             }
        3174                    }
        3175           }
        3176           if ( oldHandl er.indexOf (funcHandl er) >= 0 )
        3177                    retu rn;// to p revent reg ister the  funtion tw ice.
        3178  
        3179           if ( gbBsNS4  ) // only  "onload, o nresize, o nfocus" ap ply to win dow
        3180           {/ / other ra w events w ill apply  to layer
        3181                    var  noOn = raw EventName. substring( 2, rawEven tName.leng th);
        3182                    if(  typeof(noO n) == "str ing" && no On.length  > 3 ) {
        3183                             if (sr cObj.captu reEvents)
        3184                                      srcObj.c aptureEven ts( Event[ noOn.toUpp erCase()]  );
        3185                    }
        3186           }
        3187           
        3188           va r newHandl er = oldHa ndler;
        3189           if ( newHandl er.length  == 0 )
        3190                    newH andler = f uncHandler ;
        3191           el se
        3192                    newH andler +=  "; " + fun cHandler;        
        3193           if  ((gbBsNS6 )&&(srcObj .addEventL istener))
        3194                srcObj.a ddEventLis tener( noO n.toLowerC ase(), new  Function( "event", n ewHandler  ),false);
        3195           el se
        3196                srcObj[r awEventNam e.toLowerC ase()] = n ew Functio n( newHand ler );    
        3197   }
        3198  
        3199   CCSSP.GetW indowHeigh t = functi on()
        3200   {// retrie ve the hei ght of ava ilable con tent in br owser wind ow
        3201           if ( gbBsNS4  )
        3202                    retu rn window. innerHeigh t;
        3203           el se
        3204                    retu rn documen t.body.cli entHeight;
        3205   }
        3206  
        3207   CCSSP.GetW indowBotto m = functi on()
        3208   {// retrie ve the bot tom postio n of brows er window
        3209           if ( gbBsNS4  )
        3210                    retu rn window. outerHeigh t + window .pageYOffs et;
        3211           el se
        3212                    retu rn documen t.body.cli entHeight  + getScrol lTop();
        3213   }
        3214  
        3215   CCSSP.GetW indowWidth  = functio n()
        3216   {// retrie ve the wid th of avai lable cont ent in bro wser windo w
        3217           if ( gbBsNS4  )
        3218                    retu rn window. innerWidth ;
        3219           el se
        3220                    retu rn documen t.body.cli entWidth;
        3221   }
        3222  
        3223   CCSSP.GetW indowRight  = functio n()
        3224   {// retrie ve the rig ht postion  of browse r window
        3225           if ( gbBsNS4  )
        3226                    retu rn window. outerWidth  + window. pageXOffse t;
        3227           el se
        3228                    retu rn documen t.body.cli entWidth +  getScroll Left();
        3229   }
        3230  
        3231   CCSSP.Trim String = f unction( o bjString,  subtrim )
        3232   {// to tri m the "sub trim" in t he beginni ng and end ing of a s tring obje ct
        3233           if ( typeof(s ubtrim) !=  "string"  || subtrim  == null )
        3234                    retu rn objStri ng;
        3235           va r strHead  = objStrin g.substrin g(0, 1);
        3236           va r strRear  = objStrin g.substrin g(objStrin g.length-1 , objStrin g.length);
        3237           if ( strHead  != subtrim  && strRea r != subtr im )
        3238                    retu rn objStri ng;
        3239           
        3240           va r spacePos  = objStri ng.indexOf (subtrim);
        3241           if ( spacePos  < 0 )
        3242                    retu rn objStri ng;
        3243           el se if( spa cePos == o bjString.l ength - 1  )
        3244                    retu rn objStri ng.substri ng(0, spac ePos);
        3245           el se
        3246           {
        3247                    var  newString  = objStrin g.substrin g( spacePo s + 1, obj String.len gth);
        3248                    retu rn CCSSP.T rimString(  newString , subtrim  );
        3249           }
        3250   }
        3251  
        3252   CCSSP.Trim Space = fu nction( ob jString )
        3253   {
        3254           va r Trim1 =  CCSSP.Trim String( ob jString, "  ");
        3255           if ( typeof(T rim1) != " string" ||  Trim1 ==  null )
        3256                return T rim1;
        3257           va r strHead  = Trim1.su bstring(0,  1);
        3258           if (strHead = = "\"")
        3259                return C CSSP.TrimS tring( Tri m1, "\"");
        3260           re turn CCSSP .TrimStrin g( Trim1,  "\'");
        3261   }
        3262  
        3263   CCSSP.GetE ventElemen t = functi on( navEve ntObject )
        3264   {// to get  the eleme nt who fir ed the cur rent event
        3265           if (gbBsNS4) 
        3266                    retu rn navEven tObject.ta rget;
        3267           el se
        3268                    retu rn event.s rcElement;
        3269   }
        3270  
        3271   CCSSP.Prep areFilter  = function ( Obj )
        3272   {//to prep are for ma king the f ilter work
        3273           Ob j.style.fi lter = "";
        3274           if (Obj.style .position  == "absolu te" )
        3275                    retu rn;
        3276           if (gbBsIE7)
        3277           {
        3278                    if(  Obj.style. zoom != "" )
        3279                             return ;
        3280                    Obj. style.zoom  = 1;
        3281           }
        3282           el se
        3283           {
        3284                    if(O bj.style.w idth != ""  || Obj.st yle.height  != "")
        3285                             return ;
        3286                    Obj. style.heig ht = CCSSP .GetObject Height(Obj );
        3287           }
        3288   }
        3289  
        3290   CCSSP.IsDe scendant =  function(  progenito r, progeny  )
        3291   {
        3292           if ( typeof(p rogeny) ==  "undefine d" || prog eny == nul l )
        3293                    retu rn false;
        3294           el se if( pro geny == pr ogenitor )
        3295                    retu rn true; 
        3296           el se if( pro geny.id ==  progenito r.id ) 
        3297                    retu rn true; 
        3298           el se if( get ParentNode (progeny)  == getPare ntNode(pro genitor))
        3299                    retu rn false;
        3300           el se
        3301                    retu rn CCSSP.I sDescendan t( progeni tor, getPa rentNode(p rogeny));
        3302   }
        3303  
        3304   CCSSP.IsTe xtTag = fu nction( Ob j )
        3305   {
        3306           if ( typeof(  Obj.tagNam e ) == "un defined" )
        3307                    retu rn false;
        3308           re turn( Obj. tagName.in dexOf("H")  == 0 || O bj.tagName  == "P" ||  
        3309                             Obj.ta gName == " FONT" || O bj.tagName  == "SPAN"  );
        3310   }
        3311  
        3312   //End Java Script lib ary for cr oss-platfo rm positio ning objec t.
        3313  
        3314   /// Sectio n End  - C CSSP DHTM  (JavaScrip t 1.2)
        3315  
        3316   /// Sectio n Begin  -  CCSSP DHT M 1 (JavaS cript 1.2)
        3317  
        3318   //Begin th e definiti on of clas s CTrigger
        3319   function C Trigger( T riggerElem ent )
        3320   {
        3321           //  object :  the trigge r element.  Never be  null. 
        3322           th is.eleTrig ger = Trig gerElement ;
        3323           
        3324           //  number :  the click  counter nu mber: only  3 values:  0,1,2;
        3325           th is.nCounte r = 0; 
        3326           
        3327           // object as  associativ e array of  string:
        3328           //  the assoc iate targe t ID strin gs; one el ement at l east.                         
        3329           th is.objStrT arget = ne w Object() ;
        3330           th is.eleTrig ger.style. cursor = " pointer";
        3331           if ( this.ele Trigger.ta gName == " AREA" && g etAttribut e(this.ele Trigger,"h ref") == " " )
        3332                    setA ttribute(t his.eleTri gger , "hr ef", "#");  // to mak e a hand c ursor for  image map
        3333   }
        3334  
        3335   CTrigger.p rototype.A ddTargetID  = functio n( strTarg etID )
        3336   {// add on e target I D string t o the objS trTarget
        3337           if ( typeof(s trTargetID ) != "stri ng" )
        3338                    retu rn ;
        3339           if ( typeof(t his.objStr Target[str TargetID])  != "strin g" )
        3340                    this .objStrTar get[strTar getID] = s trTargetID ;
        3341   }
        3342  
        3343   CTrigger.p rototype.O nTriggerCl ick = func tion(event )
        3344   {// to act ivate all  asociated  target
        3345           va r strEvent Type = ( ( this.nCoun ter++)% 2  == 0 ) ? 
        3346                    "bss ctrigger1"  : "bssctr igger2";
        3347                    
        3348           //  to enumer ate associ ative targ et element 's ID stri ng
        3349           fo r( var str TargetID i n this.obj StrTarget 
        3350                    CEng ine.SendEv entToOneTa rget( strT argetID, s trEventTyp e ,event);
        3351   }
        3352   //End the  definition  of class  CTrigger
        3353  
        3354   //Begin th e definiti on of clas s CTarget
        3355   function C Target( Ta rgetElemen t )
        3356   {
        3357           //  object :  the target  element.  Never be n ull.
        3358           th is.eleTarg et = Targe tElement;
        3359           th is.objMana ger = new  Object();  // object:  the event  manager
        3360  
        3361  
        3362   CTarget.nP ageClickCo unter = 0; // static  class prop erty.
        3363  
        3364   CTarget.pr ototype.Ge tAgencyObj ect = func tion(str_a ction_type ,action_se tting )
        3365   {// return  the actio n agency (  effect )o bject's re fernece 
        3366           sw itch( str_ action_typ e )
        3367           {
        3368           ca se "show": return new  CAgencySh ow( this.e leTarget,  true ) ;
        3369           ca se "hide": return new  CAgencySh ow( this.e leTarget,  false ) ;
        3370  
        3371       case " flyin" : 
        3372           re turn new C AgencyFly( this.eleTa rget, acti on_setting , true);
        3373       case " flyout" : 
        3374           re turn new C AgencyFly( this.eleTa rget, acti on_setting , false);
        3375       case " spiralin" 
        3376           re turn new C AgencySpir al(this.el eTarget, a ction_sett ing, true) ;
        3377       case " spiralout"  : 
        3378           re turn new C AgencySpir al(this.el eTarget, a ction_sett ing, false );
        3379       case " zoomin" :
        3380           re turn new C AgencyZoom (this.eleT arget, act ion_settin g, true);
        3381       case " zoomout" :  
        3382           re turn new C AgencyZoom (this.eleT arget, act ion_settin g, false);
        3383       case " elastic" :  
        3384                    retu rn new CAg encyElasti c(this.ele Target, ac tion_setti ng);
        3385                    
        3386       case " fadein" : 
        3387           re turn new C AgencyAlph a(this.ele Target, ac tion_setti ng, true)  ;
        3388       case " fadeout" :
        3389           re turn new C AgencyAlph a(this.ele Target, ac tion_setti ng, false)  ;
        3390       case " rockrollst atic" :
        3391       case " rockroll"  :
        3392           re turn  new  CAgencyWav e(this.ele Target, ac tion_setti ng, false)  ;
        3393    
        3394       case " glow":
        3395           re turn  new  CAgencyGlo w(this.ele Target,act ion_settin g);
        3396       case " dropshadow ":
        3397           re turn new C AgencyDrop Shadow(thi s.eleTarge t,action_s etting);
        3398       case " transition " :
        3399           re turn new C AgencyReve alTrans(th is.eleTarg et,action_ setting) ;
        3400       case " blur" :
        3401           re turn  new  CAgencyBlu r(this.ele Target,act ion_settin g) ;
        3402  
        3403       case " fliph" : / / all thes e 4 do NOT  need any  parameters
        3404       case " flipv" :
        3405       case " invert":
        3406       case " gray" :
        3407           re turn new C AgencyChan geFilter(t his.eleTar get, str_a ction_type ) ;
        3408       
        3409       case " fontchange ": // the  effects be low change  the style  on the fl y, so won' t work in  Navigator
        3410           re turn new C AgencyFont Change(thi s.eleTarge t,action_s etting) ;
        3411       case " boderchang e": 
        3412       case " stylechang e":
        3413           re turn new C AgencyChan geStyle(th is.eleTarg et,action_ setting);
        3414  
        3415           de fault: ret urn null;
        3416           }
        3417   }
        3418  
        3419   CTarget.pr ototype.Se tEventMana ger = func tion( 
        3420           on e_event_ty pe,str_act ion_type,a ction_sett ing,event_ additional )
        3421   {// to set  the event  manager w ith specif ied action  
        3422           if ( typeof(  one_event_ type ) !=  "string" | |     
        3423                    type of( str_ac tion_type  ) != "stri ng"||
        3424                    type of( action _setting )  != "strin g" )
        3425                    retu rn false;
        3426           if ( typeof(t his.objMan ager[one_e vent_type] ) == "unde fined" )
        3427           {
        3428                    this .objManage r[one_even t_type] =  new Object ();
        3429                    this .objManage r[one_even t_type].le ngth = 0;
        3430           }
        3431           
        3432           va r eventAge ncy = this .GetAgency Object(str _action_ty pe,action_ setting);
        3433           if ( eventAge ncy != nul l )
        3434           {
        3435                    var  ct = this. objManager [one_event _type].len gth ++;
        3436                    this .objManage r[one_even t_type][ct ] = eventA gency;
        3437                    
        3438                    if(  one_event_ type == "b sscpagecli ck" )
        3439                    {//  to deal wi th the "nu mber of pa geclick" s tuff
        3440                             if( ty peof(event _additiona l) == "num ber" )
        3441                                      this.obj Manager[on e_event_ty pe][ct].nP ageClick =  event_add itional;
        3442                             else / / set the  default nu mber 
        3443                                      this.obj Manager[on e_event_ty pe][ct].nP ageClick =  1;
        3444                             
        3445                             if( (t ypeof(this .objManage r.nMinPage ClickIndex ) == "unde fined") ||
        3446                                 (t his.objMan ager[one_e vent_type] [ct].nPage Click < 
        3447                                               this.objMa nager[one_ event_type ][this.obj Manager.nM inPageClic kIndex].nP ageClick)  )
        3448                                      this.obj Manager.nM inPageClic kIndex = c t;
        3449                    }
        3450                    
        3451                    //hi de the obj ect blindl y,SetState  function  will take  care of th e final co rrect stat e
        3452                    if(  ((one_even t_type ==  "bsscpagec lick") && 
        3453                              (this .objManage r[one_even t_type][ct ].nPageCli ck == 1))  ||
        3454                             one_ev ent_type = = "bsscpag eload" ||
        3455                             one_ev ent_type = = "bssctri gger1" )
        3456                             CCSSP. ShowObject ( this.ele Target, fa lse );
        3457                    
        3458                    if(  one_event_ type == "b ssctrigger 1" || one_ event_type  == "bssct rigger2" )
        3459                             if( ty peof( this .strTrigge rEvent ) = = "undefin ed" )
        3460                                      this.str TriggerEve nt = ( one _event_typ e == "bssc trigger1"  ) ? "bssct rigger2" :  "bssctrig ger1";
        3461                             
        3462                    retu rn true;
        3463           }
        3464           re turn false ;
        3465   }
        3466  
        3467   CTarget.pr ototype.On Event = fu nction( st rBsscEvent ,event )
        3468   {// respon se to the  event ( bs sc format  )
        3469           if ( typeof(t his.objMan ager[strBs scEvent])  == "object " )
        3470           {  // to get  the event  agency fro m the even t manager
        3471                    var  eventAgenc y = this.o bjManager[ strBsscEve nt];
        3472                    for(  var i = 0 ; i < even tAgency.le ngth; i++  )
        3473                    {
        3474                             if( st rBsscEvent  == "bsscp ageclick"  && 
        3475                                      eventAge ncy[i].nPa geClick !=  CTarget.n PageClickC ounter )
        3476                                       continu e;
        3477                             else i f( strBssc Event == " bsschover"  && event. type == "m ouseout" )
        3478                                      eventAge ncy[i].End Effect();
        3479                             else / / to invok e the unif ied functi on in effe ct object 
        3480                                      eventAge ncy[i].Upd ateEffect( ); 
        3481                    }
        3482           }
        3483   }
        3484  
        3485   CTarget.pr ototype.Se tState = f unction( s trBsscEven t )
        3486   {
        3487           if ( typeof(t his.objMan ager[strBs scEvent])  != "object " )
        3488                    retu rn false;
        3489  
        3490           //  to get th e event ag ency from  the event  manager
        3491           va r eventAge ncy = this .objManage r[strBsscE vent];
        3492           
        3493           if ( strBsscE vent == "b sscpagecli ck" )
        3494           {/ / we only  set the in itial stat e for the  minium num ber of pag eclick 
        3495                    if ( this.objMa nager.nMin PageClickI ndex == 'u ndefined')
        3496                         this.objMa nager.nMin PageClickI ndex = 0 ;
        3497                    even tAgency[th is.objMana ger.nMinPa geClickInd ex].Prepar eEffect();
        3498                    retu rn true;
        3499           }
        3500           el se
        3501           {
        3502                    for(  var i = 0 ; i < even tAgency.le ngth; i++  )
        3503                             eventA gency[i].P repareEffe ct(); // t o invoke t he unified  function  in effect  object        
        3504                    if(  i > 0 )
        3505                             return  true;
        3506                    else
        3507                             return  false;
        3508           }
        3509   }
        3510   //End the  definition  of class  CTarget
        3511  
        3512   //Begin th e definiti on of CEng ine class
        3513   function C Engine(){} // all pro perities a re going b e "class"  properitie s
        3514  
        3515   // object  : as assoc iative arr ay of trig ger object s
        3516   CEngine.ob jTrigger =  new Objec t();
        3517   // object  : as assoc iative arr ay of targ et objects  
        3518   CEngine.ob jTarget =  new Object (); 
        3519  
        3520   // Array :  each elem ent is a C AgencyXXX  animation  object
        3521   CEngine.ar rAnimation  = new Arr ay();
        3522   CEngine.Pe rformAnima tion = fun ction( nIn dex )
        3523   {// animat ion : upda te effects  function
        3524           CE ngine.arrA nimation[n Index].Upd ateEffect( );
        3525   }
        3526  
        3527   CEngine.Ad dOneTrigge r = functi on(Trigger ID,Trigger Element)
        3528   {// add on e Trigger  object int o the trig ger array
        3529           if ( typeof(T riggerID)  != "string " || Trigg erElement  == null ||
        3530                typeof(T riggerElem ent) != "o bject" )
        3531                    retu rn;
        3532           if ( typeof(C Engine.obj Trigger[Tr iggerID] )  != "objec t" )
        3533                    CEng ine.objTri gger[Trigg erID] = ne w CTrigger (TriggerEl ement);
        3534   }
        3535           
        3536   CEngine.Ad dOneTarget  = functio n(TargetID , TargetEl ement)
        3537   {// add on e Target o bject into  the targe t array
        3538           if ( typeof(T argetID) ! = "string"  || Target Element ==  null ||
        3539                    type of(TargetE lement) !=  "object"  )
        3540                    retu rn;
        3541           if ( typeof(C Engine.obj Target[Tar getID]) !=  "object"  )
        3542                    CEng ine.objTar get[Target ID] = new  CTarget( T argetEleme nt );     
        3543   }
        3544  
        3545   CEngine.Se ndEventToO neTarget =  function( strTargetI D, strBssc Event,even t )
        3546   {// to act ivate one  target obj ect
        3547           if ( typeof(C Engine.obj Target[str TargetID])  == "objec t" ) 
        3548           {
        3549                    if(  strBsscEve nt == "bss ctrigger1"  || strBss cEvent ==  "bssctrigg er2" )
        3550                    {//n ow, the "b ssctrigger 1" and "bs sctrigger2 " work lik e a toggle
        3551                             if( st rBsscEvent  == CEngin e.objTarge t[strTarge tID].strTr iggerEvent  )
        3552                                      strBsscE vent = (st rBsscEvent  == "bssct rigger1")  ? "bssctri gger2" : " bssctrigge r1";
        3553                             CEngin e.objTarge t[strTarge tID].strTr iggerEvent  = strBssc Event;
        3554                    }
        3555                    CEng ine.objTar get[strTar getID].OnE vent( strB sscEvent,e vent );
        3556           }
        3557   }
        3558  
        3559   CEngine.Se ndEventToA llTarget =  function(  strBsscEv ent,event  )
        3560   { //to act ivate all  target ass ociative t o the BSSC  event
        3561           fo r( var str TargetID i n CEngine. objTarget  ) //to enu merate all  target
        3562                    CEng ine.SendEv entToOneTa rget( strT argetID, s trBsscEven t,event );
        3563   }
        3564  
        3565   CEngine.Se tOneTarget InitialSta te = funct ion( strTa rgetID )
        3566   {// only i nvoked aft er ALL eff ects for t he target  have been  set
        3567           if ( typeof(C Engine.obj Target[str TargetID])  == "objec t" ) 
        3568           {/ / to get t arget obje ct
        3569                    var  objTarget  = CEngine. objTarget[ strTargetI D];
        3570                    if(  objTarget. SetState(  "bsscpagel oad" ) ==  false )
        3571                    {
        3572                             objTar get.SetSta te( "bsscp ageclick"  );
        3573                             objTar get.SetSta te( "bssct rigger1" ) ;
        3574                    }
        3575           }
        3576   }
        3577  
        3578   CEngine.Ad justPageCl ickCounter  = functio n()
        3579   {
        3580           va r nAdjuste dClickCoun ter = CTar get.nPageC lickCounte r;
        3581           va r bAdjuste d = false;
        3582           fo r( var str TargetID i n CEngine. objTarget  ) //to enu merate all  target
        3583           {/ / try to f ind the mi num pageCl iclConter  greater th an CTarget .nPageClic kCounter
        3584                    var  objEventPa geClick =  CEngine.ob jTarget[st rTargetID] .objManage r.bsscpage click;
        3585                    if(  objEventPa geClick !=  null )
        3586                    {
        3587                             for( v ar i = 0;  i < objEve ntPageClic k.length;  i++ )
        3588                             {
        3589                                      var nOth erPageClic k = objEve ntPageClic k[i].nPage Click;
        3590                                      if( nOth erPageClic k == CTarg et.nPageCl ickCounter  )
        3591                                               return;
        3592                                      if( nOth erPageClic k > CTarge t.nPageCli ckCounter  )
        3593                                      {
        3594                                               if( !bAdju sted )
        3595                                               {
        3596                                                       nA djustedCli ckCounter  = nOtherPa geClick;
        3597                                                       bA djusted =  true;
        3598                                               }
        3599                                               else if( n OtherPageC lick < nAd justedClic kCounter )
        3600                                                       nA djustedCli ckCounter  = nOtherPa geClick;
        3601                                      }
        3602                             }
        3603                    }
        3604           }
        3605           CT arget.nPag eClickCoun ter = nAdj ustedClick Counter;
        3606   }
        3607  
        3608   CEngine.On PageLoad =  function( event)
        3609   {       
        3610           //  first, to  set all t arget's in itial stat e
        3611           fo r( var str TargetID i n CEngine. objTarget  )
        3612                    CEng ine.SetOne TargetInit ialState(  strTargetI D );
        3613           
        3614           //  to invoke  all targe t's onpage load handl er
        3615           CE ngine.Send EventToAll Target( "b sscpageloa d",event ) ;
        3616   }
        3617  
        3618   CEngine.On PageClick  = function (event)
        3619   { // to in voke all t arget's on pageclick  handler
        3620           va r src = CC SSP.GetEve ntElement(  arguments [0] );
        3621           if ( src == n ull )
        3622                    retu rn;
        3623                    
        3624           va r objClick edTrigger  = null;
        3625           fo r( var str TriggerID  in CEngine .objTrigge r )
        3626           {  // to dete ct which t rigger is  clicked
        3627                    if(  CCSSP.IsDe scendant(  CEngine.ob jTrigger[s trTriggerI D].eleTrig ger,src) )
        3628                    {
        3629                             objCli ckedTrigge r = CEngin e.objTrigg er[strTrig gerID];
        3630                             break;
        3631                    }
        3632           }
        3633           
        3634           if ( objClick edTrigger  != null) / / the clic ked trigge r found
        3635                    objC lickedTrig ger.OnTrig gerClick(e vent);
        3636           el se // no t rigger is  clicked
        3637           {  // to send  PageClick  event to  all target
        3638                    CTar get.nPageC lickCounte r++;
        3639                    CEng ine.Adjust PageClickC ounter();
        3640                    CEng ine.SendEv entToAllTa rget( "bss cpageclick " ,event);
        3641           }
        3642   }       
        3643  
        3644   CEngine.On MouseOver  = function (event)
        3645   { // to in voke all t arget's on pageload h andler
        3646           va r src = CC SSP.GetEve ntElement(  arguments [0] );
        3647           if ( src == n ull )
        3648                    retu rn;
        3649                    
        3650           va r strHover edTargetID  = null;
        3651           fo r( var str TargetID i n CEngine. objTarget  )
        3652           {  // to dete ct which T arget is h overing on
        3653                    if(  CCSSP.IsDe scendant(  CEngine.ob jTarget[st rTargetID] .eleTarget , src ) )
        3654                {
        3655                             strHov eredTarget ID = strTa rgetID;
        3656                             break;
        3657                }
        3658           }
        3659           
        3660           if ( strHover edTargetID  != null )  // the ho vered targ et found
        3661                    CEng ine.SendEv entToOneTa rget( strH overedTarg etID, "bss chover",ev ent );
        3662   }
        3663  
        3664   CEngine.Bu ildTargetO bject = fu nction(tar get_ID,eve nt_type,ac tion_type,
        3665                             action _setting,  event_addi tional)
        3666   {// to bui ld target  object 
        3667           //  to get th e target o bject
        3668           if ( typeof(  CEngine.ob jTarget[ta rget_ID] )  != "objec t" )
        3669                    retu rn false;/ / the engi ne's AddOn eTarget fu nction mig ht have fa iled.
        3670           va r TargetOb ject = CEn gine.objTa rget[targe t_ID];
        3671           
        3672           //  to prepar e the para meters for  the event  manager
        3673           va r arrEvent  = event_t ype.split( "|"); // t o split th e combined  event_typ e string
        3674           va r arrActio n = action _type.spli t("|");//t o split th e combined  action_ty pe string
        3675           fo r( var tri m = 0; tri m < arrEve nt.length;  trim++ )
        3676                    arrE vent[trim]  = CCSSP.T rimSpace(a rrEvent[tr im]);
        3677           
        3678           fo r( trim =  0; trim <  arrAction. length; tr im++ )
        3679                    arrA ction[trim ] = CCSSP. TrimSpace( arrAction[ trim]);
        3680           
        3681           va r arrSetti ng = new A rray(); 
        3682           if ( typeof(a ction_sett ing) == "s tring" )
        3683                    arrS etting = a ction_sett ing.split( "|");// to  split the  combined  action_set ting strin g
        3684           //  to calibr ate the ar rays
        3685           fo r( var i =  arrSettin g.length;  i < arrAct ion.length ; i++ )
        3686           {
        3687                    if(  typeof(arr Setting[i] ) != "stri ng" )
        3688                              arrSe tting[i] =  "";
        3689           }                                    
        3690  
        3691           //  to prepar e for deal ing with t he absolut e posionin g element
        3692           Ta rgetObject .eleTarget .ABSX = CC SSP.GetObj ectLeft( T argetObjec t.eleTarge t );
        3693           Ta rgetObject .eleTarget .ABSY = CC SSP.GetObj ectTop( Ta rgetObject .eleTarget  );
        3694  
        3695           if ( arrEvent .length >  1 )
        3696           {/ / if event  is combin ed, it mus t be : "bs sctrigger1  | bssctri gger2"
        3697                    if(  arrAction. length !=  2 )
        3698                             return  false; //  if event  is combine d, there m ust be 2 a ctions
        3699                    for(  i = 0 ; i  < 2; i++  )
        3700                    {
        3701                             if( Ta rgetObject .SetEventM anager(arr Event[i],  arrAction[ i], 
        3702                                      arrSetti ng[i], eve nt_additio nal) == fa lse )
        3703                                      return f alse; // t he event m anager has  not been  set up
        3704                    }
        3705           }
        3706           el se // the  event_type  string is  not combi ned
        3707           {
        3708                    for(  i = 0 ; i  < arrActi on.length;  i++ )
        3709                    {
        3710                             Target Object.Set EventManag er(event_t ype, arrAc tion[i], a rrSetting[ i], event_ additional );
        3711                             // to  validate t he event m anager
        3712                             if( ty peof(Targe tObject.ob jManager[e vent_type] ) != "obje ct" ||
        3713                                               typeof(Tar getObject. objManager [event_typ e][i]) !=  "object" )
        3714                                      return f alse; // t he event m anager has  not been  set up
        3715                    }
        3716           }
        3717           re turn true;
        3718   }
        3719  
        3720   CEngine.Bu ildTrigger Object = f unction(tr igger_ID,  target_ID)
        3721   {// to bui ld the tri gger objec t
        3722           va r arrTrigg er = trigg er_ID.spli t("|"); //  to split  the combin ed trigger _ID string
        3723           fo r( var i =  0; i < ar rTrigger.l ength; i + + )
        3724           {/ / to get t he trigger  element t hen add it  to the tr igger list
        3725                    arrT rigger[i]  = CCSSP.Tr imSpace( a rrTrigger[ i] );
        3726                    var  eleTrigger  = CCSSP.G etObject(  arrTrigger [i] );
        3727                    if(  eleTrigger  == null )
        3728                             contin ue; // the  trigger_I D string i n the HTML  code mayb e wrong
        3729                    CEng ine.AddOne Trigger( a rrTrigger[ i], eleTri gger );
        3730  
        3731                    // t o get the  target obj ect
        3732                    if(  typeof( th is.objTrig ger[arrTri gger[i]] )  != "objec t" )
        3733                             contin ue;// the  engine's A ddOneTarge t function  might hav e failed.
        3734                    CEng ine.objTri gger[arrTr igger[i]]. AddTargetI D( target_ ID );
        3735           }
        3736   }
        3737   //End the  definition  of CEngin e class
        3738  
        3739   /// Sectio n End  - C CSSP DHTM  1 (JavaScr ipt 1.2)
        3740  
        3741   /// Sectio n Begin  -  CCSSP DHT M 2 (JavaS cript 1.2)
        3742  
        3743   //Begin th e definiti on of CAge ncyXXXX cl asses
        3744  
        3745   //Begin of  the CAgen cyShow def inition
        3746   function C AgencyShow ( element,  bIsShow )
        3747   {
        3748           th is.ele = e lement;
        3749           th is.bIsShow  = bIsShow ;
        3750   }
        3751  
        3752   CAgencySho w.prototyp e.PrepareE ffect = fu nction()
        3753   {
        3754           CC SSP.ShowOb ject( this .ele, !thi s.bIsShow  );
        3755   }
        3756  
        3757   CAgencySho w.prototyp e.UpdateEf fect = fun ction()
        3758   {
        3759           CC SSP.ShowOb ject( this .ele, this .bIsShow ) ;
        3760   }
        3761  
        3762   CAgencySho w.prototyp e.EndEffec t = functi on()
        3763   {
        3764           CC SSP.ShowOb ject( this .ele, !thi s.bIsShow  );
        3765   }
        3766   // End of  the CAgenc yShow defi nition
        3767  
        3768   // Begin o f CAgencyF ly definit ion
        3769   function C AgencyFly(  element,  settings,  bIsIn )
        3770   {
        3771           th is.ele = e lement;
        3772           th is.bIsIn =  bIsIn;
        3773           th is.duratio n = 1000;  // default
        3774           th is.directi on = "righ t";
        3775  
        3776           va r arrAllSe t = settin gs.split(" ,");
        3777           fo r( var i =  0; i < ar rAllSet.le ngth; i ++  )
        3778           {/ / to retri eve the se tting
        3779                    arrA llSet[i] =  CCSSP.Tri mSpace(arr AllSet[i]) ;
        3780                    var  arrOneSet  = arrAllSe t[i].split ("=");
        3781                    for(  var j = 0 ; j < arrO neSet.leng th; j++ )
        3782                             arrOne Set[j] = C CSSP.TrimS pace(arrOn eSet[j]);
        3783                    swit ch( arrOne Set[0] )
        3784                    {
        3785                    case  "speed" :  this.dura tion = 100 000/arrOne Set[1]; br eak;
        3786                    case  "directio n" : this. direction  = arrOneSe t[1]; brea k;
        3787                    }
        3788           }
        3789                    
        3790           if ( this.ele .style.pos ition != " absolute"  )
        3791                    this .ele.style .position  = "relativ e";
        3792           th is.timer =  null;
        3793           th is.aniInde x = CEngin e.arrAnima tion.lengt h;
        3794           CE ngine.arrA nimation[t his.aniInd ex] = this ;
        3795   }
        3796  
        3797   CAgencyFly .prototype .PrepareEf fect = fun ction()
        3798   {
        3799           CC SSP.ShowOb ject(this. ele, !this .bIsIn );
        3800   }
        3801  
        3802   CAgencyFly .prototype .UpdateEff ect = func tion()
        3803   {
        3804           if ( this.tim er == null  )
        3805                    this .ResetPara meters();
        3806  
        3807           va r percent  = ((new Da te()).getT ime() - th is.startTi me)/this.d uration;
        3808           if ( percent  >= 1.0 )
        3809                    this .EndEffect ();
        3810           el se
        3811           {
        3812                    var  newX = thi s.startX*( 1.0-percen t) +  this .finalX*pe rcent;
        3813                    var  newY = thi s.startY*( 1.0-percen t) +  this .finalY*pe rcent;
        3814                    CCSS P.MoveObje ctTo(this. ele, newX,  newY);
        3815                    CCSS P.SetTimer (this,20);
        3816           }
        3817   }
        3818  
        3819   CAgencyFly .prototype .EndEffect  = functio n()
        3820   {
        3821           cl earInterva l( this.ti mer );
        3822           th is.timer =  null;
        3823  
        3824           if ( this.bIs In ) // Fl yIn
        3825                    CCSS P.MoveObje ctTo(this. ele, this. finalX, th is.finalY) ;
        3826           el se // FlyO ut
        3827                    CCSS P.MoveObje ctTo(this. ele, this. startX, th is.startY) ;
        3828           CC SSP.ShowOb ject(this. ele, this. bIsIn );
        3829   }
        3830  
        3831   CAgencyFly .prototype .ResetPara meters = f unction()
        3832   {
        3833           th is.Prepare Effect();
        3834           CC SSP.ShowOb ject(this. ele, true  );
        3835  
        3836           th is.startX  = 0;
        3837           th is.startY  = 0;
        3838           th is.finalX  = 0;
        3839           th is.finalY  = 0; 
        3840           
        3841           va r offsetLe ft = CCSSP .GetObject WindowLeft (this.ele)  + this.el e.offsetWi dth;
        3842           va r offsetTo p = CCSSP. GetObjectW indowTop(t his.ele) +  this.ele. offsetHeig ht;
        3843           va r offsetRi ght = CCSS P.GetWindo wRight();
        3844           va r offsetBo ttom = CCS SP.GetWind owBottom() ;
        3845  
        3846           if ( this.bIs In )
        3847           {  // FlyIn
        3848                    this .finalX =  this.ele.A BSX;
        3849                    this .finalY =  this.ele.A BSY;
        3850  
        3851                    swit ch( this.d irection )
        3852                    {
        3853                    case  "right":  this.start X = offset Right; thi s.startY =  this.fina lY; break;
        3854                    case  "left": t his.startX  = -offset Left;  thi s.startY =  this.fina lY; break;
        3855                    case  "down": t his.startY  = offsetB ottom; thi s.startX =  this.fina lX; break;
        3856                    case  "up":  th is.startY  = -offsetT op;    thi s.startX =  this.fina lX; break;
        3857                    case  "downrigh t":
        3858                             this.s tartX = (  offsetBott om < offse tRight) ?  offsetBott om : offse tRight;
        3859                             this.s tartY = th is.startX;                break;
        3860                    case  "upright" :
        3861                             this.s tartX = (o ffsetTop <  offsetRig ht)? offse tTop : off setRight;
        3862                             this.s tartY = -t his.startX ;              break;
        3863                    case  "upleft":
        3864                             this.s tartX = -( (offsetTop  < offsetR ight)? off setTop : o ffsetRight );
        3865                             this.s tartY = th is.startX;                break;
        3866                    case  "downleft ":
        3867                             this.s tartX = -( ( offsetBo ttom < off setRight)  ? offsetBo ttom : off setRight);
        3868                             this.s tartY = -t his.startX ;     brea k;
        3869                    }
        3870           }
        3871           el se
        3872           {  // FlyOut
        3873                    this .startX =  this.ele.A BSX;
        3874                    this .startY =  this.ele.A BSY;
        3875  
        3876                    swit ch( this.d irection )
        3877                    {
        3878                    case  "right":  this.final X = offset Right;  th is.finalY  = this.sta rtY; break ;
        3879                    case  "left": t his.finalX  = -offset Left;   th is.finalY  = this.sta rtY;  brea k;
        3880                    case  "down": t his.finalY  = offsetB ottom;  th is.finalX  = this.sta rtX; break ;
        3881                    case  "up":  th is.finalY  = -offsetT op;     th is.finalX  = this.sta rtX; break ;
        3882                    case  "downrigh t":
        3883                             this.f inalX = (  offsetBott om < offse tRight) ?  offsetBott om : offse tRight;
        3884                             this.f inalY = th is.finalX;                break;
        3885                    case  "upright" :
        3886                             this.f inalX = (o ffsetTop <  offsetRig ht)? offse tTop : off setRight;
        3887                             this.f inalY = -t his.finalX ;              break;
        3888                    case  "upleft":
        3889                             this.f inalX = -( (offsetTop  < offsetR ight)? off setTop : o ffsetRight );
        3890                             this.f inalY = th is.finalX;                break;
        3891                    case  "downleft ":
        3892                             this.f inalX = -( ( offsetBo ttom < off setRight)  ? offsetBo ttom : off setRight);
        3893                             this.f inalY = -t his.finalX ;     brea k;
        3894                    }
        3895           }
        3896           CC SSP.MoveOb jectTo(thi s.ele, thi s.startX,  this.start Y);
        3897           th is.startTi me = (new  Date()).ge tTime();
        3898   }
        3899   // End of  the CAgenc yFly defin ition
        3900  
        3901   // Begin o f CAgencyS piral
        3902   function C AgencySpir al( elemen t, setting s, bIsIn )
        3903   {
        3904           th is.ele = e lement;
        3905           th is.bIsIn =  bIsIn;
        3906           th is.duratio n = 1000;  // default
        3907  
        3908           va r arrAllSe t = settin gs.split(" ,");
        3909           fo r( var i =  0; i < ar rAllSet.le ngth; i ++  )
        3910           {/ / to retri eve the se tting
        3911                    arrA llSet[i] =  CCSSP.Tri mSpace(arr AllSet[i]) ;
        3912                    var  arrOneSet  = arrAllSe t[i].split ("=");
        3913                    for(  var j = 0 ; j < arrO neSet.leng th; j++ )
        3914                             arrOne Set[j] = C CSSP.TrimS pace(arrOn eSet[j]);
        3915                    swit ch( arrOne Set[0] )
        3916                    {
        3917                    case  "speed" :  this.dura tion = 100 000/arrOne Set[1]; br eak;
        3918                    }
        3919           }
        3920  
        3921           if ( this.ele .style.pos ition != " absolute"  )
        3922                    this .ele.style .position  = "relativ e";
        3923           th is.timer =  null;
        3924           th is.aniInde x = CEngin e.arrAnima tion.lengt h;
        3925           CE ngine.arrA nimation[t his.aniInd ex] = this ;
        3926   }
        3927  
        3928   CAgencySpi ral.protot ype.Prepar eEffect =  function()
        3929   {
        3930           CC SSP.ShowOb ject(this. ele, !this .bIsIn );
        3931   }
        3932  
        3933   CAgencySpi ral.protot ype.Update Effect = f unction()
        3934   {
        3935           if ( this.tim er == null  )
        3936                    this .ResetPara meters();
        3937  
        3938           va r percent  = ((new Da te()).getT ime() - th is.startTi me)/this.d uration;
        3939           if ( percent  >= 1.0 )
        3940                    this .EndEffect ();
        3941           el se
        3942           {
        3943                    var  rf = (this .bIsIn)? ( 1.0 - perc ent) : per cent; 
        3944                    var  t = (1.0-r f) * 4.0 *  Math.PI
        3945                    var  rxP = (thi s.bIsIn)?  this.start X : this.f inalX; 
        3946                    var  ryP = (thi s.bIsIn)?  this.start Y : this.f inalY; 
        3947                    var  rx = (Math .abs(rxP)  < 200) ? M ath.abs(rx P) : 200;
        3948                    var  ry = (Math .abs(ryP)  < 200) ? M ath.abs(ry P) : 200;
        3949  
        3950                    var  newX = Mat h.ceil(-rf *Math.cos( t)*rx) + t his.ele.AB SX;
        3951                    var  newY = Mat h.ceil(-rf *Math.sin( t)*ry) + t his.ele.AB SY;
        3952                    CCSS P.MoveObje ctTo(this. ele, newX,  newY);
        3953                    CCSS P.SetTimer (this,20);
        3954           }
        3955   }
        3956  
        3957   CAgencySpi ral.protot ype.EndEff ect = func tion()
        3958   {
        3959           cl earInterva l( this.ti mer );
        3960           th is.timer =  null;
        3961           
        3962           if ( this.bIs In ) // In
        3963                    CCSS P.MoveObje ctTo(this. ele, this. finalX, th is.finalY) ;
        3964           el se // Out
        3965                    CCSS P.MoveObje ctTo(this. ele, this. startX, th is.startY) ;
        3966           CC SSP.ShowOb ject(this. ele, this. bIsIn );
        3967   }
        3968  
        3969   CAgencySpi ral.protot ype.ResetP arameters  = function ()
        3970   {
        3971           th is.Prepare Effect();
        3972           CC SSP.ShowOb ject(this. ele, true  );
        3973           th is.startX  = (this.bI sIn)? CCSS P.GetWindo wRight() :  this.ele. ABSX;
        3974           th is.startY  = (this.bI sIn)? CCSS P.GetWindo wBottom()  : this.ele .ABSY;
        3975           th is.finalX  = (this.bI sIn)? this .ele.ABSX  : CCSSP.Ge tWindowRig ht();
        3976           th is.finalY  = (this.bI sIn)? this .ele.ABSY  : CCSSP.Ge tWindowBot tom(); 
        3977           
        3978           CC SSP.MoveOb jectTo(thi s.ele, thi s.startX,  this.start Y);
        3979           th is.startTi me = (new  Date()).ge tTime();
        3980   }
        3981   // End of  CAgencySpi ral
        3982  
        3983   // Begin o f CAgencyE lastic
        3984   function C AgencyElas tic( eleme nt, settin gs)
        3985   {
        3986           th is.ele = e lement;
        3987           th is.duratio n = 1000;  // default
        3988           th is.directi on = "righ t";
        3989  
        3990           va r arrAllSe t = settin gs.split(" ,");
        3991           fo r( var i =  0; i < ar rAllSet.le ngth; i ++  )
        3992           {/ / to retri eve the se tting
        3993                    arrA llSet[i] =  CCSSP.Tri mSpace(arr AllSet[i]) ;
        3994                    var  arrOneSet  = arrAllSe t[i].split ("=");
        3995                    for(  var j = 0 ; j < arrO neSet.leng th; j++ )
        3996                             arrOne Set[j] = C CSSP.TrimS pace(arrOn eSet[j]);
        3997                    swit ch( arrOne Set[0] )
        3998                    {
        3999                    case  "speed" :  this.dura tion = 100 000/arrOne Set[1]; br eak;
        4000                    case  "directio n" : this. direction  = arrOneSe t[1]; brea k;
        4001                    }
        4002           }
        4003                    
        4004           if ( this.ele .style.pos ition != " absolute"  )
        4005                    this .ele.style .position  = "relativ e";
        4006           th is.timer =  null;
        4007           th is.aniInde x = CEngin e.arrAnima tion.lengt h;
        4008           CE ngine.arrA nimation[t his.aniInd ex] = this ;
        4009   }
        4010  
        4011   CAgencyEla stic.proto type.Prepa reEffect =  function( )
        4012   {
        4013           CC SSP.ShowOb ject(this. ele, false  );
        4014   }
        4015  
        4016   CAgencyEla stic.proto type.Updat eEffect =  function()
        4017   {
        4018           if ( this.tim er == null  )
        4019                    this .ResetPara meters();
        4020  
        4021           va r percent  = ((new Da te()).getT ime() - th is.startTi me)/this.d uration;
        4022           if ( percent  >= 1.0 )
        4023                    this .EndEffect ();
        4024           el se
        4025           {
        4026                    var  newX = thi s.startX;
        4027                    var  newY = thi s.startY;
        4028                    var  rf = Math. exp(-perce nt*3);
        4029                    var  t = percen t * 1.5 *  Math.PI
        4030                    var  rx = (Math .abs(this. startX) >  Math.abs(t his.startY )) ? this. startX : t his.startY ;
        4031                    swit ch (this.d irection )
        4032                    {
        4033                    case  "left":    
        4034                    case  "right" :  newX = rf *Math.cos( t)*rx + th is.ele.ABS X; break;
        4035                    case  "up":          
        4036                    case  "down" :   newY = rf *Math.cos( t)*rx + th is.ele.ABS X; break;
        4037                    }
        4038                    CCSS P.MoveObje ctTo(this. ele, newX,  newY);
        4039                    CCSS P.SetTimer (this,20);
        4040           }
        4041   }
        4042  
        4043   CAgencyEla stic.proto type.EndEf fect = fun ction()
        4044   {
        4045           CC SSP.MoveOb jectTo(thi s.ele, thi s.finalX,  this.final Y);
        4046           cl earInterva l( this.ti mer );
        4047           th is.timer =  null;
        4048   }
        4049  
        4050   CAgencyEla stic.proto type.Reset Parameters  = functio n()
        4051   {
        4052           CC SSP.ShowOb ject(this. ele, true  );
        4053           th is.startX  = this.ele .ABSX;
        4054           th is.finalX  = this.ele .ABSX;
        4055           th is.startY  = this.ele .ABSY;
        4056           th is.finalY  = this.ele .ABSY;
        4057           
        4058           sw itch (this .direction )
        4059           { 
        4060           ca se "left":   this.sta rtX = -thi s.ele.offs etWidth; b reak;
        4061           ca se "right" : this.sta rtX = this .ele.offse tWidth;  b reak;
        4062           ca se "up":     this.sta rtY = -thi s.ele.offs etHeight;b reak;
        4063           ca se "down":   this.sta rtY = this .ele.offse tHeight; b reak;
        4064           }
        4065           CC SSP.MoveOb jectTo(thi s.ele, thi s.startX,  this.start Y);
        4066           th is.startTi me = (new  Date()).ge tTime();
        4067   }
        4068   // End of  CAgencyEla stic
        4069  
        4070   // Begin o f CAgencyZ oom
        4071   function C AgencyZoom ( element,  settings,  bIsIn)
        4072   {
        4073           th is.ele = e lement;
        4074           th is.duratio n = 1000;  // default
        4075           
        4076           va r arrAllSe t = settin gs.split(" ,");
        4077           fo r( var i =  0; i < ar rAllSet.le ngth; i ++  )
        4078           {/ / to retri eve the se tting
        4079                    arrA llSet[i] =  CCSSP.Tri mSpace(arr AllSet[i]) ;
        4080                    var  arrOneSet  = arrAllSe t[i].split ("=");
        4081                    for(  var j = 0 ; j < arrO neSet.leng th; j++ )
        4082                             arrOne Set[j] = C CSSP.TrimS pace(arrOn eSet[j]);
        4083                    swit ch( arrOne Set[0] )
        4084                    {
        4085                    case  "speed" :  this.dura tion = 100 000/arrOne Set[1]; br eak;
        4086                    }
        4087           }
        4088  
        4089           th is.bIsIn =  bIsIn;
        4090           th is.timer =  null;
        4091           th is.aniInde x = CEngin e.arrAnima tion.lengt h;
        4092           CE ngine.arrA nimation[t his.aniInd ex] = this ;
        4093   }
        4094  
        4095   CAgencyZoo m.prototyp e.PrepareE ffect = fu nction()
        4096   {
        4097           CC SSP.ShowOb ject(this. ele, false );
        4098   }
        4099  
        4100   CAgencyZoo m.prototyp e.UpdateEf fect = fun ction()
        4101   {
        4102           if ( this.tim er == null  )
        4103                    this .ResetPara meters();
        4104  
        4105           va r percent  = ((new Da te()).getT ime() - th is.startTi me)/this.d uration;
        4106           if ( percent  >= 1.0 )
        4107                    this .EndEffect ();
        4108           el se
        4109           {
        4110                    var  nFactorIn  = Math.cei l(50+50*pe rcent);
        4111                    var  nFactorOut  = Math.ce il(100+200 *(1-percen t));
        4112                    var  AlterFonts ize = ((th is.bIsIn)?  nFactorIn  : nFactor Out) + "%" ;
        4113                    var  AlterFacto r = ((this .bIsIn)? n FactorIn :  nFactorOu t) / 100;
        4114                    
        4115                    this .UpdateEff ectAllChil dren(this. ele, Alter Fontsize,  AlterFacto r);
        4116                    var  arr ;
        4117                    if ( this.ele.a ll)
        4118                         arr = this .ele.all ;
        4119                    else
        4120                         arr = this .ele.getEl ementsByTa gName ('*' );
        4121                    for( var index  = 0; index  < arr.len gth; index ++)
        4122                             this.U pdateEffec tAllChildr en(arr[ind ex], Alter Fontsize,  AlterFacto r);
        4123                             
        4124                    CCSS P.SetTimer (this,20);
        4125           }
        4126   }
        4127  
        4128   CAgencyZoo m.prototyp e.UpdateEf fectAllChi ldren = fu nction(chi ld, FontSi ze, Factor )
        4129   {
        4130           if ( CCSSP.Is TextTag(ch ild) )
        4131                    chil d.style.fo ntSize = F ontSize;
        4132           el se
        4133           {
        4134                    if(  typeof(chi ld.orgWidt h) == "num ber" )
        4135                             child. style.widt h = Factor  * child.o rgWidth;
        4136                    if(  typeof(chi ld.orgHeig ht) == "nu mber" )
        4137                             child. style.heig ht = Facto r * child. orgHeight;
        4138           }
        4139   }
        4140  
        4141   CAgencyZoo m.prototyp e.EndEffec t = functi on()
        4142   {
        4143           th is.EndEffe ctAllChild ren(this.e le);
        4144           va r arr ;
        4145           if (this.ele. all)
        4146                arr = th is.ele.all  ;
        4147           el se
        4148                arr = th is.ele.get ElementsBy TagName('* ');
        4149           fo r(var inde x = 0; ind ex < arr.l ength; ind ex++)
        4150                    this .EndEffect AllChildre n(arr[inde x]);
        4151           
        4152           cl earInterva l( this.ti mer );
        4153           th is.timer =  null;
        4154   }
        4155  
        4156   CAgencyZoo m.prototyp e.EndEffec tAllChildr en = funct ion( child  )
        4157   {       
        4158           if ( CCSSP.Is TextTag(ch ild) )
        4159                    chil d.style.fo ntSize = c hild.orgFo ntSize;
        4160           el se
        4161           {
        4162                    if(  typeof(chi ld.intactW idth) != " undefined"  )
        4163                    {
        4164                             child. width = ch ild.intact Width;
        4165                             child. height = c hild.intac tHeight;
        4166                    }
        4167                    else  if( typeo f(child.st yle.intact PixelWidth ) != "unde fined" )
        4168                    {
        4169                             child. style.pixe lWidth = c hild.style .intactPix elWidth;
        4170                             child. style.pixe lHeight =  child.styl e.intactPi xelHeight;
        4171                    }
        4172           }
        4173   }
        4174  
        4175   CAgencyZoo m.prototyp e.ResetPar ameters =  function()
        4176   {
        4177           th is.Prepare Effect();
        4178           th is.ResetPa rametersAl lChildren(  this.ele  );
        4179           va r arr ;
        4180           if  (this.ele .all)
        4181                arr = th is.ele.all  ;
        4182           el se
        4183                arr = th is.ele.get ElementsBy TagName('* ');
        4184           fo r(var inde x = 0; ind ex < arr.l ength; ind ex++)
        4185                    this .ResetPara metersAllC hildren(ar r[index]);
        4186                    
        4187           th is.startTi me = (new  Date()).ge tTime();
        4188   }
        4189  
        4190   CAgencyZoo m.prototyp e.ResetPar ametersAll Children =  function(  child )
        4191   {
        4192           CC SSP.ShowOb ject(child , true );
        4193           if ( (child.t agName ==  "DIV") &&  (getParent Node(child ).tagName  == "TD") )
        4194                    chil d.width =  "100%";//  if the div  is inside  a cell of  table, we  need the  this hack
        4195           
        4196           if ( CCSSP.Is TextTag(ch ild) )
        4197                    chil d.orgFontS ize = chil d.style.fo ntSize;
        4198           el se
        4199           {
        4200                    if(  child.widt h > "" ||  child.heig ht > "" )
        4201                    {
        4202                             child. orgWidth =  child.int actWidth =  child.wid th;
        4203                             child. orgHeight  = child.in tactHeight  = child.h eight;
        4204                    }
        4205                    else  if( ( typ eof(child. orgWidth)  != "number " ) && (ty peof(child .orgHeight ) != "numb er") )
        4206                    {
        4207                             child. orgWidth =  child.sty le.intactP ixelWidth  = child.st yle.pixelW idth;
        4208                             child. orgHeight  = child.st yle.intact PixelHeigh t = child. style.pixe lHeight;
        4209                    }
        4210           }
        4211   }
        4212   // End of  CAgencyZoo m
        4213  
        4214   //// the f ollowing e ffects wil l use IE's  exclusive  "filter"  function / ///
        4215   // Begin o f CAgencyA lpha defin ition
        4216   function C AgencyAlph a( element , settings , bIsIn )
        4217   {// becaus e of "visu al filter"  style, th is won't w ork in Nav igator
        4218           th is.ele = e lement;
        4219           th is.bIsIn =  bIsIn;
        4220  
        4221           //  to set th e default  value
        4222           th is.startOp acity = (t his.bIsIn)  ? 0 : 100 ;
        4223           th is.endOpac ity = (thi s.bIsIn) ?  100 : 0;
        4224           
        4225           th is.duratio n = 1000;  // default
        4226           
        4227           va r arrAllSe t = settin gs.split(" ,");
        4228           fo r( var i =  0; i < ar rAllSet.le ngth; i ++  )
        4229           {/ / to retri eve the se tting
        4230                    arrA llSet[i] =  CCSSP.Tri mSpace(arr AllSet[i]) ;
        4231                    var  arrOneSet  = arrAllSe t[i].split ("=");
        4232                    for(  var j = 0 ; j < arrO neSet.leng th; j++ )
        4233                             arrOne Set[j] = C CSSP.TrimS pace(arrOn eSet[j]);
        4234                    swit ch( arrOne Set[0] )
        4235                    {
        4236                    case  "speed" :  this.dura tion = 100 000/arrOne Set[1]; br eak;
        4237                    }
        4238           }
        4239           
        4240           th is.timer =  null;
        4241           th is.aniInde x = CEngin e.arrAnima tion.lengt h;
        4242           CE ngine.arrA nimation[t his.aniInd ex] = this ;
        4243   }
        4244  
        4245   CAgencyAlp ha.prototy pe.Prepare Effect = f unction()
        4246   {// to set  the visua l filter f unction
        4247           //  the visua l filter O NLY work w hen set by  "Width an d Height"  or
        4248           //  absolute  position f or DIV, SP AN and nor mal tag (  such as p  )
        4249           //  but, "abs olute" cau se the fol lowing ele ments over lap, so:
        4250           CC SSP.Prepar eFilter( t his.ele );
        4251           CC SSP.ShowOb ject(this. ele, !this .bIsIn );
        4252   }
        4253  
        4254   CAgencyAlp ha.prototy pe.UpdateE ffect = fu nction()
        4255   {// to set  the visua l filter f unction
        4256           if ( this.tim er == null  )
        4257                    this .ResetPara meters();
        4258           if ( typeof(t his.ele.fi lters.alph a) != "obj ect" )
        4259           {
        4260                    this .EndEffect ();
        4261                    retu rn;
        4262           }
        4263  
        4264           va r percent  = ((new Da te()).getT ime() - th is.startTi me)/this.d uration;
        4265           if ( percent  >= 1.0 )
        4266                    this .EndEffect ();
        4267           el se if( typ eof(this.e le.filters .alpha) ==  "object"  )
        4268           {
        4269                    this .ele.filte rs.alpha.o pacity = t his.startO pacity*(1. 0-percent)  + this.en dOpacity*p ercent;
        4270                    CCSS P.SetTimer (this,20);
        4271           }
        4272   }
        4273  
        4274   CAgencyAlp ha.prototy pe.EndEffe ct = funct ion()
        4275   {// to rem ove the vi sual filte r function
        4276           cl earInterva l( this.ti mer );
        4277           th is.timer =  null;
        4278           th is.ele.sty le.filter  = "";
        4279           CC SSP.ShowOb ject(this. ele, this. bIsIn );
        4280   }
        4281  
        4282   CAgencyAlp ha.prototy pe.ResetPa rameters =  function( )
        4283   {
        4284           th is.Prepare Effect();
        4285           CC SSP.ShowOb ject(this. ele, true  );
        4286           th is.ele.sty le.filter  = "alpha(o pacity=" +  this.star tOpacity +  ")";
        4287           th is.startTi me = (new  Date()).ge tTime();
        4288   }
        4289   // End of  the CAgenc yAlpha def inition
        4290  
        4291   // Begin o f CAgencyW ave defini tion
        4292   function C AgencyWave ( element,  settings  )
        4293   {// becaus e of "visu al filter"  style, th is won't w ork in Nav igator
        4294           th is.ele = e lement;
        4295  
        4296           th is.duratio n = 0; //  default
        4297           th is.strengt h = 10;
        4298           th is.freq =  1;
        4299           th is.lightst rength = 1 ;
        4300           
        4301           va r arrAllSe t = settin gs.split(" ,");
        4302           fo r( var i =  0; i < ar rAllSet.le ngth; i ++  )
        4303           {/ / to retri eve the se tting
        4304                    arrA llSet[i] =  CCSSP.Tri mSpace(arr AllSet[i]) ;
        4305                    var  arrOneSet  = arrAllSe t[i].split ("=");
        4306                    for(  var j = 0 ; j < arrO neSet.leng th; j++ )
        4307                             arrOne Set[j] = C CSSP.TrimS pace(arrOn eSet[j]);
        4308                    swit ch( arrOne Set[0] )
        4309                    {
        4310                    case  "duration " : this.d uration =  100000/arr OneSet[1];  break;
        4311                    case  "strength " : this.s trength =  arrOneSet[ 1]; break;
        4312                    case  "freq" :  this.freq  = arrOneSe t[1]; brea k;
        4313                    case  "lightstr ength" : t his.lights trength =  arrOneSet[ 1]; break;
        4314                    }
        4315           }
        4316  
        4317           th is.timer =  null;
        4318           th is.aniInde x = CEngin e.arrAnima tion.lengt h;
        4319           CE ngine.arrA nimation[t his.aniInd ex] = this ;
        4320   }
        4321  
        4322   CAgencyWav e.prototyp e.PrepareE ffect = fu nction()
        4323   {// to set  the visua l filter f unction
        4324           CC SSP.Prepar eFilter(th is.ele);
        4325  
        4326           CC SSP.ShowOb ject(this. ele, true  );
        4327   }
        4328  
        4329   CAgencyWav e.prototyp e.UpdateEf fect = fun ction()
        4330   {// to set  the visua l filter f unction
        4331           if ( this.tim er == null  )
        4332                    this .ResetPara meters();
        4333           if ( (typeof( this.ele.f ilters) ==  "undefine d") || (ty peof(this. ele.filter s.wave) !=  "object"  ) )
        4334           {
        4335                    this .EndEffect ();
        4336                    retu rn;
        4337           }
        4338  
        4339           if ( this.dur ation > 0  )
        4340           {
        4341                    var  percent =  ((new Date ()).getTim e() - this .startTime )/this.dur ation;
        4342                    if(  percent >=  1.0 )
        4343                    {
        4344                             this.E ndEffect() ;
        4345                             return ;
        4346                    }
        4347           }
        4348           
        4349           th is.ele.fil ters.wave. phase += 5 ;
        4350           th is.ele.fil ters.wave. phase %= 1 00;
        4351           CC SSP.SetTim er(this,50 );
        4352   }
        4353  
        4354   CAgencyWav e.prototyp e.EndEffec t = functi on()
        4355   {// to rem ove the vi sual filte r function
        4356           th is.ele.sty le.filter  = "";
        4357           cl earInterva l( this.ti mer );
        4358           th is.timer =  null;
        4359   }
        4360  
        4361   CAgencyWav e.prototyp e.ResetPar ameters =  function()
        4362   {
        4363           th is.Prepare Effect();
        4364           th is.ele.sty le.filter  = "wave(st rength=" +  this.stre ngth + ",f req=" + 
        4365            t his.freq + ", lightst rength=" +  this.ligh tstrength  +",phase=0 );";
        4366           th is.startTi me = (new  Date()).ge tTime();
        4367   }
        4368   // End of  the CAgenc yWave defi nition
        4369  
        4370   // Begin o f CAgencyG low defini tion
        4371   function C AgencyGlow ( element,  settings  )
        4372   {// becaus e of "visu al filter"  style, th is won't w ork in Nav igator
        4373           th is.ele = e lement;
        4374  
        4375           //  to set th e default  value
        4376           th is.glowCol or = "gree n";
        4377           th is.glowStr ength = "3 ";
        4378           
        4379           va r arrAllSe t = settin gs.split(" ,");
        4380           fo r( var i =  0; i < ar rAllSet.le ngth; i ++  )
        4381           {
        4382                    arrA llSet[i] =  CCSSP.Tri mSpace(arr AllSet[i]) ;
        4383                    var  arrOneSet  = arrAllSe t[i].split ("=");
        4384                    for(  var j = 0 ; j < arrO neSet.leng th; j++ )
        4385                             arrOne Set[j] = C CSSP.TrimS pace(arrOn eSet[j]);
        4386                    swit ch( arrOne Set[0] )
        4387                    {
        4388                    case  "color" :  this.glow Color = ar rOneSet[1] ; break;
        4389                    case  "strength " : this.g lowStrengt h = arrOne Set[1]; br eak;
        4390                    }
        4391           }
        4392   }
        4393  
        4394   CAgencyGlo w.prototyp e.PrepareE ffect = fu nction()
        4395   {
        4396           CC SSP.Prepar eFilter(th is.ele);
        4397           CC SSP.ShowOb ject(this. ele, true  );
        4398           if ( this.ele .style.bac kgroundCol or != "" )
        4399           {/ /style.bac kgroundCol or somehow  stop the  visual fil ter
        4400                    this .ele.intac tBackgroun dColor = t his.ele.st yle.backgr oundColor;
        4401                    this .ele.style .backgroun dColor = " ";
        4402           }
        4403   }
        4404  
        4405   CAgencyGlo w.prototyp e.UpdateEf fect = fun ction()
        4406   {// to set  the visua l filter f unction
        4407           th is.Prepare Effect();
        4408           th is.ele.sty le.filter  = "glow(Co lor=" + th is.glowCol or + ", St rength=" +  
        4409                    this .glowStren gth + ", e nabled=tru e" +")";
        4410   }
        4411  
        4412   CAgencyGlo w.prototyp e.EndEffec t = functi on()
        4413   {// to rem ove the vi sual filte r function
        4414           th is.ele.sty le.filter  = "";
        4415           if ( typeof(t his.ele.in tactBackgr oundColor)  != "undef ined" )
        4416                    this .ele.style .backgroun dColor = t his.ele.in tactBackgr oundColor;
        4417   }
        4418   // End of  the CAgenc yGlow defi nition
        4419  
        4420   // Begin o f CAgencyD ropShadow  definition
        4421   function C AgencyDrop Shadow( el ement, set tings )
        4422   {// becaus e of "visu al filter"  style, th is won't w ork in Nav igator
        4423           th is.ele = e lement;
        4424  
        4425           //  to set th e default  value
        4426           th is.shadowC olor = "bl ack"; 
        4427           th is.shadowO ffx = "1";
        4428           th is.shadowO ffy = "1";
        4429           
        4430           va r arrAllSe t = settin gs.split(" ,");
        4431           fo r( var i =  0; i < ar rAllSet.le ngth; i ++  )
        4432           {
        4433                    arrA llSet[i] =  CCSSP.Tri mSpace(arr AllSet[i]) ;
        4434                    var  arrOneSet  = arrAllSe t[i].split ("=");
        4435                    for(  var j = 0 ; j < arrO neSet.leng th; j++ )
        4436                             arrOne Set[j] = C CSSP.TrimS pace(arrOn eSet[j]);
        4437                    swit ch( arrOne Set[0] )
        4438                    {
        4439                    case  "color" :  this.shad owColor =  arrOneSet[ 1]; break;
        4440                    case  "offx" :  this.shado wOffx = ar rOneSet[1] ; break;
        4441                    case  "offy" :  this.shado wOffy = ar rOneSet[1] ; break;
        4442                    }
        4443           }
        4444   }
        4445  
        4446   CAgencyDro pShadow.pr ototype.Pr epareEffec t = functi on()
        4447   {
        4448           CC SSP.Prepar eFilter(th is.ele);
        4449           CC SSP.ShowOb ject(this. ele, true  );
        4450           
        4451           if ( this.ele .style.bac kgroundCol or != "" )
        4452           {/ /style.bac kgroundCol or somehow  stop the  visual fil ter
        4453                    this .ele.intac tBackgroun dColor = t his.ele.st yle.backgr oundColor;
        4454                    this .ele.style .backgroun dColor = " ";
        4455           }
        4456   }
        4457  
        4458   CAgencyDro pShadow.pr ototype.Up dateEffect  = functio n()
        4459   {// to set  the visua l filter f unction
        4460           th is.Prepare Effect();
        4461           th is.ele.sty le.filter  = "dropsha dow(color= " + this.s hadowColor  + ", offx =" + 
        4462                    this .shadowOff x + ", off y=" + this .shadowOff y + ")";
        4463   }
        4464  
        4465   CAgencyDro pShadow.pr ototype.En dEffect =  function()
        4466   {// to rem ove the vi sual filte r function
        4467           th is.ele.sty le.filter  = "";
        4468           if ( typeof(t his.ele.in tactBackgr oundColor)  != "undef ined" )
        4469                    this .ele.style .backgroun dColor = t his.ele.in tactBackgr oundColor;
        4470   }
        4471   // End of  the CAgenc yDropShado w definiti on
        4472  
        4473   // Begin o f CAgencyR evealTrans  definitio n
        4474   function C AgencyReve alTrans( e lement, se ttings )
        4475   {// becaus e of "visu al filter"  style, th is won't w ork in Nav igator
        4476           th is.ele = e lement;
        4477  
        4478           //  to set th e default  value
        4479           th is.duratio n = 1.0; / /The value  is specif ied in sec onds.milli seconds fo rmat (0.00 00).
        4480           th is.transit ion = 0;
        4481           
        4482           va r arrAllSe t = settin gs.split(" ,");
        4483           fo r( var i =  0; i < ar rAllSet.le ngth; i ++  )
        4484           {
        4485                    arrA llSet[i] =  CCSSP.Tri mSpace(arr AllSet[i]) ;
        4486                    var  arrOneSet  = arrAllSe t[i].split ("=");
        4487                    for(  var j = 0 ; j < arrO neSet.leng th; j++ )
        4488                             arrOne Set[j] = C CSSP.TrimS pace(arrOn eSet[j]);
        4489                    swit ch( arrOne Set[0] )
        4490                    {
        4491                    case  "type" :  this.trans ition = ar rOneSet[1] ; break;
        4492                    case  "duration " : this.d uration =  100/arrOne Set[1];      break;
        4493                    }
        4494           }
        4495   }
        4496  
        4497   CAgencyRev ealTrans.p rototype.P repareEffe ct = funct ion()
        4498   {
        4499           CC SSP.Prepar eFilter(th is.ele);
        4500           CC SSP.ShowOb ject( this .ele, fals e);
        4501   }
        4502  
        4503   CAgencyRev ealTrans.p rototype.U pdateEffec t = functi on()
        4504   {// to set  the visua l filter f unction
        4505           if ( typeof(  this.ele.f ilters.Rev ealTrans )  == "objec t" )
        4506           {
        4507                    if(  this.ele.f ilters.Rev ealTrans.s tatus == 2  )
        4508                             this.e le.filters .RevealTra ns.stop();   
        4509           }
        4510  
        4511           th is.Prepare Effect();
        4512           
        4513           th is.ele.sty le.filter  = "RevealT rans(durat ion=" + th is.duratio n + 
        4514                    ", t ransition= " + this.t ransition  + ")";
        4515           
        4516       if( ty peof( this .ele.filte rs.RevealT rans ) ==  "object" )
        4517       {
        4518                    this .ele.filte rs.RevealT rans.apply ();
        4519                    CCSS P.ShowObje ct( this.e le, true);
        4520                    this .ele.filte rs.RevealT rans.play( );  
        4521           }
        4522           el se
        4523                    CCSS P.ShowObje ct( this.e le, true);
        4524   }
        4525  
        4526   CAgencyRev ealTrans.p rototype.E ndEffect =  function( )
        4527   {
        4528       if( ty peof( this .ele.filte rs.RevealT rans ) ==  "object" )
        4529                    this .ele.filte rs.RevealT rans.stop( );  
        4530           th is.ele.sty le.filter  = "";
        4531   }
        4532   // End of  the CAgenc yRevealTra ns definit ion
        4533  
        4534   // Begin o f CAgencyB lur defini tion
        4535   function C AgencyBlur ( element,  settings  )
        4536   {// becaus e of "visu al filter"  style, th is won't w ork in Nav igator
        4537           th is.ele = e lement;
        4538  
        4539           //  to set th e default  value
        4540           th is.strengt h = "5";
        4541           th is.directi on = "90";
        4542           
        4543           va r arrAllSe t = settin gs.split(" ,");
        4544           fo r( var i =  0; i < ar rAllSet.le ngth; i ++  )
        4545           {
        4546                    arrA llSet[i] =  CCSSP.Tri mSpace(arr AllSet[i]) ;
        4547                    var  arrOneSet  = arrAllSe t[i].split ("=");
        4548                    for(  var j = 0 ; j < arrO neSet.leng th; j++ )
        4549                             arrOne Set[j] = C CSSP.TrimS pace(arrOn eSet[j]);
        4550                    swit ch( arrOne Set[0] )
        4551                    {
        4552                    case  "strength " : this.s trength =  arrOneSet[ 1]; break;
        4553                    case  "directio n" : this. direction  = arrOneSe t[1]; brea k;
        4554                    }
        4555           }
        4556   }
        4557  
        4558   CAgencyBlu r.prototyp e.PrepareE ffect = fu nction()
        4559   {
        4560           CC SSP.Prepar eFilter(th is.ele);
        4561           CC SSP.ShowOb ject(this. ele, true  );
        4562   }
        4563  
        4564   CAgencyBlu r.prototyp e.UpdateEf fect = fun ction()
        4565   {// to set  the visua l filter f unction
        4566           CC SSP.Prepar eFilter(th is.ele);
        4567           th is.ele.sty le.filter  = "blur(st rength=" +  this.stre ngth + 
        4568                    ", d irection="  + this.di rection +  ")";
        4569   }
        4570  
        4571   CAgencyBlu r.prototyp e.EndEffec t = functi on()
        4572   {// to rem ove the vi sual filte r function
        4573           th is.ele.sty le.filter  = "";
        4574   }
        4575   // End of  the CAgenc yBlur defi nition
        4576  
        4577   // Begin o f CAgencyC hangeFilte r definiti on
        4578   function C AgencyChan geFilter(  element, s ettings )  // flipH,  flipV, inv ert, grey,
        4579   {// becaus e of "visu al filter"  style, th is won't w ork in Nav igator
        4580           th is.ele = e lement;
        4581  
        4582           //  to set th e default  value
        4583           th is.filterF unction =  settings;
        4584   }
        4585  
        4586   CAgencyCha ngeFilter. prototype. PrepareEff ect = func tion()
        4587   {
        4588           CC SSP.Prepar eFilter(th is.ele);
        4589           CC SSP.ShowOb ject(this. ele, true  );
        4590   }
        4591  
        4592   CAgencyCha ngeFilter. prototype. UpdateEffe ct = funct ion()
        4593   {// to set  the visua l filter f unction
        4594           CC SSP.Prepar eFilter(th is.ele);
        4595           th is.ele.sty le.filter  = this.fil terFunctio n;
        4596   }
        4597  
        4598   CAgencyCha ngeFilter. prototype. EndEffect  = function ()
        4599   {// to rem ove the vi sual filte r function
        4600           th is.ele.sty le.filter  = "";
        4601   }
        4602   // End of  the CAgenc yChangeFil ter defini tion
        4603  
        4604   // The eff ects below  change th e style on  the fly,  so they wo n't work i n Navigato r
        4605  
        4606   // Begin o f CAgencyF ontChange  definition
        4607   function C AgencyFont Change( el ement, set tings )
        4608   {//this cl ass can be  replace b y CAgencyC hangeStyle ,provided  the "setti ngs" is st andard CSS  string.
        4609           th is.ele = e lement;
        4610           
        4611           //  to retrie ve the ori ginal font  style
        4612           th is.Retriev eOldFont(  this.ele ) ;
        4613           
        4614           //  to set th e default  font to ch ange
        4615           th is.newfont Family = t his.ele.ol dFontFamil y;
        4616           th is.newfCol or = this. ele.oldCol or;
        4617           th is.newtext Decoration  = this.el e.oldTextD ecoration;
        4618           th is.newfont Weight = t his.ele.ol dFontWeigh t;
        4619           th is.newfont Style = th is.ele.old FontStyle;
        4620           th is.newfont Size = thi s.ele.oldF ontSize;
        4621           th is.newBack groundColo r = this.e le.oldBack groundColo r;
        4622           
        4623           va r arrAllSe t = settin gs.split(" ,");
        4624           fo r( var i =  0; i < ar rAllSet.le ngth; i ++  )
        4625           {/ / to retri eve the se tting
        4626                    arrA llSet[i] =  CCSSP.Tri mSpace(arr AllSet[i]) ;
        4627                    var  arrOneSet  = arrAllSe t[i].split ("=");
        4628                    for(  var j = 0 ; j < arrO neSet.leng th; j++ )
        4629                             arrOne Set[j] = C CSSP.TrimS pace(arrOn eSet[j]);
        4630                    swit ch( arrOne Set[0] )
        4631                    {
        4632                    case  "font-fam ily" : thi s.newfontF amily = ar rOneSet[1] ; break;
        4633                    case  "color" :  this.newf Color = ar rOneSet[1] ; break;
        4634                    case  "underlin e" : this. newtextDec oration =  (arrOneSet [1]=="on") ? "underli ne" : "non e"; break;
        4635                    case  "bold" :  this.newfo ntWeight =  (arrOneSe t[1]=="on" )? "bold"  : "normal" ; break;
        4636                    case  "italic"  : this.new fontStyle  = (arrOneS et[1]=="on ")? "itali c" : "norm al"; break ;
        4637                    case  "size" :  this.newfo ntSize = a rrOneSet[1 ]; break;
        4638                    case  "backgrou nd-color"  : this.new Background Color = ar rOneSet[1] ; break;
        4639                    }
        4640           }
        4641   }
        4642  
        4643   CAgencyFon tChange.pr ototype.Re trieveOldF ont = func tion(objCh ild)
        4644   {
        4645           if ( typeof(o bjChild.ol dFontFamil y) == "und efined" )
        4646                    objC hild.oldFo ntFamily =  objChild. style.font Family;
        4647           if ( typeof(o bjChild.ol dColor) ==  "undefine d" )
        4648                    objC hild.oldCo lor = objC hild.style .color;
        4649           if ( typeof(o bjChild.ol dTextDecor ation) ==  "undefined " )
        4650                    objC hild.oldTe xtDecorati on = objCh ild.style. textDecora tion;
        4651           if ( typeof(o bjChild.ol dFontWeigh t) == "und efined" )
        4652                    objC hild.oldFo ntWeight =  objChild. style.font Weight;
        4653           if ( typeof(o bjChild.ol dFontStyle ) == "unde fined" )
        4654                    objC hild.oldFo ntStyle =  objChild.s tyle.fontS tyle;
        4655           if ( typeof(o bjChild.ol dFontSize)  == "undef ined" )
        4656                    objC hild.oldFo ntSize = o bjChild.st yle.fontSi ze;
        4657           if ( typeof(o bjChild.ol dBackgroun dColor) ==  "undefine d" )
        4658                    objC hild.oldBa ckgroundCo lor = objC hild.style .backgroun dColor;
        4659   }
        4660  
        4661   CAgencyFon tChange.pr ototype.Pr epareEffec t = functi on()
        4662   {
        4663           //  as for ex panding te xt, the ch ild is cre ated after  the const ructor cal led
        4664           va r arr = th is.ele.get ElementsBy TagName (' *');
        4665           fo r(var inde x = 0; ind ex < arr.l ength; ind ex++)
        4666                    this .RetrieveO ldFont(arr [index]);
        4667           CC SSP.ShowOb ject(this. ele, true  );
        4668   }
        4669  
        4670   CAgencyFon tChange.pr ototype.Up dateEffect  = functio n()
        4671   {// to cha nge the fo nt
        4672           th is.Prepare Effect();
        4673           th is.UpdateE ffectAllCh ildren( th is.ele );
        4674           va r arr = th is.ele.get ElementsBy TagName (' *');
        4675           fo r( var ind ex = 0; in dex < arr. length; in dex++)
        4676                    this .UpdateEff ectAllChil dren(arr[i ndex]);
        4677   }
        4678  
        4679   CAgencyFon tChange.pr ototype.Up dateEffect AllChildre n = functi on(objChil d)
        4680   {
        4681           ob jChild.sty le.fontFam ily = this .newfontFa mily;
        4682           ob jChild.sty le.color =  this.newf Color;
        4683           ob jChild.sty le.textDec oration =  this.newte xtDecorati on;
        4684           ob jChild.sty le.fontWei ght = this .newfontWe ight;
        4685           ob jChild.sty le.fontSty le = this. newfontSty le;
        4686           ob jChild.sty le.fontSiz e = this.n ewfontSize ;
        4687           ob jChild.sty le.backgro undColor =  this.newB ackgroundC olor;
        4688   }
        4689  
        4690   CAgencyFon tChange.pr ototype.En dEffect =  function()
        4691   {// to rei nstate the  original  font style
        4692           th is.EndEffe ctAllChild ren( this. ele );
        4693           va r arr = th is.ele.get ElementsBy TagName (' *');
        4694           fo r( var ind ex = 0; in dex < arr. length; in dex++)
        4695                    this .EndEffect AllChildre n(arr[inde x]);
        4696   }
        4697  
        4698   CAgencyFon tChange.pr ototype.En dEffectAll Children =  function(  objChild  )
        4699   {
        4700           if ( typeof(o bjChild.ol dFontFamil y) != "und efined" )
        4701                    objC hild.style .fontFamil y = objChi ld.oldFont Family;
        4702           if ( typeof(o bjChild.ol dColor) !=  "undefine d" )
        4703                    objC hild.style .color = o bjChild.ol dColor;
        4704           if ( typeof(o bjChild.ol dFontWeigh t) != "und efined" )
        4705                    objC hild.style .fontWeigh t = objChi ld.oldFont Weight;
        4706           if ( typeof(o bjChild.ol dFontStyle ) != "unde fined" )
        4707                    objC hild.style .fontStyle  = objChil d.oldFontS tyle;
        4708           if ( typeof(o bjChild.ol dFontSize)  != "undef ined" )
        4709                    objC hild.style .fontSize  = objChild .oldFontSi ze;
        4710           if ( typeof(o bjChild.ol dTextDecor ation) !=  "undefined " )
        4711                    objC hild.style .textDecor ation = ob jChild.old TextDecora tion;
        4712           if ( typeof(o bjChild.ol dBackgroun dColor) !=  "undefine d" )
        4713                    objC hild.style .backgroun dColor = o bjChild.ol dBackgroun dColor;
        4714   }
        4715   // End of  the CAgenc yFontChang e definiti on
        4716  
        4717   // Begin o f the CAge ncyChangeS tyle defin ition
        4718   function C AgencyChan geStyle( e lement, se ttings )
        4719   {//this cl ass can be  replace b y CAgencyC hangeStyle ,provided  the "setti ngs" is st andard CSS  string.
        4720           th is.ele = e lement;
        4721           
        4722           //  to retrie ve the ori ginal styl e
        4723           th is.oldstyl e = this.e le.style.c ssText;
        4724           
        4725           //  to set th e default  style
        4726           th is.newStyl e = this.o ldstyle;
        4727           
        4728           if ( typeof(s ettings) = = "string"  && settin gs.length  > 1 )
        4729                    this .newStyle  = this.old style + "  " + settin gs;
        4730   }
        4731  
        4732   CAgencyCha ngeStyle.p rototype.P repareEffe ct = funct ion()
        4733   {
        4734           CC SSP.ShowOb ject(this. ele, true  );
        4735   }
        4736  
        4737   CAgencyCha ngeStyle.p rototype.U pdateEffec t = functi on()
        4738   {// to cha nge the st yle
        4739           th is.ele.sty le.cssText  = this.ne wStyle;
        4740   }
        4741  
        4742   CAgencyCha ngeStyle.p rototype.E ndEffect =  function( )
        4743   {// to rei nstate the  original  style
        4744           th is.ele.sty le.cssText  = this.ol dStyle;
        4745   }
        4746   // End of  the CAgenc yChangeSty le definit ion
        4747  
        4748   //End the  definition  of CAgenc yXXXX clas ses
        4749  
        4750   //Begin to  collabora te with ot her event  handler se ttings 
        4751   CCSSP.Regi sterEventH andler( wi ndow, "onl oad", "CEn gine.OnPag eLoad(even t);BSSCOnL oad(event) ;InitTrigg ersInHead( event);");
        4752   CCSSP.Regi sterEventH andler( do cument, "o nclick", " window.eve nt || (win dow.event  = argument s[0]); CEn gine.OnPag eClick(win dow.event) ;BSSCOnCli ck(window. event);");
        4753   CCSSP.Regi sterEventH andler( do cument, "o nmouseover ", "CEngin e.OnMouseO ver(event) ;BSSCOnMou seOver(eve nt);" );
        4754   CCSSP.Regi sterEventH andler( do cument, "o nmouseout" , "CEngine .OnMouseOv er(event); BSSCOnMous eOut(event );" );
        4755   CCSSP.Regi sterEventH andler( wi ndow, "onu nload", "B SSCOnUnloa d();");
        4756  
        4757  
        4758  
        4759   // functio n related  to autosiz e popup, c ustom popu p and text only popup
        4760   var gMsgSe parator =  "::";
        4761  
        4762   function i sInsidePop up()
        4763   {
        4764           re turn (wind ow.name.in dexOf("BSS CPopup")!= -1);
        4765   }
        4766  
        4767   if(isLocal  && (gbChr ome || gbB sNS6))
        4768   {
        4769           if (window.ad dEventList ener)
        4770                    wind ow.addEven tListener( "message",  onRcvCont entSizeMsg , false);
        4771   }
        4772  
        4773   function g etDocHeigh t(D) {
        4774       return  Math.max(
        4775           Ma th.max(D.b ody.scroll Height, D. documentEl ement.scro llHeight),
        4776           Ma th.max(D.b ody.offset Height, D. documentEl ement.offs etHeight),
        4777           Ma th.max(D.b ody.client Height, D. documentEl ement.clie ntHeight)
        4778       );
        4779   }
        4780  
        4781   function g etDocWidth (D) {
        4782       return  Math.max(
        4783           Ma th.max(D.b ody.scroll Width, D.d ocumentEle ment.scrol lWidth),
        4784           Ma th.max(D.b ody.offset Width, D.d ocumentEle ment.offse tWidth),
        4785           Ma th.max(D.b ody.client Width, D.d ocumentEle ment.clien tWidth)
        4786       );
        4787   }
        4788  
        4789   function t rim(string ToTrim) {
        4790           re turn strin gToTrim.re place(/^\s +|\s+$/g," ");
        4791   }
        4792  
        4793   function p arseMsgDat a(strData)
        4794   {
        4795           va r nvPairs  = strData. split(",") ; //get na me value p airs
        4796           if (nvPairs.l ength>0)
        4797           {
        4798                    var  obj = new  Object();
        4799                    for( var i=0; i <nvPairs.l ength; i++ )
        4800                    {
        4801                             trim(n vPairs[i]) ;
        4802                             var nv Pair = nvP airs[i].sp lit(":");
        4803                             if(nvP air.length  == 2)
        4804                             {
        4805                                      obj[nvPa ir[0]] = n vPair[1];
        4806                             }
        4807                    }
        4808                    retu rn obj;
        4809           }
        4810           re turn null;
        4811   }
        4812  
        4813  
        4814   function r eplyConten tSize(targ etWnd)
        4815   {
        4816           ta rgetWnd.po stMessage( "sendConte ntSize" +  gMsgSepara tor + ",he ight:" + g etDocHeigh t(document ) + ",widt h:" + getD ocWidth(do cument), " *");
        4817   }
        4818  
        4819  
        4820  
        4821   var     gL astHeight  = 0;
        4822   var     gL astWidth =  0;
        4823   function o nRcvConten tSizeMsg(e vent)
        4824   {
        4825           if (typeof(ev ent.data)  != 'string ') {
        4826                    retu rn;
        4827           }
        4828  
        4829       var ms g = event. data.split (gMsgSepar ator);
        4830       var ms gType = ms g[0];
        4831       var ms gData = ms g[1];
        4832       switch (msgType)
        4833       {
        4834       case " sendConten tSize":
        4835                {
        4836                             var      stepSize  = 50;
        4837                             
        4838                             var ob j  = parse MsgData(ms gData);
        4839                             rhPopu pEx.setHei ght(parseI nt(obj.hei ght));
        4840                             rhPopu pEx.setWid th(parseIn t(obj.widt h));
        4841                             
        4842                             if(typ eof(rhPopu pEx.gLastG oodHeight)  == 'undef ined' || r hPopupEx.g LastGoodHe ight == 0)
        4843                             {
        4844                                      rhPopupE x.gLastGoo dHeight =  rhPopupEx. height;
        4845                                      rhPopupE x.gLastGoo dWidth = r hPopupEx.w idth;
        4846                             }
        4847                             else
        4848                             {
        4849                                      if(rhPop upEx.heigh t < gLastH eight) 
        4850                                      {
        4851                                               rhPopupEx. gLastGoodH eight = rh PopupEx.he ight;
        4852                                               rhPopupEx. gLastGoodW idth = rhP opupEx.wid th;
        4853                                      }
        4854                             }
        4855  
        4856                             if(rhP opupEx.can DoBetter() )
        4857                             {
        4858                                      gLastWid th = rhPop upEx.width ;
        4859                                      gLastHei ght = rhPo pupEx.heig ht;
        4860                                      
        4861                                      rhPopupE x.resizePo pup(rhPopu pEx.width+ stepSize,  1);
        4862                                      requestC ontentSize (event.sou rce);
        4863                                      
        4864                             }
        4865                             else{
        4866                                      rhPopupE x.setHeigh t(rhPopupE x.gLastGoo dHeight);
        4867                                      rhPopupE x.setWidth (rhPopupEx .gLastGood Width);
        4868                                      rhPopupE x.gLastGoo dHeight =  0;
        4869                                      rhPopupE x.gLastGoo dWidth = 0 ;
        4870                                      gLastHei ght = 0;
        4871                                      gLastWid th = 0;
        4872                                      rhPopupE x.resizeMo veAndShowP opup();
        4873                             }
        4874                }
        4875           br eak;
        4876        case  "getConten tSize":
        4877           re plyContent Size(event .source);
        4878           br eak;
        4879        case  "updateLin ks":
        4880           BS SCPopup_Ch angeTarget toBlank(do cument);
        4881           br eak;
        4882        case  "getCpHTML 5Size":
        4883           re plyCpHTML5 Size(event .source, m sgData);
        4884           br eak;
        4885        case  "setCpHTML 5Size":
        4886           on GetReplyCp HTML5Size( event.sour ce, msgDat a);
        4887           br eak;
        4888       }
        4889   }
        4890  
        4891   function r equestCont entSize(ta rgetWnd)
        4892   {
        4893           if (targetWnd  && target Wnd.postMe ssage)
        4894                    targ etWnd.post Message("g etContentS ize" + gMs gSeparator  + " ", "* ");
        4895   }
        4896  
        4897   function r equestUpda teLinks(ta rgetWnd)
        4898   {
        4899           if (targetWnd  && target Wnd.postMe ssage)
        4900                    targ etWnd.post Message("u pdateLinks " + gMsgSe parator +  " ", "*");
        4901   }
        4902  
        4903   function o nPopupClic ked(e)
        4904   {
        4905           va r target =  null;
        4906           va r popupIFr ame = rhPo pupEx.getP opupIFrame ();
        4907           if (!e) 
        4908                    e =  popupIFram e.contentW indow.even t;
        4909           if (e)
        4910           {
        4911                    if(e .target)
        4912                             target  = e.targe t;
        4913                    else  
        4914                             target  = e.srcEl ement;
        4915           }
        4916           if (!gbAIR)
        4917           {
        4918                    if(t arget && i sInsideHyp erLink(tar get))
        4919                             return ;
        4920           }
        4921           if (window.re moveEventL istener)
        4922                    wind ow.removeE ventListen er("moused own", onPo pupParentC licked, fa lse);
        4923           el se if(wind ow.documen t.detachEv ent)
        4924                    wind ow.documen t.detachEv ent('onmou sedown', o nPopupPare ntClicked) ;
        4925           rh PopupEx.re movePopup( );
        4926   }
        4927  
        4928   function o nPopupPare ntClicked( e)
        4929   {
        4930           if (window.re moveEventL istener)
        4931                    wind ow.removeE ventListen er("moused own", onPo pupParentC licked, fa lse);
        4932           el se if(wind ow.documen t.detachEv ent)
        4933                    wind ow.documen t.detachEv ent('onmou sedown', o nPopupPare ntClicked) ;
        4934           rh PopupEx.re movePopup( );
        4935   }
        4936  
        4937   var rhPopu pEx = new  RHPopupEx;
        4938   function R HPopupEx()
        4939   {
        4940           th is.strPopu pID = 'BSS CPopup';
        4941           th is.strPopu pShadowID  = 'BSSCPop upShadow';
        4942           th is.strPopu pTopicID =  'BSSCPopu pTopic';
        4943           th is.strPopu pIFrameID  = 'BSSCPop upIFrame';
        4944           th is.strPopu pIFrameNam e = 'BSSCP opupIFrame Name';
        4945           th is.strPopu pURL = '';
        4946           th is.strBook mark = '';
        4947           th is.width =  0;
        4948           th is.height  = 0;
        4949           th is.clientW idth = 0;
        4950           th is.clientH eight = 0;
        4951           th is.gHeight  = 0;
        4952           th is.gWidth  = 0;
        4953           th is.bCustom Height = f alse;
        4954  
        4955           // scrollbar  height and  width
        4956           th is.scrollb arheight =  20; //can  we ask th e browser  for this i nfo
        4957           th is.scrollb arwidth =  20;
        4958  
        4959           th is.init =  function()
        4960           {
        4961                    this .getVisibi lityStyle( );
        4962                    this .strPopupU RL = '';
        4963                    this .strBookma rk = '';
        4964                    this .width = 0 ;
        4965                    this .height =  0;
        4966                    this .clientWid th = 0;
        4967                    this .clientHei ght = 0;
        4968                    this .gHeight =  0;
        4969                    this .gWidth =  0;
        4970                    this .removePop up();
        4971           }
        4972  
        4973           th is.setPopu pURL = fun ction(strU RL)
        4974           {
        4975                    var  indx = str URL.indexO f("#");
        4976                    if(i ndx != -1)
        4977                    {
        4978                             this.s trPopupURL  = strURL. substring( 0, indx);
        4979                             this.s trBookmark  = strURL. substring( indx);
        4980                    }
        4981                    else
        4982                             this.s trPopupURL  = strURL;
        4983           }
        4984           th is.setWidt h = functi on(width)
        4985           {
        4986                    this .width = w idth;
        4987           }
        4988           th is.setHeig ht = funct ion(height )
        4989           {
        4990                    this .height =  height;
        4991           }
        4992           th is.setClic kPosition=  function( x, y)
        4993           {
        4994                    this .clickX =  x + getScr ollLeft();
        4995                    this .clickY =  y + getScr ollTop();
        4996           }
        4997  
        4998           th is.createP opup= func tion(strUR L, width,  height)
        4999           {
        5000                    this .init();
        5001                    if ( "undefined " != typeo f(width) & & "undefin ed" != typ eof(height )) {
        5002                             this.s etWidth(wi dth);
        5003                             this.s etHeight(h eight);
        5004                             this.b CustomHeig ht = true;
        5005                    }
        5006                    if(t ypeof(strU RL) == 'un defined' | | strURL = = '')
        5007                             return  false;
        5008                    this .setPopupU RL(strURL) ;
        5009                    this .createPop upContaine r();
        5010           }
        5011  
        5012           th is.createP opupContai ner = func tion()
        5013           {
        5014                    // D O NOT SET  Width and  height for  the div,  otherwize  it will ma ke IE4 pop up do not  work when  view the t opic alone .
        5015                    var  strPopupDi v = "<div  id='" + th is.strPopu pID + "' s tyle='posi tion:absol ute; top:- 100; left: 0; z-index :600; visi bility:hid den;'>";
        5016                    strP opupDiv +=  "<div id= '" + this. strPopupSh adowID + " ' style=\" position:a bsolute;to p:0; left: 0; backgro und-color: #C0C0C0;\" ></div>";
        5017                    strP opupDiv +=  "<div id= '" + this. strPopupTo picID + "'  style=\"p osition:ab solute;top :0; left:0 ;  backgro und-color: #FFFFFF;bo rder:1px # 000000 out set;"; 
        5018                    if(g bSafari3 & & gbBsIsMo bile)
        5019                             strPop upDiv += " overflow:a uto; -webk it-overflo w-scrollin g:touch;";
        5020                    strP opupDiv +=  "\">";
        5021                    strP opupDiv +=  "<iframe  height=\"1 0px\" widt h=\"200px\ " title=\" Popup Wind ow\" id='"  + this.st rPopupIFra meID + "'  name='" +  this.strPo pupIFrameN ame + "' s rc='" + th is.strPopu pURL + "'  frameborde r=0 scroll ing=auto";
        5022                    strP opupDiv +=  " onload= \"rhPopupE x.OnLoadRH Popup();\" ";
        5023                    strP opupDiv +=  "></ifram e></div>";   
        5024                    strP opupDiv +=  "</div>";
        5025  
        5026                    var  oBody = ge tElementsB yTag(docum ent, "body ")[0];
        5027                    if(  typeof(oBo dy) != "ob ject" )
        5028                             return ;
        5029  
        5030                    inse rtAdjacent HTML(oBody , "beforeE nd", strPo pupDiv);
        5031           }
        5032  
        5033           th is.removeP opup = fun ction()
        5034           {
        5035                    var  popup = th is.getPopu pContainer ();
        5036                    if(p opup)
        5037                             remove This(popup );
        5038           }
        5039  
        5040           th is.getPopu pContainer  = functio n()
        5041           {
        5042                    var  elem  = do cument.get ElementByI d(this.str PopupID);
        5043                    if(t ypeof(elem ) != 'unde fined' &&  elem != nu ll)
        5044                             return  elem;
        5045                    retu rn null;
        5046           }
        5047           th is.getPopu pIFrame =  function()
        5048           {
        5049                    var  elem  = do cument.get ElementByI d(this.str PopupIFram eID);
        5050                    if(t ypeof(elem ) != 'unde fined' &&  elem != nu ll)
        5051                             return  elem;
        5052                    retu rn null;
        5053           }
        5054           th is.getPopu pShadow =  function()
        5055           {
        5056                    var  elem  = do cument.get ElementByI d(this.str PopupShado wID);
        5057                    if(t ypeof(elem ) != 'unde fined' &&  elem != nu ll)
        5058                             return  elem;
        5059                    retu rn null;
        5060           }
        5061           th is.getPopu pTopic = f unction()
        5062           {
        5063                    var  elem  = do cument.get ElementByI d(this.str PopupTopic ID);
        5064                    if(t ypeof(elem ) != 'unde fined' &&  elem != nu ll)
        5065                             return  elem;
        5066                    retu rn null;
        5067           }
        5068  
        5069           th is.hidePop up = funct ion()
        5070           {
        5071                    this .getPopupC ontainer() .style.vis ibility =  this.strSt yVisHide;
        5072                    this .getPopupI Frame().st yle.visibi lity = thi s.strStyVi sHide;
        5073           }
        5074  
        5075           th is.showPop up = funct ion()
        5076           {
        5077                    this .getPopupC ontainer() .style.vis ibility =  this.strSt yVisShow;
        5078                    this .getPopupI Frame().st yle.visibi lity = thi s.strStyVi sShow;
        5079           }
        5080  
        5081           th is.getVisi bilityStyl e = functi on()
        5082           {
        5083                    if ( gbBsNS4&&! gbBsNS6)
        5084                    {
        5085                             this.s trStyVisSh ow      =  "show";
        5086                             this.s trStyVisHi de      =  "hide";
        5087                    }
        5088                    else
        5089                    {
        5090                             this.s trStyVisSh ow      =  "visible";
        5091                             this.s trStyVisHi de      =  "hidden";
        5092                    }
        5093           }
        5094  
        5095           th is.getClie ntWndSize  = function  () {
        5096                var view portwidth;
        5097                var view portheight ;
        5098  
        5099                // the m ore standa rds compli ant browse rs (mozill a/netscape /opera/IE7 ) use wind ow.innerWi dth and wi ndow.inner Height
        5100                if (type of window. innerWidth  != 'undef ined') {
        5101                    view portwidth  = window.i nnerWidth;
        5102                    view portheight  = window. innerHeigh t;
        5103                }
        5104                // IE6 i n standard s complian t mode (i. e. with a  valid doct ype as the  first lin e in the d ocument)
        5105                else if  (typeof do cument.doc umentEleme nt != 'und efined'
        5106            & & typeof d ocument.do cumentElem ent.client Width != ' undefined'  && docume nt.documen tElement.c lientWidth  != 0) {
        5107                    view portwidth  = document .documentE lement.cli entWidth;
        5108                    view portheight  = documen t.document Element.cl ientHeight ;
        5109                }
        5110                // older  versions  of IE
        5111                else {
        5112                    view portwidth  = document .getElemen tsByTagNam e('body')[ 0].clientW idth;
        5113                    view portheight  = documen t.getEleme ntsByTagNa me('body') [0].client Height;
        5114                }
        5115                this.cli entWidth =  viewportw idth;
        5116                this.cli entHeight  = viewport height;
        5117                //golden  ratio
        5118                this.gHe ight = thi s.clientHe ight * 0.8 ;
        5119                this.gWi dth = this .clientWid th * 0.8;
        5120                
        5121                this.cli entWidth - = this.scr ollbarwidt h;
        5122                this.cli entHeight  -= this.sc rollbarhei ght; 
        5123           }
        5124  
        5125           th is.resizeP opup = fun ction(widt h, height)
        5126           {
        5127                    //se t height a nd width
        5128                    this .getPopupC ontainer() .style.wid th = width  + "px" ;
        5129                    this .getPopupC ontainer() .style.hei ght = heig ht + "px"  ;
        5130           
        5131                    this .getPopupS hadow().st yle.width  = width +  "px" ;
        5132                    this .getPopupS hadow().st yle.height  = height  + "px" ;     
        5133           
        5134                    this .getPopupT opic().sty le.width =  width + " px" ;
        5135                    this .getPopupT opic().sty le.height  = height +  "px" ;
        5136           
        5137                    this .getPopupI Frame().st yle.width  = width +  "px" ;
        5138                    this .getPopupI Frame().st yle.height  = height  + "px" ;
        5139           }
        5140  
        5141           th is.getPopu pContentSi ze = funct ion()
        5142           {
        5143                    var  wnd = this .getPopupI Frame().co ntentWindo w;
        5144                    this .setHeight (getDocHei ght(wnd.do cument));
        5145                    this .setWidth( getDocWidt h(wnd.docu ment));
        5146           }
        5147  
        5148           th is.canDoBe tter = fun ction()
        5149           {
        5150                    if(t his.width  < this.gWi dth /*&& t his.height  > this.gH eight*/)
        5151                             return  true;
        5152           }
        5153  
        5154           th is.compute PopupWndSi ze = funct ion()
        5155           {
        5156                    if(! gbChromeLo cal)
        5157                    {
        5158                             try
        5159                             {
        5160                                      this.get PopupConte ntSize();
        5161  
        5162                             //try  to check i f we have  available  width, inc reasing th e width ma y decrease  the heigh t for refl owable con tent
        5163                             //when ever a cha nge is det ected we s ave that s ize
        5164                             //incr easing wid th by an a mount does  not alway s decrease  height, b ut increas ing furthe r may decr ease it ba sed on the  
        5165                             //refl ow content
        5166                             
        5167                             var      stepSize  = 50;
        5168                             var      lastWidt h = 0;
        5169                             var      lastHeig ht = 0;
        5170                             var la stGoodHeig ht = this. height;
        5171                             var la stGoodWidt h = this.w idth;
        5172  
        5173                             while( this.canDo Better())
        5174                             {
        5175                                      lastWidt h = this.w idth;
        5176                                      lastHeig ht = this. height;
        5177                                      this.res izePopup(t his.width+ stepSize,  1);
        5178                                      this.get PopupConte ntSize();
        5179                                      //if no  change in  height det ected
        5180                                      if(this. height < l astHeight)  //may be  there is n o reflow c ontent to  reduce hei ght on inc reasing wi dth
        5181                                      {
        5182                                               lastGoodHe ight = thi s.height;
        5183                                               lastGoodWi dth = this .width;
        5184                                              
        5185                                      }
        5186                                      //alert( "height =  " + this.h eight + "w idth=" + t his.width)
        5187                             }
        5188  
        5189                             //addi ng extra 2 0 pixel in  height to  be sure n o scroll b ar comes e ven if con tent fits  in size co mputed
        5190                             lastGo odHeight + = 20;
        5191                             //addi ng extra 5  pixel in  width
        5192                             lastGo odWidth +=  5;
        5193  
        5194                             this.s etHeight(l astGoodHei ght);
        5195                             this.s etWidth(la stGoodWidt h);
        5196  
        5197                             this.r esizeMoveA ndShowPopu p();
        5198                             }
        5199                             catch( e)
        5200                             {
        5201                                      requestC ontentSize (this.getP opupIFrame ().content Window);
        5202                             }
        5203                    }
        5204                    else
        5205                             reques tContentSi ze(this.ge tPopupIFra me().conte ntWindow);
        5206           }
        5207  
        5208           th is.resizeM oveAndShow Popup = fu nction()
        5209           {
        5210                    var  bNeedHScro ll = false ;
        5211                    var  bNeedVScro ll = false ;
        5212  
        5213                    if(t his.height  > this.gH eight)
        5214                    {
        5215                             this.s etHeight(t his.gHeigh t);
        5216                             //need  vertical  scroll bar s
        5217                             bNeedV Scroll = t rue;
        5218                             this.s etWidth(th is.width+t his.scroll barwidth);
        5219                    }                 
        5220                    if(t his.width  > this.gWi dth)
        5221                    {
        5222                             this.s etWidth(th is.gWidth) ;
        5223                             //need  horizonta l scroll b ars
        5224                             bNeedH Scroll = t rue;
        5225                             this.s etHeight(t his.height +this.scro llbarheigh t);
        5226                    }
        5227  
        5228                    var  nClickX =  this.click X;
        5229                    var  nClickY =  this.click Y;
        5230                    var  nTop = 0;
        5231                    var  nLeft = 0;
        5232                    var  shadowpos  = 5; //sha dow pos re lative to  popup fram e
        5233           
        5234                    var  scrollTop  = getScrol lTop();
        5235                    var  scrollLeft  = getScro llLeft();
        5236  
        5237                    if ( nClickY +  this.heigh t + shadow pos < this .clientHei ght + scro llTop) {
        5238                             nTop =  nClickY;
        5239                    } el se {
        5240                             nTop =  nClickY -  this.heig ht - shado wpos;
        5241                             if(nTo p < scroll Top)
        5242                             {
        5243                                      nTop = ( scrollTop  + this.cli entHeight)  - this.he ight - sha dowpos;
        5244                                      if(nTop  < scrollTo p)
        5245                                      {
        5246                                               nTop = scr ollTop;
        5247                                               this.heigh t = this.c lientHeigh t - shadow pos;
        5248                                               //need ver tical scro ll bars
        5249                                               if(bNeedVS croll == f alse)
        5250                                               {
        5251                                                       bN eedVScroll  = true;
        5252                                                       th is.setWidt h(this.wid th+this.sc rollbarwid th);
        5253                                               }
        5254                                      }
        5255                             }
        5256                    }
        5257                    if ( nClickX +  this.width  + shadowp os < this. clientWidt h + scroll Left) {
        5258                             nLeft  = nClickX;
        5259                    } el se {
        5260                             nLeft  = nClickX  - this.wid th - shado wpos;
        5261                             if(nLe ft < scrol lLeft)
        5262                             {
        5263                                      nLeft =  (scrollLef t + this.c lientWidth ) - this.w idth - sha dowpos;
        5264                                      if(nLeft  < scrollL eft)
        5265                                      {
        5266                                               nLeft = sc rollLeft;
        5267                                               this.width  = this.cl ientWidth  - shadowpo s;
        5268                                               //need hor izontal sc roll bars
        5269                                               if(bNeedHS croll == f alse)
        5270                                               {
        5271                                                       bN eedHScroll  = true;
        5272                                                       th is.setHeig ht(this.he ight+this. scrollbarh eight);
        5273                                               }
        5274                                      }
        5275                             }
        5276                    }
        5277  
        5278  
        5279                    //se t height a nd width
        5280                    this .resizePop up(this.wi dth, this. height);
        5281  
        5282                    //se t position
        5283                    this .getPopupC ontainer() .style.lef t = nLeft  + "px";
        5284                    this .getPopupC ontainer() .style.top  = nTop +  "px";
        5285  
        5286                    // S et the loc ation of t he backgro und blocks
        5287                    this .getPopupS hadow().st yle.left =  shadowpos  + "px";
        5288                    this .getPopupS hadow().st yle.top =  shadowpos  + "px";
        5289  
        5290                    if(t his.strBoo kmark != ' ')
        5291                    {
        5292                             //aler t(this.str Bookmark);
        5293                             this.g etPopupIFr ame().cont entWindow. location.h ref = this .strPopupU RL + this. strBookmar k;
        5294                    }
        5295  
        5296                    try{
        5297                             BSSCPo pup_Change TargettoBl ank(this.g etPopupIFr ame().cont entWindow. document);
        5298                    }cat ch(e)
        5299                    {
        5300                             //come s here for  chrome lo cal
        5301                             reques tUpdateLin ks(this.ge tPopupIFra me().conte ntWindow);
        5302                    }
        5303                    this .showPopup ();
        5304                    this .postWork( );
        5305           }
        5306  
        5307           th is.postWor k = functi on()
        5308           {
        5309                    try{
        5310                             if(gbB sIsMobile  == false)
        5311                             {
        5312                                      if (wind ow.addEven tListener) {  
        5313                                               this.getPo pupIFrame( ).contentW indow.addE ventListen er('click' , onPopupC licked, fa lse);  
        5314                                      } else i f (window. document.a ttachEvent ){  
        5315                                               this.getPo pupIFrame( ).contentW indow.docu ment.attac hEvent('on click', on PopupClick ed);
        5316                                      }
        5317                             }
        5318                    }cat ch(e)
        5319                    {
        5320                             //aler t popup do es not clo se on clic king on it , valid fo r chrome l ocal
        5321                    }
        5322  
        5323                    if(w indow.addE ventListen er)
        5324                    {
        5325                             window .addEventL istener("m ousedown",  onPopupPa rentClicke d, false);
        5326                             window .document. addEventLi stener("to uchstart",  onPopupPa rentClicke d, false);
        5327                    }
        5328                    else  if(window .document. attachEven t)
        5329                             window .document. attachEven t('onmouse down', onP opupParent Clicked);
        5330  
        5331           }
        5332  
        5333           th is.OnLoadR HPopup = f unction()
        5334           {
        5335                    rhPo pupEx.hide Popup();
        5336  
        5337                    if(g bBsIE4 &&  rhPopupEx. getPopupIF rame().con tentWindow .document. location.h ref.indexO f("about:b lank") !=  -1)
        5338                    {
        5339                             rhPopu pEx.getPop upIFrame() .contentWi ndow.docum ent.locati on.href =  rhPopupEx. strPopupUR L;
        5340                             return ;
        5341                    }
        5342                    
        5343                    this .getClient WndSize();
        5344                    if ( rhPopupEx. width == 0  || rhPopu pEx.height  == 0) 
        5345                    {
        5346                             rhPopu pEx.comput ePopupWndS ize();
        5347                    }
        5348                    else
        5349                             rhPopu pEx.resize MoveAndSho wPopup();
        5350  
        5351           }
        5352   }
        5353  
        5354   function s upports_vi deo() {
        5355     return ! !document. createElem ent('video ').canPlay Type;
        5356   }
        5357  
        5358   function s upports_mp 4_video()
        5359   {
        5360           if (!supports _video()) 
        5361                    retu rn false;
        5362           va r v = docu ment.creat eElement(" video");
        5363           va r playType  = v.canPl ayType('vi deo/mp4');
        5364           // alert(play Type);
        5365           if (playType  == "" || p layType ==  "no")
        5366                    retu rn false;
        5367           el se
        5368                    retu rn true;
        5369   }
        5370  
        5371   function g etUrlParam (paramName , url)
        5372   {
        5373     if(url = = null ||  url == 'un defined')
        5374           ur l = docume nt.locatio n.href;
        5375     paramNam e = paramN ame.replac e(/[\[]/," \\\[").rep lace(/[\]] /,"\\\]");
        5376     var rege xS = "[\\? &]"+paramN ame+"=([^& #]*)";
        5377     var rege x = new Re gExp(regex S);
        5378     var resu lts = rege x.exec(url );
        5379     if( resu lts == nul l )
        5380       return  "";
        5381     else
        5382       return  results[1 ];
        5383   }
        5384  
        5385   function s end_flv_co mmand(strM ultimediaF lvName, st rMultimedi aFlvComman d)
        5386   {
        5387           tr y
        5388           {
        5389                    if(s trMultimed iaFlvName  != null &&  typeof(st rMultimedi aFlvName)  != undefin ed)
        5390                    {
        5391                             var fl ashMediaPl ayer = doc ument.getE lementById (strMultim ediaFlvNam e);
        5392                             if(fla shMediaPla yer != nul l && typeo f(flashMed iaPlayer)  != undefin ed)
        5393                             {
        5394                                      if(strMu ltimediaFl vCommand ! = null &&  typeof(str Multimedia FlvCommand ) != undef ined)
        5395                                      {
        5396                                               flashMedia Player.Tak eMultimedi aAction(st rMultimedi aFlvComman d.replace( "%20", " " ));
        5397                                      }
        5398                             }
        5399                    }
        5400           }
        5401           ca tch(err)
        5402           {
        5403                    //al ert(strMul timediaFlv Name + ' '  + strMult imediaFlvC ommand);
        5404           }
        5405   }
        5406  
        5407   function o nLoad_FLV_ Player(str Multimedia FlvName)
        5408   {
        5409           if (strMultim ediaFlvNam e != null  && typeof( strMultime diaFlvName ) != undef ined)
        5410           {
        5411                    var  strMultime diaFlvName HRef = get UrlParam(' flv_name') ;
        5412                    if(s trMultimed iaFlvNameH Ref != nul l && typeo f(strMulti mediaFlvNa meHRef) !=  undefined )
        5413                    {
        5414                             if(str Multimedia FlvNameHRe f == strMu ltimediaFl vName)
        5415                             {
        5416                                      var strM ultimediaF lvCommand  = getUrlPa ram('flv_c md');
        5417                                      send_flv _command(s trMultimed iaFlvName,  strMultim ediaFlvCom mand);
        5418                             }
        5419                    }
        5420           }
        5421   }
        5422  
        5423   function r equestCpHT ML5Size(ta rgetWnd, i frameid)
        5424   {
        5425           if (targetWnd  && target Wnd.postMe ssage)
        5426                    targ etWnd.post Message("g etCpHTML5S ize" + gMs gSeparator  + ",id:"+  iframeid,  "*");
        5427   }
        5428  
        5429   function r eplyCpHTML 5Size(targ etWnd, msg Data)
        5430   {
        5431           va r obj  = p arseMsgDat a(msgData) ;
        5432           
        5433           va r pc = get ProjectCon tainer();
        5434  
        5435           
        5436           
        5437           ta rgetWnd.po stMessage( "setCpHTML 5Size" + g MsgSeparat or + ",id: " + obj.id  + ",heigh t:" + pars eFloat(pc. style.heig ht) + ",wi dth:" + pa rseFloat(p c.style.wi dth), "*") ;
        5438   }
        5439  
        5440   function o nGetReplyC pHTML5Size (targetWnd , msgData)
        5441   {
        5442           va r obj  = p arseMsgDat a(msgData) ;
        5443           va r iframeel em = getEl ement(obj. id);
        5444           if (typeof if rameelem ! = 'undefin ed')
        5445           {
        5446                    ifra meelem.sty le.width =  obj.width  + "px" ;
        5447                    ifra meelem.sty le.height  = obj.heig ht + "px"  ;
        5448           }
        5449   }
        5450  
        5451   function o nHTML5Outp utLoad(id)
        5452   {
        5453           va r iframeel em = getEl ement(id);
        5454           if (typeof if rameelem ! = 'undefin ed')
        5455           {
        5456                    var  wnd = ifra meelem.con tentWindow ;
        5457                    if(g bBsIE4)
        5458                    {
        5459                             try{
        5460                                      var h =  getDocHeig ht(wnd.doc ument);
        5461                                      var w =  getDocWidt h(wnd.docu ment);
        5462  
        5463                                      iframeel em.style.w idth = w +  "px" ;
        5464                                      iframeel em.style.h eight = h  + "px" ;
        5465                             }
        5466                             catch( e) {}
        5467                    }
        5468                    else
        5469                    {
        5470                             reques tCpHTML5Si ze(wnd, id );
        5471                    }
        5472           }
        5473   }
        5474  
        5475   //End to c ollaborate  with othe r event ha ndler sett ings
        5476  
        5477   /// Sectio n End  - C CSSP DHTM  2 (JavaScr ipt 1.2)
        5478  
        5479   //// Segme nt End --  (JavaScrip t 1.2)