2208. EPMO Open Source Coordination Office Redaction File Detail Report

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

2208.1 Files compared

# Location File Last Modified
1 Tue Jan 2 16:58:01 2018 UTC
2 HTRE_P2.zip\src.zip\output\IHTA OLH Files.zip\ihta_admin.zip\hdi.zip whtopic_nc.js Thu Nov 14 15:06:00 2013 UTC

2208.2 Comparison summary

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

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

2208.4 Active regular expressions

No regular expressions were active.

2208.5 Comparison detail

        1   //      We bHelp 5.10 .005
        2   var gsPPat h="";
        3   var gaPath s=new Arra y();
        4   var gaAven ues=new Ar ray();
        5   var gaSear chTerms =  new Array( );
        6   var gChild PathInMain ="";
        7  
        8   var goFram e=null;
        9   var gsStar tPage="";
        10   var gsRelC urPagePath ="";
        11   var gsSear chFormHref ="";
        12   var gnTopi cOnly=-1;
        13   var gnOutm ostTopic=- 1;
        14   var gsFtsB reakChars= "\t\r\n\"\ \ .,!@#$%^ &*()~'`:;< >?/{}[]|+- =\x85\x92\ x93\x94\x9 5\x96\x97\ x99\xA9\xA E\xB7";
        15   var gsHili teSearchSe tting = "e nable,#b2b 4bf,black" ;
        16   var gsBkgn dColor="";
        17   var gsText Color="";
        18   var BTN_TE XT=1;
        19   var BTN_IM G=2;
        20  
        21   var goSync =null;
        22  
        23   var goShow =null;
        24   var goHide =null;
        25  
        26   var goPrev =null;
        27   var goNext =null;
        28   var gnForm =0;
        29   var goShow Nav=null;
        30   var goHide Nav=null;
        31  
        32   var goWebS earch=null ;
        33  
        34   var gsBtnS tyle="";
        35   var gaButt ons=new Ar ray();
        36   var gaType s=new Arra y();
        37   var whtopi c_foldUnlo ad=null;
        38   var gbWhTo pic=false;
        39   var gbChec kSync=fals e;
        40   var gbSync Enabled=fa lse;
        41   var gaBrea dcrumbsTra il = new A rray();
        42   var gnYPos  = -1;
        43   var gbBadU riError =  false;
        44  
        45   function A ddMasterBr eadcrumbs( relHomePag e, styleIn fo, separa tor, strHo me, strHom ePath)
        46   {
        47           de lete gaBre adcrumbsTr ail;
        48           ga Breadcrumb sTrail = n ew Array() ;
        49           va r sTopicFu llPath = _ getPath(do cument.loc ation.href );
        50           va r sXmlFull Path = _ge tFullPath( sTopicFull Path, relH omePage);
        51           va r sXmlFold erPath = _ getPath(sX mlFullPath );
        52           va r sdocPath  = _getFul lPath(sXml FolderPath , "MasterD ata.xml");
        53  
        54           tr y
        55           {
        56                             GetMas terBreadcr umbs(sdocP ath, style Info, sepa rator);
        57           }
        58           ca tch(err)
        59           {
        60                    //so me error o ccurred wh ile readin g masterda ta.xml
        61           }
        62           va r i = gaBr eadcrumbsT rail.lengt h;
        63           if (i == 0)
        64           {
        65                var strT rail;
        66                if(style Info == "b readcrumbs ")
        67                         strTrail =  "<a class =\""+ styl eInfo + "\ "" + " hre f=\"" + st rHomePath  + "\">" +  strHome +  "</a> " +  ((strHome  == "")? "" :separator ) + " ";
        68                else
        69                    strT rail = "<a  style=\"" + styleInf o + "\"" +  " href=\" " + strHom ePath + "\ ">" + strH ome + "</a > " + ((st rHome == " ")? "":sep arator) +  " ";
        70                    docu ment.write (strTrail) ;
        71           }
        72           el se
        73           {
        74                    whil e(i > 0)
        75                    {
        76                             docume nt.write(g aBreadcrum bsTrail[i- 1]);
        77                             i--;
        78                    }
        79           }
        80           re turn;
        81   }
        82  
        83   var xmlHtt p1;
        84   var xmlDoc 1;
        85   function p rocessReqC hange1()
        86   {
        87      // only  if req sh ows "loade d"
        88       if (xm lHttp1.rea dyState ==  4) 
        89                    xmlD oc1 = xmlH ttp1.respo nseXML;
        90   }
        91   function G etMasterBr eadcrumbs( masterFull Path, styl eInfo, sep arator)
        92   {
        93           // dont read  if not par t of merge d projects
        94           if (masterFul lPath.inde xOf("/merg edProjects /") == -1  &&
        95                             master FullPath.i ndexOf("\\ mergedProj ects\\") = = -1)
        96                             return ;
        97                                      
        98           if (gbIE5)
        99           {
        100                    xmlD oc1=new Ac tiveXObjec t("Microso ft.XMLDOM" );
        101                    xmlD oc1.async= "false";
        102                    xmlD oc1.load(m asterFullP ath);
        103           }
        104           el se if(gbNa v6)
        105           {
        106                    var  req=new XM LHttpReque st();
        107                    req. open("GET" , masterFu llPath, fa lse);   
        108                    req. send(null) ;   
        109                    xmlD oc1 = req. responseXM L;
        110           }
        111           el se if(gbSa fari3)
        112           {
        113                    if(w indow.XMLH ttpRequest )
        114                             xmlHtt p1 = new X MLHttpRequ est();
        115                    if(x mlHttp1)
        116                    {
        117                             xmlHtt p1.onready statechang e=processR eqChange1;
        118                             xmlHtt p1.open("G ET", maste rFullPath,  false);
        119                             xmlHtt p1.send("" );
        120                    }
        121           }
        122  
        123           if (xmlDoc1 = = null) th row "error ";
        124  
        125           va r root = x mlDoc1.doc umentEleme nt;
        126           va r masterPr oj = xmlDo c1.getElem entsByTagN ame("Maste rProject") ;
        127           va r masterNa me="";
        128           va r masterRe lPath="";
        129  
        130           if (masterPro j)
        131           {
        132                    mast erName = m asterProj[ 0].getAttr ibute("nam e");
        133                    mast erRelPath  = masterPr oj[0].getA ttribute(" url");               
        134           }
        135  
        136           va r x = xmlD oc1.getEle mentsByTag Name("item ");
        137           va r i = 0;
        138           va r strTrail  = "";
        139  
        140           fo r(i=0; i<  x.length;  i++)
        141           {
        142                    var  name= x[i] .getAttrib ute("name" );
        143                    var  path = x[i ].getAttri bute("url" );
        144  
        145                    name  = name.re place(/\\\ \/g, '\\')
        146                    
        147                    if(p ath == "")
        148                    {
        149                             strTra il += name  + " " + s eparator +  " ";
        150                    }
        151                    else
        152                    {
        153                             var sH refRelPath  = _getPat h(masterFu llPath) +  masterRelP ath;
        154                             var sH refFullPat h = _getFu llPath(sHr efRelPath,  path); 
        155                             if(sty leInfo ==  "breadcrum bs")
        156                                 st rTrail +=  "<a class= \""+ style Info + "\" " + " href =\"" + sHr efFullPath  + "\">" +  name + "< /a> " + se parator +  " ";
        157                             else
        158                                 st rTrail +=  "<a style= \""+ style Info + "\" " + " href =\"" + sHr efFullPath  + "\">" +  name + "< /a> " + se parator +  " ";
        159                    }
        160  
        161           }        
        162  
        163           ga Breadcrumb sTrail[gaB readcrumbs Trail.leng th] = strT rail;
        164  
        165           //  call for  master bre adcrumbs
        166           ma sterFullPa th = _getP ath(master FullPath)
        167           ma sterFullPa th = _getF ullPath(ma sterFullPa th, master RelPath);
        168           ma sterFullPa th = _getF ullPath(ma sterFullPa th, "Maste rData.xml" );
        169  
        170           Ge tMasterBre adcrumbs(m asterFullP ath, style Info, sepa rator);
        171           
        172   }
        173  
        174  
        175   /////////h ighlight S earch Rout ines ///// ////
        176   function C losedRange ( a_nStart , a_nEnd )
        177   {
        178           th is.nStart  = a_nStart ;
        179           th is.nEnd =  a_nEnd;
        180   }
        181  
        182   ////////ge neric func tions //// //////
        183  
        184   var g_Rune sWordBreak s=gsFtsBre akChars;
        185   var g_Rune sWhiteSpac es="\x20\x 09\x0D\x0A \xA0";
        186  
        187   function _ isWordBrea k( a_ch )
        188   {
        189           re turn ( g_R unesWordBr eaks.index Of( a_ch )  >= 0 );
        190   }
        191  
        192   function _ isWhiteSpa ce( a_ch )
        193   {
        194           re turn ( g_R unesWhiteS paces.inde xOf( a_ch  ) >= 0 );
        195   }
        196  
        197   function _ getLengthO fWordBreak ( a_str, a _nFrom )
        198   {
        199           va r i = a_nF rom, nLen  = a_str.le ngth;
        200           wh ile ( i <  nLen && _i sWordBreak ( a_str.ch arAt( i )  ) )
        201                    ++i;
        202           re turn i - a _nFrom;
        203   }
        204  
        205   function _ getLengthO fWord( a_s tr, a_nFro m )
        206   {
        207           va r i = a_nF rom, nLen  = a_str.le ngth;
        208           wh ile ( i <  nLen &&      !_isWord Break( a_s tr.charAt(  i ) ) )
        209                    ++i;
        210           re turn i - a _nFrom;
        211   }
        212  
        213   function _ getWord( a _str, a_nF rom )
        214   {
        215           va r nLen = _ getLengthO fWord( a_s tr, a_nFro m );
        216           re turn a_str .substr( a _nFrom, nL en );
        217   }
        218  
        219   function _ getPositio nInc( a_st r, a_nFrom  )
        220   {
        221           va r i = a_nF rom, nLen  = a_str.le ngth, nInc  = 1;
        222           wh ile ( i <  nLen && _i sWordBreak ( a_str.ch arAt( i )  ) )
        223           {
        224                    if (  !_isWhite Space( a_s tr.charAt(  i ) ) )
        225                             nInc++ ;
        226  
        227                    i++;
        228           }
        229           re turn nInc;
        230   }
        231  
        232   function _ getNormali zedWord( a _strWord )
        233   {
        234           va r strLower  = a_strWo rd.toLower Case();
        235           
        236           re turn strLo wer;
        237   }
        238  
        239   function D olWord( a_ strWord, a _nPosition , a_nCharL ocation )
        240   {
        241           th is.strWord  = a_strWo rd;
        242           th is.nPositi on = a_nPo sition;
        243           th is.nCharLo cation = a _nCharLoca tion;
        244   }
        245  
        246   function d olSegment(  a_strSrc  )
        247   {
        248           va r nLen = a _strSrc.le ngth;
        249           va r nCur = 0 ;
        250           va r nPositio n = 1;
        251           va r strWord  = "";
        252           va r aRslt =  new Array( );
        253  
        254           nC ur += _get LengthOfWo rdBreak( a _strSrc, n Cur );
        255           wh ile ( nCur  < nLen )
        256           {
        257                    strW ord = _get Normalized Word( _get Word( a_st rSrc, nCur  ) );
        258                    aRsl t[aRslt.le ngth] = ne w DolWord(  strWord,  nPosition,  nCur );
        259                    
        260                    nCur  += strWor d.length;
        261                    nPos ition += _ getPositio nInc( a_st rSrc, nCur  );
        262                    nCur  += _getLe ngthOfWord Break( a_s trSrc, nCu r );
        263           }
        264           re turn aRslt ;
        265   }
        266  
        267   ////////// / Dom Text  node //// ////////// /
        268   var s_strH lStart=nul l;
        269   var s_strH lEnd =null ;
        270  
        271   function D omTextNode ( a_Node,  a_nFrom )
        272   {
        273           th is.node =  a_Node;
        274           th is.nFrom =  a_nFrom;
        275           
        276           th is.aClosed Ranges = n ew Array() ;
        277  
        278           th is.getClos edRanges =  function(  a_aRanges , a_nStart  )
        279           {
        280                    var  nTo = this .nFrom + a _Node.data .length;                        
        281                    for  ( var i =  a_nStart;  i < a_aRan ges.length ; i++ )
        282                    {
        283                             if ( a _aRanges[i ].nStart < = nTo &&
        284                                       a_aRang es[i].nEnd  >= this.n From )
        285                             {
        286                                      this.aCl osedRanges [this.aClo sedRanges. length] =  new Closed Range( a_a Ranges[i]. nStart > t his.nFrom  ? a_aRange s[i].nStar t : this.n From,
        287                                                                                                                                                                                    a_aRanges [i].nEnd <  nTo ? a_a Ranges[i]. nEnd : nTo  );
        288                             }
        289                             if ( a _aRanges[i ].nEnd > n To )
        290                             {
        291                                      return i ;
        292                             }
        293                    }
        294                    retu rn i;
        295           }
        296  
        297           th is.doHighl ight = fun ction( a_a Ranges, a_ nStart )
        298           {
        299                    s_st rHlStart =  "<font st yle='color :" + gsTex tColor + " ; backgrou nd-color:"  + gsBkgnd Color + "' >";
        300                    s_st rHlEnd = " </font>";
        301  
        302                    if (  a_nStart  >= a_aRang es.length  )
        303                             return  a_nStart;
        304  
        305                    var  nEnd = thi s.getClose dRanges( a _aRanges,  a_nStart ) ;
        306                    if (  this.aClo sedRanges. length ==  0 )
        307                             return  nEnd;
        308                    var  strText =  this.node. data;
        309                    var  strHTML =  "";
        310                    var  nLastStart  = 0;
        311                    for  ( var i =  0; i < thi s.aClosedR anges.leng th; i++ )
        312                    {
        313                             strHTM L += _text ToHtml_non bsp(strTex t.substrin g( nLastSt art, this. aClosedRan ges[i].nSt art - this .nFrom ));
        314                             strHTM L += s_str HlStart;
        315                             strHTM L += _text ToHtml_non bsp(strTex t.substrin g( this.aC losedRange s[i].nStar t - this.n From,
        316                                                                                             this.aCl osedRanges [i].nEnd -  this.nFro m ));
        317                             strHTM L += s_str HlEnd;
        318  
        319                             nLastS tart = thi s.aClosedR anges[i].n End - this .nFrom;
        320                    }
        321                    strH TML += _te xtToHtml_n onbsp(strT ext.substr ( nLastSta rt ));
        322                    
        323                    var  spanElemen t = docume nt.createE lement( "s pan" );
        324                    span Element.in nerHTML =  strHTML;
        325                    if ( gbIE)
        326                    {
        327                         //for IE,  when assig ning strin g to inner HTML, lead ing whites paces are  dropped
        328                         if ((strHT ML.length  >0)&&(strH TML.charAt (0) == " " ))
        329                             spanEl ement.inne rHTML = "& nbsp;" + s panElement .innerHTML  ;       
        330                    }   
        331                    
        332                    this .node.pare ntNode.rep laceChild(  spanEleme nt, this.n ode );
        333                    if(g nYPos == - 1)
        334                    {
        335                             var el emObj = sp anElement;
        336                             var cu rtop = 0;
        337                             if (el emObj.offs etParent)
        338                             {
        339                                      while (e lemObj.off setParent)
        340                                      {
        341                                               curtop +=  elemObj.of fsetTop
        342                                               elemObj =  elemObj.of fsetParent ;
        343                                      }
        344                             }
        345                             else i f (elemObj .y)
        346                                      curtop + = elemObj. y;
        347                             
        348                             gnYPos  = curtop;
        349                    }
        350                    retu rn nEnd;
        351           };
        352   }
        353  
        354   function D omTexts()
        355   {
        356           th is.strText  = "";
        357           th is.aNodes  = new Arra y();
        358           th is.aRanges  = new Arr ay();
        359  
        360           th is.addElem entNode =  function(  a_Node )
        361           {
        362                    if (  a_Node ==  null || a _Node.chil dNodes ==  null )
        363                             return ;
        364  
        365                    var  nLen = a_N ode.childN odes.lengt h;
        366                    for  ( var i =  0; i < nLe n; i++ )
        367                    {
        368                             var no de = a_Nod e.childNod es.item( i  );
        369                             if ( n ode != nul l )
        370                             {
        371                                      if ( nod e.nodeType  == 3 )
        372                                      {
        373                                               this.addTe xtNode( no de );
        374                                      }
        375                                      else if  ( node.nod eType == 1  )
        376                                      {
        377                                               this.addEl ementNode(  node );
        378                                      }
        379                             }
        380                    }
        381           }
        382  
        383           th is.addText Node = fun ction( a_N ode )
        384           {
        385                    if (  a_Node ==  null )
        386                             return ;
        387  
        388                    var  strInnerTe xt = a_Nod e.data;
        389                    if (  strInnerT ext.length  != 0 )
        390                    {
        391                             var nF rom = this .strText.l ength;
        392                             this.s trText +=  strInnerTe xt;
        393                             this.a Nodes[this .aNodes.le ngth] = ne w DomTextN ode( a_Nod e, nFrom ) ;
        394                    }
        395           }
        396  
        397           th is.isWordM atch = fun ction( a_s trHlWord,  a_strTextW ord )
        398           {
        399                    retu rn a_strTe xtWord.ind exOf(a_str HlWord.toL owerCase() ) != -1;
        400           }
        401                                                
        402           th is.makeHig hlightRang es = funct ion()
        403           {
        404                    if(t ypeof(gaSe archTerms[ 0]) == "un defined")
        405                             return ;
        406  
        407                    var  str = gaSe archTerms[ 0].toLower Case();
        408                    for( var j = 1;  j < gaSea rchTerms.l ength; j++ )
        409                    {
        410                             str +=  "|" + gaS earchTerms [j].toLowe rCase();
        411                             
        412                    }
        413  
        414                    var  regexp = n ew RegExp( str, "i");
        415  
        416                    var  aWords = d olSegment(  this.strT ext );
        417                    for  ( var i =  0; i < aWo rds.length ; i++ )
        418                    {
        419                             var n  = new Obje ct;
        420                             n.inde x = 0;
        421                             var pr evLen = 0;
        422                             var tm pStr1 = aW ords[i].st rWord.toLo werCase();
        423  
        424                             while( n != null  && n.index  > -1)
        425                             {
        426                                      n = rege xp.exec(tm pStr1);
        427  
        428                                      if (n !=  null &&   n.index >  -1 )
        429                                      {
        430                                               var strWor d = n[0];
        431                                               this.aRang es[this.aR anges.leng th] = new  ClosedRang e( aWords[ i].nCharLo cation + p revLen + n .index,
        432                                                                         aWords [i].nCharL ocation +  prevLen +  n.index +  strWord.le ngth);
        433                                               prevLen =  prevLen +  n.index +  strWord.le ngth;                                                        
        434                                               tmpStr1 =  tmpStr1.su bstring(n. index + st rWord.leng th, tmpStr 1.length);
        435                                      }
        436                             }
        437                    }
        438           }
        439           
        440           th is.highlig htNodes =  function()
        441           {
        442                    var  nFrom = 0;
        443                    for  ( var i =  0; i < thi s.aNodes.l ength; i++  )
        444                             nFrom  = this.aNo des[i].doH ighlight(  this.aRang es, nFrom  );
        445           }
        446  
        447           th is.jump2Fi rstHighlig htedWord =  function( )
        448           {
        449                    if ( gnYPos > 5 1)
        450                             window .scrollTo( 0, gnYPos- 50);
        451           }
        452   }
        453  
        454   function p rocessSusp endNodes(  a_aNodes )
        455   {
        456           if  ( a_aNode s.length = = 0 )
        457                    retu rn false;
        458  
        459           va r dt = new  DomTexts( );
        460  
        461           // build dom  texts...
        462           fo r ( var i  = 0; i < a _aNodes.le ngth; i++  )
        463           {
        464                    var  node = a_a Nodes[i];
        465                    if (  node.node Type == 1  )
        466                    {
        467                             dt.add ElementNod e( node );
        468                    }
        469                    else  if ( node .nodeType  == 3 )
        470                    {
        471                             dt.add TextNode(  node );
        472                    }
        473           }
        474           
        475           dt .makeHighl ightRanges ();
        476           dt .highlight Nodes();
        477           dt .jump2Firs tHighlight edWord();
        478   }
        479  
        480   var s_strR ecursiveTa gs = "sub  sup img ap plet objec t br ifram e embed no embed para m area inp ut " +
        481                                                        " select tex tarea butt on option  hr frame n oframes ma rquee labe l p dl " +
        482                                                        " div center  noscript  blockquote  form isin dex table  fieldset a ddress lay er " +
        483                                                        " dt dd capt ion thead  tfoot tbod y tr th td  lengend h 1 h2 h3 h4  h5 h6 " +
        484                                                        " ul ol dir  menu li pr e xmp list ing plaint ext ins de l";
        485  
        486   function d oesTagRecu rsiveProce ss( a_Node  )
        487   {
        488           if  ( a_Node  == null )
        489                    retu rn false;
        490  
        491           va r strTagNa me = a_Nod e.tagName. toLowerCas e();
        492           va r rg = "\\ b" + strTa gName + "\ \b";
        493           va r ss = s_s trRecursiv eTags.matc h( rg );
        494           re turn ss !=  null;
        495   }
        496  
        497   function d oHighLight DomElement ( a_aSuspe ndedNodes,  a_Node )
        498   {
        499           va r childNod es = a_Nod e.childNod es;
        500           
        501           if  ( childNo des == nul l || child Nodes.leng th == 0 )
        502                    retu rn;
        503  
        504           va r nLen = c hildNodes. length;
        505           fo r ( var i  = 0; i < n Len; i++ )
        506           {
        507                    var  node = chi ldNodes.it em( i );
        508                    if (  node == n ull )
        509                             contin ue;
        510  
        511                    if (  node.node Type == 1  )
        512                    {        //elem ent
        513                             if ( d oesTagRecu rsiveProce ss( node )  )
        514                             {
        515                                      if ( a_a SuspendedN odes.lengt h > 0 )
        516                                      {
        517                                               processSus pendNodes(  a_aSuspen dedNodes ) ;
        518                                               a_aSuspend edNodes.le ngth = 0;
        519                                      }
        520                             }
        521                             doHigh LightDomEl ement( a_a SuspendedN odes, node  );
        522                    }
        523                    else  if ( node .nodeType  == 3 )
        524                    {        //text
        525                             a_aSus pendedNode s[a_aSuspe ndedNodes. length] =  node;
        526                    }
        527           }
        528   }
        529  
        530   function h ighlightDo cument()
        531   {
        532           if  ( !docume nt.body ||  document. body == nu ll )
        533                    retu rn;
        534                    
        535           va r aSuspend edNodes =  new Array( );
        536           do HighLightD omElement(  aSuspende dNodes, do cument.bod y );
        537           pr ocessSuspe ndNodes( a SuspendedN odes );
        538   }
        539  
        540   /////// st art routin e //////// /
        541   function I sHighLight Required()
        542   {
        543           va r bRetVal  = false;
        544           va r searchSe tting = gs HiliteSear chSetting. match( "^( .+),(.+),( .*)$" );
        545  
        546           if (searchSet ting != nu ll)
        547           {
        548                    if(s earchSetti ng[1] == " enable")
        549                    {
        550                             gsBkgn dColor = s earchSetti ng[2];
        551                             gsText Color = se archSettin g[3];
        552                             bRetVa l = true;
        553                    }
        554           }
        555           re turn bRetV al;
        556   }
        557  
        558   function h ighlightSe arch()
        559   {
        560           if (!IsHighLi ghtRequire d())       return;
        561  
        562           // check pane  in focus  is Search  pane.
        563           va r oMsg=new  whMessage (WH_MSG_GE TPANEINFO, this,1,nul l);
        564           if (SendMessa ge(oMsg))  {
        565                    if ( oMsg.oPara m != "fts"
        566                             return ;
        567           }
        568  
        569           // check high light resu lt is enab led.
        570           va r oMsg=new  whMessage (WH_MSG_HI LITESEARCH ,this,1,nu ll);
        571           if (SendMessa ge(oMsg))
        572           {
        573                    if(o Msg.oParam  == false)
        574                             return ;
        575           }
        576           
        577           // check num  of results  greater t han 0
        578           va r oMsg=new  whMessage (WH_MSG_GE TNUMRSLT,t his,1,null );
        579           if (SendMessa ge(oMsg))
        580           {
        581                    if(o Msg.oParam  <= 0)
        582                             return ;
        583           }
        584           
        585           // get string  in search  box.
        586           va r oMsg = n ew whMessa ge(WH_MSG_ GETSEARCHS TR, this,  1, null);
        587           va r strTerms  = "";
        588           if  (SendMess age(oMsg))
        589           {
        590                    strT erms = oMs g.oParam;          
        591           }
        592           
        593           St artHighLig htSearch(s trTerms); 
        594  
        595   }
        596  
        597   function S tartHighLi ghtSearch( strTerms)
        598   {
        599           if (!IsHighLi ghtRequire d())       return;
        600  
        601           fi ndSearchTe rms(strTer ms, false) ;
        602           
        603           hi ghlightDoc ument();
        604   }
        605  
        606   //////// c ommon with  FTS routi nes to ide ntify stop  word etc.  ///////// ///
        607  
        608   function f indSearchT erms(searc hTerms, bS kip)
        609   {
        610           if (searchTer ms != "")
        611           {
        612                    var  sInput=sea rchTerms;
        613                    var  sCW="";
        614                    var  nS=-1;
        615                    var  nSep=-1;
        616                    for( var nChar= 0;nChar<gs FtsBreakCh ars.length ;nChar++){
        617                             var nF ound=sInpu t.indexOf( gsFtsBreak Chars.char At(nChar)) ;
        618                             if((nF ound!=-1)& &((nS==-1) ||(nFound< nS))){
        619                                      nS=nFoun d;
        620                                      nSep=nCh ar;
        621                             }
        622                    }
        623                    if(n S==-1){
        624                             sCW=sI nput;
        625                             sInput ="";
        626                    }
        627                    else
        628                    {
        629                             sCW=sI nput.subst ring(0,nS) ;
        630                             sInput =sInput.su bstring(nS +1);
        631                    }
        632  
        633                    sear chTerms=sI nput;
        634                    
        635                    var  bAdd = tru e;
        636                    if(( sCW=="or") ||(sCW=="| ")||(sCW== "OR"))
        637                    {
        638                             bSkip  = false;
        639                             bAdd =  false;
        640                    }
        641                    else  if((sCW== "and")||(s CW=="&")|| (sCW=="AND "))
        642                    {
        643                             bSkip  = false;
        644                             bAdd =  false;
        645                    }
        646                    else  if((sCW== "not")||(s CW=="~")|| (sCW=="NOT "))
        647                    {
        648                             bSkip  = true;
        649                             bAdd =  false;
        650                    }
        651  
        652                    if(b Add && !bS kip && sCW !="" && sC W!=" " &&  !IsStopWor d(sCW,gaFt sStop)){
        653                             gaSear chTerms[ga SearchTerm s.length]  = sCW;
        654                             var st emWord = G etStem(sCW );
        655                             if(ste mWord != s CW)
        656                                      gaSearch Terms[gaSe archTerms. length] =  stemWord;
        657                    }
        658                    find SearchTerm s(searchTe rms, bSkip );
        659           }
        660           
        661   }
        662  
        663   function G etStem(szW ord)
        664   {
        665           if (gaFtsStem ==null||ga FtsStem.le ngth==0)re turn szWor d;
        666           if (IsNonAsci i(szWord))               return  szWord;
        667           va r aStems=g aFtsStem;
        668  
        669           va r nStemPos =0;
        670           va r csStem=" ";
        671           fo r(var iSte m=0;iStem< aStems.len gth;iStem+ +){
        672  
        673                    if(a Stems[iSte m].length> =szWord.le ngth-1)        contin ue;
        674                    nSte mPos=szWor d.lastInde xOf(aStems [iStem]);
        675                    if(n StemPos>0) {
        676                             var cs sub=szWord .substring (nStemPos) ;
        677                             if(css ub==aStems [iStem]){
        678                                      csStem=s zWord;
        679                                      if(szWor d.charAt(n StemPos-2) ==szWord.c harAt(nSte mPos-1)){
        680                                               csStem=csS tem.substr ing(0,nSte mPos-1);
        681                                      }else{
        682                                               csStem=csS tem.substr ing(0,nSte mPos);
        683                                      }
        684                                      return c sStem;
        685                             }
        686                    }
        687           }
        688           re turn szWor d;
        689   }
        690  
        691   function I sStopWord( sCW,aFtsSt opArray)
        692   {
        693           va r nStopArr ayLen=aFts StopArray. length;
        694           va r nB=0;
        695           va r nE=nStop ArrayLen-1 ;
        696           va r nM=0;
        697           va r bFound=f alse;
        698           va r sStopWor d="";
        699           wh ile(nB<=nE ){
        700                    nM=( nB+nE);
        701                    nM>> =1;
        702                    sSto pWord=aFts StopArray[ nM];
        703                    if(c ompare(sCW ,sStopWord )>0){
        704                             nB=(nB ==nM)?nM+1 :nM;
        705                    }els e{
        706                             if(com pare(sCW,s StopWord)< 0){
        707                                      nE=(nE== nM)?nM-1:n M;
        708                             }else{
        709                                      bFound=t rue;
        710                                      break;
        711                             }
        712                    }
        713           }
        714           re turn bFoun d;
        715   }
        716  
        717   /////// en d highligh t search r ountines / ////////// //
        718  
        719   function s etButtonFo nt(sType,s FontName,s FontSize,s FontColor, sFontStyle ,sFontWeig ht,sFontDe coration)
        720   {
        721           va r vFont=ne w whFont(s FontName,s FontSize,s FontColor, sFontStyle ,sFontWeig ht,sFontDe coration);
        722           gs BtnStyle+= ".whtbtn"+ sType+"{"+ getFontSty le(vFont)+ "}";
        723   }
        724  
        725   function w riteBtnSty le()
        726   {
        727           if (gaButtons .length>0)
        728           {
        729                    if(g sBtnStyle. length>0)
        730                    {
        731                             var sS tyle="<sty le type='t ext/css'>" ;
        732                             sStyle +=gsBtnSty le+"</styl e>";
        733                             docume nt.write(s Style);
        734                    }
        735           }
        736   }
        737  
        738   function b utton(sTex t,nWidth,n Height)
        739   {
        740           th is.sText=s Text;
        741           th is.nWidth= nWidth;
        742           th is.nHeight =nHeight;
        743           
        744           th is.aImgs=n ew Array() ;
        745           va r i=0;
        746           wh ile(button .arguments .length>i+ 3)
        747           {
        748                    this .aImgs[i]= button.arg uments[3+i ];
        749                    i++;
        750           }
        751   }
        752  
        753  
        754   //recursiv ely finds  the parent  project S tartPage p ath if exi sts 
        755   //also com putes the  child toc  path in th e parent t oc recursi vely until  
        756   //main pro j
        757  
        758   var xmlhtt p=null;
        759   var xmlDoc  = null;
        760   function p rocessReqC hange()
        761   {
        762      // only  if req sh ows "loade d"
        763       if (xm lhttp.read yState ==  4) 
        764                    xmlD oc = xmlht tp.respons eXML;
        765   }
        766  
        767   function g etPPStartP agePath(sP ath)
        768   {
        769           if (sPath.len gth != 0)
        770           {
        771                    var  sXmlFolder Path = _ge tPath(sPat h);
        772                    if(s XmlFolderP ath.indexO f("/merged Projects/" ) == -1 &&
        773                             sXmlFo lderPath.i ndexOf("\\ mergedProj ects\\") = = -1)
        774                             return  sPath;
        775                    
        776                    var  sdocPath =  _getFullP ath(sXmlFo lderPath,  "MasterDat a.xml");
        777                    try
        778                    {
        779                             if(gbI E5) //Inte rnet Explo rer
        780                             {
        781                                      xmlDoc=n ew ActiveX Object("Mi crosoft.XM LDOM");
        782                                      xmlDoc.a sync=false ;
        783                                      xmlDoc.l oad(sdocPa th);
        784                             }
        785                             else i f(gbNav6)  //Firefox,  Mozilla,  Opera etc.
        786                             {
        787                                      var req= new XMLHtt pRequest() ;
        788                             req.op en("GET",  sdocPath,  false);   
        789                         req.send(n ull); 
        790                         xmlDoc = r eq.respons eXML;
        791                             }
        792                             else i f(gbSafari 3) //Safar i
        793                             { 
        794                                      if(windo w.XMLHttpR equest)
        795                                               xmlhttp =  new XMLHtt pRequest() ;
        796                                      if(xmlht tp)
        797                                      {
        798                                               xmlhttp.on readystate change=pro cessReqCha nge;
        799                                               xmlhttp.op en("GET",  sdocPath,  false);
        800                                               xmlhttp.se nd("");
        801                                      }
        802                             }
        803                    }
        804                    catc h(e){
        805                             gbBadU riError=tr ue;
        806                             return  sPath;
        807                    }
        808  
        809                    if(x mlDoc == n ull) retur n sPath;                           
        810                    var  root = xml Doc.docume ntElement;
        811                    if(r oot == nul l) return  sPath;
        812                    var  masterProj  = null;
        813                    try
        814                    {
        815                             master Proj = xml Doc.getEle mentsByTag Name("sync info");   
        816                             var ch ildTocPosI nParent =  null;
        817                             if(mas terProj)
        818                             {
        819                                      var star tpage = xm lDoc.getEl ementsByTa gName("sta rtpage");        
        820                                      masterSt artPageNam e = startp age[0].get Attribute( "name");
        821                                      masterSt artPageRel Path = sta rtpage[0]. getAttribu te("url");
        822                                      var tocp os = xmlDo c.getEleme ntsByTagNa me("tocpos ");
        823                                      childToc PosInParen t = tocpos [0].getAtt ribute("pa th");
        824                                                       
        825                             }
        826                    }
        827                    catc h(e){retur n sPath;}
        828                    if(c hildTocPos InParent)
        829                    {
        830                             childT ocPosInPar ent = chil dTocPosInP arent.repl ace(/\\n/g , "\n");
        831                             gChild PathInMain  = childTo cPosInPare nt +  gChi ldPathInMa in;
        832                    }
        833                    sXml FolderPath  = _getFul lPath(sXml FolderPath , masterSt artPageRel Path+maste rStartPage Name);
        834                    sXml FolderPath  = getPPSt artPagePat h(sXmlFold erPath);
        835                    retu rn sXmlFol derPath;
        836           }
        837   }
        838  
        839   //project  info
        840   function s etRelStart Page(sPath )
        841   {
        842           if (gsPPath.l ength==0)
        843           {
        844                    gsPP ath=_getFu llPath(_ge tPath(docu ment.locat ion.href), _getPath(s Path));
        845                    gsSt artPage=_g etFullPath (_getPath( document.l ocation.hr ef),sPath) ;
        846                    try{
        847                             gsStar tPage = ge tPPStartPa gePath(gsS tartPage);
        848                    }
        849                    catc h(e)
        850                    {
        851                             alert( "Error rea ding maste rData.xml" );
        852                    }
        853                    gsRe lCurPagePa th=_getRel ativeFileN ame(gsStar tPage,docu ment.locat ion.href);
        854                    for( var i=0; i < gaPaths. length; i+ +)
        855                             gaPath s[i] = gCh ildPathInM ain + gaPa ths[i];
        856           }
        857   }
        858  
        859   function g etImage(oI mage,sType )
        860   {
        861           va r sImg="";
        862           if (oImage&&o Image.aImg s&&(oImage .aImgs.len gth>0))
        863           {
        864                    sImg +="<img al t=\""+sTyp e+"\" src= \""+oImage .aImgs[0]+ "\"";
        865                    if(o Image.nWid th>0)
        866                             sImg+= " width="+ oImage.nWi dth;
        867                    if(o Image.nHei ght>0)
        868                             sImg+= " height=" +oImage.nH eight;
        869                    sImg +=" border =0>";
        870           }
        871           re turn sImg;
        872   }
        873  
        874   function a ddTocInfo( sTocPath)
        875   {
        876           ga Paths[gaPa ths.length ]=sTocPath ;
        877   }
        878  
        879  
        880   var flex_n extLocatio n;
        881   var flex_p reviousLoc ation;
        882  
        883   function a ddAvenueIn fo(sName,s Prev,sNext )
        884   {
        885           ga Avenues[ga Avenues.le ngth]=new  avenueInfo (sName,sPr ev,sNext);
        886           fl ex_previou sLocation  = sPrev;
        887           fl ex_nextLoc ation = sN ext;
        888   }
        889  
        890   function a ddButton(s Type,nStyl e,sText,sH ref,sOnCli ck,sOnMous eOver,sOnL oad,nWidth ,nHeight,s Img1,sImg2 ,sImg3)
        891   {
        892           va r sButton= "";
        893           va r nBtn=gaB uttons.len gth;
        894           if (sType=="p rev")
        895           {
        896                    if(c anGo(false ))
        897                    {
        898                             var sT itle="Prev ious Topic ";
        899                             goPrev =new butto n(sText,nW idth,nHeig ht,sImg1,s Img2,sImg3 );
        900                             sButto n="<a titl e=\""+sTit le+"\" cla ss=\"whtbt nprev\" hr ef=\"javas cript:void (0);\" onc lick=\"goA venue(fals e);return  false;\">" ;
        901                             if(nSt yle==BTN_T EXT)
        902                                      sButton+ =goPrev.sT ext;
        903                             else
        904                                      sButton+ =getImage( goPrev,sTi tle);
        905                             sButto n+="</a>";
        906                    }
        907           }
        908           el se if(sTyp e=="next")
        909           {
        910                    if(c anGo(true) )
        911                    {
        912                             var sT itle="Next  Topic";
        913                             goNext =new butto n(sText,nW idth,nHeig ht,sImg1,s Img2,sImg3 );
        914                             sButto n="<a titl e=\""+sTit le+"\" cla ss=\"whtbt nnext\" hr ef=\"javas cript:void (0);\" onc lick=\"goA venue(true );return f alse;\">";
        915                             if(nSt yle==BTN_T EXT)
        916                                      sButton+ =goNext.sT ext;
        917                             else
        918                                      sButton+ =getImage( goNext,sTi tle);
        919                             sButto n+="</a>";
        920                    }
        921           }
        922           el se if(sTyp e=="show")
        923           {
        924                    if(i sTopicOnly ()&&(!gbOp era6||gbOp era7))
        925                    {
        926                             var sT itle="Show  Navigatio n Componen t";
        927                             goShow =new butto n(sText,nW idth,nHeig ht,sImg1,s Img2,sImg3 );
        928                             sButto n="<a titl e=\""+sTit le+"\" cla ss=\"whtbt nshow\" hr ef=\"javas cript:void (0);\" onc lick=\"sho w();return  false;\"> ";
        929                             if(nSt yle==BTN_T EXT)
        930                                      sButton+ =goShow.sT ext;
        931                             else
        932                                      sButton+ =getImage( goShow,sTi tle);
        933                             sButto n+="</a>";
        934                    }
        935           }
        936           el se if(sTyp e=="hide")
        937           {
        938                    if(! isTopicOnl y()&&!gbOp era6)
        939                    {
        940                             var sT itle="Hide  Navigatio n Componen t";
        941                             goHide =new butto n(sText,nW idth,nHeig ht,sImg1,s Img2,sImg3 );
        942                             sButto n="<a titl e=\""+sTit le+"\" cla ss=\"whtbt nhide\" hr ef=\"javas cript:void (0);\" onc lick=\"hid e();return  false;\"> ";
        943                             if(nSt yle==BTN_T EXT)
        944                                      sButton+ =goHide.sT ext;
        945                             else
        946                                      sButton+ =getImage( goHide,sTi tle);
        947                             sButto n+="</a>";
        948                    }
        949           }
        950           el se if(sTyp e=="showna v")
        951           {
        952                    if(i sShowHideE nable())
        953                    {
        954                             var sT itle="Show  Navigatio n Componen t";
        955                             goShow Nav=new bu tton(sText ,nWidth,nH eight,sImg 1,sImg2,sI mg3);
        956                             sButto n="<a titl e=\""+sTit le+"\" cla ss=\"whtbt nshownav\"  href=\"ja vascript:v oid(0);\"  onclick=\" showHidePa ne(true);r eturn fals e;\">";
        957                             if(nSt yle==BTN_T EXT)
        958                                      sButton+ =goShowNav .sText;
        959                             else
        960                                      sButton+ =getImage( goShowNav, sTitle);
        961                             sButto n+="</a>";
        962                    }
        963           }
        964           el se if(sTyp e=="hidena v")
        965           {
        966                    if(i sShowHideE nable())
        967                    {
        968                             var sT itle="Hide  Navigatio n Componen t";
        969                             goHide Nav=new bu tton(sText ,nWidth,nH eight,sImg 1,sImg2,sI mg3);
        970                             sButto n="<a titl e=\""+sTit le+"\" cla ss=\"whtbt nhidenav\"  href=\"ja vascript:v oid(0);\"  onclick=\" showHidePa ne(false); return fal se;\">";
        971                             if(nSt yle==BTN_T EXT)
        972                                      sButton+ =goHideNav .sText;
        973                             else
        974                                      sButton+ =getImage( goHideNav, sTitle);
        975                             sButto n+="</a>";
        976                    }
        977           }
        978           el se if(sTyp e=="syncto c")
        979           {
        980                    if(g aPaths.len gth>0)
        981                    {
        982                             var sT itle="Sync  TOC";
        983                             goSync =new butto n(sText,nW idth,nHeig ht,sImg1,s Img2,sImg3 );
        984                             sButto n="<a titl e=\""+sTit le+"\" cla ss=\"whtbt nsynctoc\"  href=\"ja vascript:v oid(0);\"  onclick=\" syncWithSh ow();retur n false;\" >";
        985                             if(nSt yle==BTN_T EXT)
        986                                      sButton+ =goSync.sT ext;
        987                             else
        988                                      sButton+ =getImage( goSync,sTi tle);
        989                             sButto n+="</a>";
        990                    }
        991           }
        992           el se if(sTyp e=="websea rch")
        993           {
        994                    if(g sSearchFor mHref.leng th>0)
        995                    {
        996                             var sT itle="WebS earch";
        997                             goWebS earch=new  button(sTe xt,nWidth, nHeight,sI mg1,sImg2, sImg3);
        998                             sButto n="<a titl e=\""+sTit le+"\" cla ss=\"whtbt nwebsearch \" href=\" "+gsSearch FormHref+" \">";
        999                             if(nSt yle==BTN_T EXT)
        1000                                      sButton+ =goWebSear ch.sText;
        1001                             else
        1002                                      sButton+ =getImage( goWebSearc h,sTitle);
        1003                             sButto n+="</a>";
        1004                    }
        1005           }
        1006           el se if(sTyp e=="search form")
        1007           {
        1008                    gaBu ttons[nBtn ]="NeedSea rchForm";
        1009                    gaTy pes[nBtn]= sType;
        1010           }
        1011           if (sButton.l ength!=0)
        1012           {
        1013                    if(n Style==BTN _TEXT)
        1014                             sButto n+="&nbsp; ";
        1015                    gaBu ttons[nBtn ]="<td>"+s Button+"</ td>";
        1016                    gaTy pes[nBtn]= sType;
        1017           }
        1018   }
        1019  
        1020   function i sSyncEnabl ed()
        1021   {
        1022           if (!gbCheckS ync)
        1023           {
        1024                    var  oMsg=new w hMessage(W H_MSG_ISSY NCSSUPPORT ,this,1,nu ll);
        1025                    if(S endMessage (oMsg))
        1026                    {
        1027                             gbSync Enabled=oM sg.oParam;
        1028                    }
        1029                    gbCh eckSync=tr ue;
        1030           }
        1031           re turn gbSyn cEnabled;
        1032   }
        1033  
        1034   function i sInPopup()
        1035   {
        1036           re turn (wind ow.name.in dexOf("BSS CPopup")!= -1);
        1037   }
        1038  
        1039   function g etIntopicB ar(sAlign)
        1040   {
        1041           va r sHTML="" ;
        1042           if (gaButtons .length>0)
        1043           {
        1044                    sHTM L+="<div a lign="+sAl ign+">";
        1045  
        1046                    sHTM L+="<table  cellpaddi ng=\"2\" c ellspacing =\"0\" bor der=\"0\"> <tr>";
        1047                    for( var i=0;i< gaButtons. length;i++ )
        1048                    {
        1049                             if(gaT ypes[i]!=" synctoc"|| isSyncEnab led())
        1050                             {
        1051                                      if(gaBut tons[i]==" NeedSearch Form")
        1052                                               sHTML+=get SearchForm HTML();
        1053                                      else
        1054                                               sHTML+=gaB uttons[i];
        1055                             }
        1056                    }
        1057                    sHTM L+="</tr>< /table>";
        1058  
        1059                    sHTM L+="</div> ";
        1060           }
        1061           re turn sHTML ;
        1062   }
        1063  
        1064  
        1065   function w riteIntopi cBar(nAlig ns)
        1066   {
        1067           if (isInPopup ()) return ;
        1068           if (gaButtons .length>0)
        1069           {
        1070                    var  sHTML="";
        1071                    if(n Aligns!=0)
        1072                    {
        1073                             sHTML+ ="<table w idth=100%> <tr>"
        1074                             if(nAl igns&1)
        1075                                      sHTML+=" <td width= 33%>"+getI ntopicBar( "left")+"< /td>";
        1076                             if(nAl igns&2)
        1077                                      sHTML+=" <td width= 34%>"+getI ntopicBar( "center")+ "</td>";
        1078                             if(nAl igns&4)
        1079                                      sHTML+=" <td width= 33%>"+getI ntopicBar( "right")+" </td>";
        1080                             sHTML+ ="</tr></t able>";
        1081                             docume nt.write(s HTML);
        1082                    }
        1083           }
        1084   }
        1085  
        1086   function s endAveInfo Out()
        1087   {
        1088           if (!isInPopu p())
        1089                    setT imeout("se ndAveInfo( );",100);
        1090   }
        1091  
        1092   function s endAveInfo ()
        1093   {
        1094           va r oMsg=new  whMessage (WH_MSG_AV ENUEINFO,t his,1,gaAv enues);
        1095           Se ndMessage( oMsg);
        1096   }
        1097  
        1098  
        1099   function o nNext()
        1100   {
        1101           va r oMsg=new  whMessage (WH_MSG_NE XT,this,1, null);
        1102           Se ndMessage( oMsg);
        1103   }
        1104  
        1105   function o nPrev()
        1106   {
        1107           va r oMsg=new  whMessage (WH_MSG_PR EV,this,1, null);
        1108           Se ndMessage( oMsg);
        1109   }
        1110  
        1111   function c reateSyncI nfo()
        1112   {
        1113           va r oParam=n ew Object( );
        1114           va r sPath =  null;
        1115           if (gsStartPa ge.length  != 0)
        1116                    sPat h = _getPa th(gsStart Page);
        1117           el se if(gsPP ath.length ==0)
        1118                    sPat h =_getPat h(document .location. href);
        1119           el se 
        1120                    sPat h = gsPPat h;
        1121           oP aram.sPPat h=sPath;
        1122           oP aram.sTPat h=document .location. href;
        1123           oP aram.aPath s=gaPaths;
        1124           re turn oPara m;
        1125   }
        1126  
        1127   function s yncWithSho w()
        1128   {
        1129           if (isTopicOn ly())
        1130                    show ();
        1131           el se
        1132           {
        1133                    sync ();
        1134                    show TocPane();
        1135           }
        1136   }
        1137  
        1138   function s howTocPane ()
        1139   {
        1140           va r oMsg=new  whMessage (WH_MSG_SH OWTOC,this ,1,null);
        1141           Se ndMessage( oMsg);
        1142   }
        1143  
        1144   function s endSyncInf o()
        1145   {
        1146           if (!isInPopu p())
        1147           {
        1148                    var  oParam=nul l;
        1149                    if(g aPaths.len gth>0)
        1150                    {
        1151                             oParam =createSyn cInfo();
        1152                    }
        1153                    var  oMsg=new w hMessage(W H_MSG_SYNC INFO,this, 1,oParam);
        1154                    Send Message(oM sg);
        1155           }
        1156   }
        1157  
        1158   function s endInvalid SyncInfo()
        1159   {
        1160           if (!isInPopu p())
        1161           {
        1162                    var  oMsg=new w hMessage(W H_MSG_SYNC INFO,this, 1,null);
        1163                    Send Message(oM sg);
        1164           }
        1165   }
        1166  
        1167   function e nableWebSe arch(bEnab le)
        1168   {
        1169           if (!isInPopu p())
        1170           {
        1171                    var  oMsg=new w hMessage(W H_MSG_ENAB LEWEBSEARC H,this,1,b Enable);
        1172                    Send Message(oM sg);
        1173           }
        1174   }
        1175  
        1176   function a utoSync(nS ync)
        1177   {
        1178           if (nSync==0)  return;
        1179           if (isInPopup ()) return ;
        1180           if (isOutMost Topic())
        1181                    sync ();
        1182   }
        1183  
        1184   function i sOutMostTo pic()
        1185   {
        1186           if (gnOutmost Topic==-1)
        1187           {
        1188                    var  oMessage=n ew whMessa ge(WH_MSG_ ISINFRAMES ET,this,1, null);
        1189                    if(S endMessage (oMessage) )
        1190                             gnOutm ostTopic=0 ;
        1191                    else
        1192                             gnOutm ostTopic=1 ;
        1193           }
        1194           re turn (gnOu tmostTopic ==1);
        1195   }
        1196  
        1197   function s ync()
        1198   {
        1199           if (gaPaths.l ength>0)
        1200           {
        1201                    var  oParam=cre ateSyncInf o();
        1202                    var  oMessage=n ew whMessa ge(WH_MSG_ SYNCTOC,th is,1,oPara m);
        1203                    Send Message(oM essage);
        1204           }
        1205   }
        1206  
        1207  
        1208   function a venueInfo( sName,sPre v,sNext)
        1209   {
        1210           th is.sName=s Name;
        1211           th is.sPrev=s Prev;
        1212           th is.sNext=s Next;
        1213   }
        1214  
        1215   function g etCurrentA venue()
        1216   {
        1217           va r oParam=n ew Object( );
        1218           oP aram.sAven ue=null;
        1219           va r oMessage =new whMes sage(WH_MS G_GETCURRE NTAVENUE,t his,1,oPar am);
        1220           Se ndMessage( oMessage);
        1221           re turn oPara m.sAvenue;
        1222   }
        1223  
        1224   function u nRegisterL istener()
        1225   {
        1226           if (gbAIRSSL)
        1227                    retu rn;
        1228           se ndInvalidS yncInfo();
        1229           en ableWebSea rch(false) ;
        1230           if (whtopic_f oldUnload)
        1231                    whto pic_foldUn load();
        1232   }
        1233  
        1234   function o nSendMessa ge(oMsg)
        1235   {
        1236           va r nMsgId=o Msg.nMessa geId;
        1237           if (nMsgId==W H_MSG_GETA VIAVENUES)
        1238           {
        1239                    oMsg .oParam.aA venues=gaA venues;
        1240                    retu rn false;
        1241           }
        1242           el se if(nMsg Id==WH_MSG _GETTOCPAT HS)
        1243           {
        1244                    if(i sOutMostTo pic())
        1245                    {
        1246                             oMsg.o Param.oToc Info=creat eSyncInfo( );
        1247                             return  false;            
        1248                    }
        1249                    else
        1250                             return  true;
        1251           }
        1252           el se if(nMsg Id==WH_MSG _NEXT)
        1253           {
        1254                    goAv enue(true) ;
        1255           }
        1256           el se if(nMsg Id==WH_MSG _PREV)
        1257           {
        1258                    goAv enue(false );
        1259           }
        1260           el se if(nMsg Id==WH_MSG _WEBSEARCH )
        1261           {
        1262                    webs earch();
        1263           }
        1264           re turn true;
        1265   }
        1266  
        1267   function g oAvenue(bN ext)
        1268   {
        1269           va r sTopic=n ull;
        1270           va r sAvenue= getCurrent Avenue();
        1271           va r nAvenue= -1;
        1272           if (sAvenue!= null&&sAve nue!="")
        1273           {
        1274                    for( var i=0;i< gaAvenues. length;i++ )
        1275                    {
        1276                             if(gaA venues[i]. sName==sAv enue)
        1277                             {
        1278                                      nAvenue= i;
        1279                                      break;
        1280                             }
        1281                    }
        1282                    if(n Avenue!=-1 )
        1283                    {
        1284                             if(bNe xt)
        1285                                      sTopic=g aAvenues[n Avenue].sN ext;
        1286                             else
        1287                                      sTopic=g aAvenues[n Avenue].sP rev;
        1288                    }
        1289           }
        1290           el se
        1291           {
        1292                    for( var i=0;i< gaAvenues. length;i++ )
        1293                    {
        1294                             if(gaA venues[i]. sNext!=nul l&&gaAvenu es[i].sNex t.length>0 &&bNext)
        1295                             {
        1296                                      sTopic=g aAvenues[i ].sNext;
        1297                                      break;
        1298                             }
        1299                             else i f(gaAvenue s[i].sPrev !=null&&ga Avenues[i] .sPrev.len gth>0&&!bN ext)
        1300                             {
        1301                                      sTopic=g aAvenues[i ].sPrev;
        1302                                      break;
        1303                             }
        1304                    }
        1305           }
        1306           
        1307           if (sTopic!=n ull&&sTopi c!="")
        1308           {
        1309                    if(g sPPath!=nu ll&&gsPPat h!="")
        1310                    {
        1311                             sFullT opicPath=_ getFullPat h(gsPPath, sTopic);
        1312                             docume nt.locatio n=sFullTop icPath;
        1313                    }
        1314           }
        1315   }
        1316  
        1317   function c anGo(bNext )
        1318   {
        1319           fo r(var i=0; i<gaAvenue s.length;i ++)
        1320           {
        1321                    if(( gaAvenues[ i].sNext!= null&&gaAv enues[i].s Next.lengt h>0&&bNext )||
        1322                             (gaAve nues[i].sP rev!=null& &gaAvenues [i].sPrev. length>0&& !bNext))
        1323                             return  true;
        1324           }
        1325           re turn false ;
        1326   }
        1327  
        1328   function s how()
        1329   {
        1330           if (gbBadUriE rror)
        1331           {
        1332                    var  strMainPag e = docume nt.locatio n.href;
        1333                    var  indx = str MainPage.t oLowerCase ().indexOf ("/mergedp rojects/") ;
        1334                    if(i ndx != -1)
        1335                             window .location  = strMainP age.substr ing(0, ind x+1) + "wh csh_home.h tm#topicur l=" + strM ainPage.su bstring(in dx+1);
        1336                    else  if(gsStar tPage!="")
        1337                                      window.l ocation=gs StartPage+ "#"+gsRelC urPagePath ;
        1338           }
        1339           el se if(gsSt artPage!=" ")
        1340                             window .location= gsStartPag e+"#"+gsRe lCurPagePa th;
        1341   }
        1342  
        1343   function h ide()
        1344   {
        1345           if (goFrame!= null)
        1346           {
        1347                    goFr ame.locati on=window. location;
        1348           }
        1349   }
        1350  
        1351   function i sTopicOnly ()
        1352   {
        1353           if (gnTopicOn ly==-1)
        1354           {
        1355                    var  oParam=new  Object();
        1356                    oPar am.oFrame= null;
        1357                    var  oMsg=new w hMessage(W H_MSG_GETS TARTFRAME, this,1,oPa ram);
        1358                    if(S endMessage (oMsg))
        1359                    {
        1360                             goFram e=oParam.o Frame;
        1361                             gnTopi cOnly=0;
        1362                    }
        1363                    else
        1364                             gnTopi cOnly=1;
        1365           }
        1366           if (gnTopicOn ly==1)
        1367                    retu rn true;
        1368           el se
        1369                    retu rn false;
        1370   }
        1371  
        1372   function w ebsearch()
        1373   {
        1374           if (gbNav4)
        1375           {
        1376                    if(d ocument.eh elpform)
        1377                             docume nt.ehelpfo rm.submit( );
        1378           }
        1379           el se
        1380           {
        1381                    if(w indow.ehel pform)
        1382                             window .ehelpform .submit();
        1383           }
        1384   }
        1385  
        1386   function a ddSearchFo rmHref(sHr ef)
        1387   {
        1388           gs SearchForm Href=sHref ;
        1389           en ableWebSea rch(true);
        1390   }
        1391  
        1392   function s earchB(nFo rm)
        1393   {
        1394           va r sValue=e val("docum ent.search Form"+nFor m+".search String.val ue");
        1395           va r oMsg=new  whMessage (WH_MSG_SE ARCHTHIS,t his,1,sVal ue);
        1396           Se ndMessage( oMsg);
        1397   }
        1398  
        1399  
        1400   function g etSearchFo rmHTML()
        1401   {
        1402           va r sHTML="" ;
        1403           gn Form++;
        1404           va r sFormNam e="searchF orm"+gnFor m;
        1405           va r sButton= "<form nam e=\""+sFor mName+"\"  method=\"P OST\" acti on=\"javas cript:sear chB("+gnFo rm+")\">"
        1406           sB utton+="<i nput type= \"text\" n ame=\"sear chString\"  value=\"-  Full Text  search -\ " size=\"2 0\"/>";
        1407           if (""=="text ")
        1408           {
        1409                    sBut ton+="<a c lass=\"sea rchbtn\" h ref=\"java script:voi d(0);\" on click=\""+ sFormName+ ".submit() ;return fa lse;\"></a >";
        1410           }
        1411           el se if(""== "image")
        1412           {
        1413                    sBut ton+="<a c lass=\"sea rchbtn\" h ref=\"java script:voi d(0);\" on click=\""+ sFormName+ ".submit() ;return fa lse;\">"
        1414                    sBut ton+="<img  src=\"\"  border=0>< /a>";
        1415           }
        1416           sB utton+="</ form>";
        1417           sH TML="<td a lign=\"cen ter\">"+sB utton+"</t d>";
        1418           re turn sHTML ;
        1419   }
        1420  
        1421  
        1422  
        1423  
        1424   function s howHidePan e(bShow)
        1425   {
        1426           va r oMsg=nul l;
        1427           if (bShow)
        1428                    oMsg =new whMes sage(WH_MS G_SHOWPANE ,this,1,nu ll);
        1429           el se
        1430                    oMsg =new whMes sage(WH_MS G_HIDEPANE ,this,1,nu ll);
        1431           Se ndMessage( oMsg);
        1432   }
        1433  
        1434   function i sShowHideE nable()
        1435   {
        1436           if (gbIE4)
        1437                    retu rn true;
        1438           el se
        1439                    retu rn false;
        1440   }
        1441  
        1442  
        1443  
        1444  
        1445   if(window. gbWhUtil & & window.g bWhVer &&  (gbAIRSSL  ||(window. gbWhMsg&&w indow.gbWh Proxy)))
        1446   {
        1447           if (!gbAIRSSL )
        1448           {
        1449                    Regi sterListen er("bsscri ght",WH_MS G_GETAVIAV ENUES);
        1450                    Regi sterListen er("bsscri ght",WH_MS G_GETTOCPA THS);
        1451                    Regi sterListen er("bsscri ght",WH_MS G_NEXT);
        1452                    Regi sterListen er("bsscri ght",WH_MS G_PREV);
        1453                    Regi sterListen er("bsscri ght",WH_MS G_WEBSEARC H);
        1454           }
        1455           if (gbMac&&gb IE4)
        1456           {
        1457                    if(t ypeof(wind ow.onunloa d)!="unkno wn")
        1458                             if(win dow.onunlo ad.toStrin g!=unRegis terListene r.toString )
        1459                                      whtopic_ foldUnload =window.on unload;
        1460           }
        1461           el se
        1462           {
        1463                    if(w indow.onun load)
        1464                             if(win dow.onunlo ad.toStrin g!=unRegis terListene r.toString )
        1465                                      whtopic_ foldUnload =window.on unload;
        1466           }
        1467           wi ndow.onunl oad=unRegi sterListen er;
        1468           
        1469           gb WhTopic=tr ue;
        1470   }
        1471   else
        1472           do cument.loc ation.relo ad();
        1473  
        1474   function P ickupDialo g_Invoke()
        1475   {
        1476           if (!gbIE4||g bMac||gbAI RSSL)
        1477           {
        1478                    if(t ypeof(_Pop upMenu_Inv oke)=="fun ction")
        1479                             return  _PopupMen u_Invoke(P ickupDialo g_Invoke.a rguments);
        1480           }
        1481           el se
        1482           {
        1483                    if(P ickupDialo g_Invoke.a rguments.l ength>2)
        1484                    {
        1485                             var sP ickup="whs kin_pickup .htm";
        1486                             var sP ickupPath= gsPPath+sP ickup;
        1487                             if(gbI E4)
        1488                             {
        1489                                      var sFra me=PickupD ialog_Invo ke.argumen ts[1];
        1490                                      var aTop ics=new Ar ray();
        1491                                      for(var  i=2;i<Pick upDialog_I nvoke.argu ments.leng th;i+=2)
        1492                                      {
        1493                                               var j=aTop ics.length ;
        1494                                               aTopics[j] =new Objec t();
        1495                                               aTopics[j] .m_sName=P ickupDialo g_Invoke.a rguments[i ];
        1496                                               aTopics[j] .m_sURL=Pi ckupDialog _Invoke.ar guments[i+ 1];
        1497                                      }
        1498  
        1499                                      if(aTopi cs.length> 1)
        1500                                      {
        1501                                               var nWidth =300;
        1502                                               var nHeigh t=180;
        1503                                               var     nS creenWidth =screen.wi dth;
        1504                                               var     nS creenHeigh t=screen.h eight;
        1505                                               var nLeft= (nScreenWi dth-nWidth )/2;
        1506                                               var nTop=( nScreenHei ght-nHeigh t)/2;
        1507                                               if(gbIE4)
        1508                                               {
        1509                                                       va r vRet=win dow.showMo dalDialog( sPickupPat h,aTopics, "dialogHei ght:"+nHei ght+"px;di alogWidth: "+nWidth+" px;resizab le:yes;sta tus:no;scr oll:no;hel p:no;cente r:yes;");
        1510                                                       if (vRet)
        1511                                                       {
        1512                                                                var  sURL=vRet. m_url;
        1513                                                                if(s Frame)
        1514                                                                         window .open(sURL ,sFrame);
        1515                                                                else
        1516                                                                         window .open(sURL ,"_self");
        1517                                                       }
        1518                                               }
        1519                                      }
        1520                                      else if( aTopics.le ngth==1)
        1521                                      {
        1522                                               var sURL=a Topics[0]. m_sURL
        1523                                               if(sFrame)
        1524                                                       wi ndow.open( sURL,sFram e);
        1525                                               else
        1526                                                       wi ndow.open( sURL,"_sel f");
        1527                                      }
        1528                             }
        1529                    }
        1530           }
        1531   }
        1532  
        1533