48. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 9/24/2019 1:37:49 PM Eastern Daylight 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.

48.1 Files compared

# Location File Last Modified
1 PCL-5_v1_build_8.zip\v1_build 8\Unredacted\spp_mha_web-development.zip\spp_mha_web-development\Delphi\MHA\help\YS MHA Help eHlpDhtm.js Wed Jul 31 17:35:31 2019 UTC
2 PCL-5_v1_build_8.zip\v1_build 8\Unredacted\spp_mha_web-development.zip\spp_mha_web-development\Delphi\MHA\help\YS MHA Help eHlpDhtm.js Mon Sep 23 16:07:31 2019 UTC

48.2 Comparison summary

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

48.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

48.4 Active regular expressions

No regular expressions were active.

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