<!--
/*************************************************************************
*
* ADOBE CONFIDENTIAL
* ___________________
*
*  Copyright 2005 Adobe Systems Incorporated
*  All Rights Reserved.
*
* NOTICE:  All information contained herein is, and remains
* the property of Adobe Systems Incorporated and its suppliers,
* if any.  The intellectual and technical concepts contained
* herein are proprietary to Adobe Systems Incorporated and its
* suppliers and may be covered by U.S. and Foreign Patents,
* patents in process, and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe Systems Incorporated.
**************************************************************************/
00: B   logo_placeholder                    chpALogo
01: B   NavBar_Big_NEW_03                   chpALogo
02:   C logo                                chpALogo
03:   C NavBar_Small_03                     chpALogo
04: B   Search_            [C] [D]  N   R   chpGo
05: B   SearchAdvanced_    [C]  -   N   R   chpASer
06: B   SearchTips_        [C]  -   N   R   chpTip
07: B C Home_              [C]  -   N   R   chpHome
08: B C Help_			   [C]  -   N   R   chpHelp
09: B C ShoppingCart_      [C]  -   N   R   chpBuy
10: B C YourAccount_       [C]  -   N   R   chpAcn
11:     More_               C   D   N   R   chpMore
12:   C ResultsBarString_	C	D	N	R	chpSet
        status
    B   NavBar_Big_NEW_01
    B   NavBar_Big_NEW_04
      C NavBar_Small_01
      * NavBar_Big_NEW_06
      * NavBar_Big_NEW_08
      * NavBar_Big_NEW_09
      * NavBar_Big_NEW_10
External functions [*] has DocumentID
	[*] _cbNav_ExecES( str )
	[*] _cbNav_HTMScriptBegin
	[*] _cbNav_HTMScriptEnd
	[*] _cbNav_SetKeyword( escape( key ) )
	[*] _cbNav_GetKeyword( i_F_or_W );
	(*) _cbNav_iExecES( "NavIntFnc.ForceChekingXandY();"  ), for future use
	.   _cbimgDetail_GetImageNo( "Dummy" )
	.   _cbimgDetail_GetTimeOutSec( "Dummy" )
	[*] _cbimgDetail_Preparation( iiStr )
	.   _cbimgDetail_TimeOut( iiStr )
	.   _cbimgDetail_PrepOK( iiStr )
	.   _cbimgDetail_ClosePrep( iiStr )
	[*] _cbimgDetail_AllDoneFullMode( "Dummy" )
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html;charset=utf-8">
  <meta http-equiv="Expires" content="Tue, 00 Dec 2000 00:00:00 GMT">
  <title>%_DIALOGTITLE%_</title>
  <link href="StockPhoto.css" rel="stylesheet" type="text/css" media="all">
   <style type="text/css" media="screen">
   <!--
    .chip    { position:absolute; visibility:hidden; background-color:#FFFFA0; border:1px black solid; padding:1px; font-family: %_PRIMARYFONT%_; font-size:%_CHIP_FONTSIZE%_; color:#000000;width:%_CHIP_WIDTH%_;} //
    .sbox    { font-size: %_SBOX_FONTSIZE%_; font-family: %_PRIMARYFONT%_ }
    .butNav  { font-size: %_BUTTON_FONTSIZE%_; font-family: %_PRIMARYFONT%_; width: 80px; height: %_BUTTON_HEIGHT%_}
    body     { overflow:hidden }
   -->
  </style>
  <script type="text/javascript">
   <!--

	// When stockphoto.PTSGLilo_Prototype is defined in Versions.jsx,
	// the following variable is set to be "yes"
	var PTSGLilo_Prototype    ="%_PTSGLILO_PROTOTYPE%_"; // must be "yes" to activate Lilo prototype

	var const_DocID           ="%_DOCUMENTID%_";
	var cNavHeight            = %_NAVHEIGHT%_;
	var cNavHeightAdd         = %_NAVHEIGHTADD%_;
	var const_Web_OR_FV       ="%_WEB_OR_FILE%_";  /* 'f':fileview or 'w':web / contentPane */
	var const_win_OR_mac      ="%_WIN_OR_MAC%_";   /* 'w':windows or 'm':mac */
	var const_JSCt_NA         ="%_CONST_NA%_";
	var const_JSCt_DefuKeyWord="%_ENTER_KEYWORD%_";
	var const_JSCt_Result4BEG ='%_RESULT4BEG%_';
	var const_JSCt_Result4END ='%_RESULT4END%_';
	var const_Ln1_STR2_iDetail='%_LN1_STR2_IDET%_';/*for b0==5 or k=13 */
	var const_Ln1_STR2_Other  ='%_LN1_STR2%_';
	var const_JSCt_xOFy       ="%__xOFy_%_";
	var const_Op_And		  ="%_OP_AND%_"
	var const_Op_Or 		  ="%_OP_OR%_"
	var const_Op_Not		  ="%_OP_NOT%_"

	var glb_searchLocale      ="%_SEARCH_LOCALE%_";
	var glb_advSearchAutoOpen =true;
	var cNavHeightOriginal = %_NAVHEIGHT%_;
	var cNavHeightExpanded = %_NAVHEIGHT%_ + %_NAVEXPANSION%_;
	var const_PushFromES      =%_PushFromES%_;
	var const_maxChipY        = %_MAXCHIPY%_;       /* temp must presert */
	var const_infoWellMaxWidth= 250;
	var glb_EnableButn        =[false,false,false,false];
	var glb_iMg=[ /*00*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*01*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*02*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*03*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*04*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*05*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*06*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*07*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*08*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*09*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*10*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*11*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*12*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*13*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*14*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*15*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*16*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*17*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*18*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*19*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*20*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*21*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*22*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*17*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*17*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*18*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*19*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*20*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*21*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*22*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*23*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*24*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*25*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*26*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*27*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*28*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*29*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*30*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*31*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*32*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*33*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*34*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*35*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] },
	              /*35*/ { e:[{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false},{p:undefined,s:false}] } ];
	var glb_tTb=[ /*00*/ { chp:"chpHome",  id:"CLg", Nm:"ALogo",   f:"",  				  e:["", "", "", ""],  l:"", xd:5,   yd:10, p:"displayStartPage(" },
	              /*01*/ { chp:"chpALogo", id:"Cb2", Nm:"ALogo2",  f:"", 				  e:["", "", "", ""],  l:"", xd:5,   yd:-10, p:"displayStartPage(" },
   	              /*02*/ { chp:"",         id:"",    Nm:"",        f:"",                  e:["", "", "", ""],  l:"", xd:0,   yd:0,   p:"" },
	              /*03*/ { chp:"chpAdv",   id:"AdvSrch",Nm:"AAdvSrch",f:"AdvSearch",      e:["","","",""],     l:"", xd:10,  yd:-20, p:"internal " },
	              /*04*/ { chp:"chpGo",    id:"Search1",Nm:"ASearch",f:"Search",           e:["","","",""],     l:"", xd:10,  yd:-20, p:"internal Go%_WEB_OR_FILE%_" },
	              /*05*/ { chp:"chpSp",    id:""   ,Nm:"", f:"Split",             e:["","","",""],     l:"", xd:10,  yd:-20,  p:"" },
	              /*06*/ { chp:"chpPI",    id:"CPI", Nm:"APL", 	   f:"PhIll",             e:["","","",""],     l:"", xd:10,  yd:-20, p:"DL.MiscDlgs.SearchTips(" },
	              /*07*/ { chp:"chpHome",  id:"CHm", Nm:"AHome",   f:"Home",              e:["C","R","R","N"], l:"", xd:-%_CHIP_WIDTH%_-5, yd:-10,  p:"displayStartPage(" },
	              /*08*/ { chp:"chpHelp",  id:"CHp", Nm:"AHp",     f:"Help",              e:["C","R","R","N"], l:"", xd:-%_CHIP_WIDTH%_-5, yd:-10,  p:"DL.MiscDlgs.SearchTips(" }, // p is to be filled in during help-icon implementation
	              /*09*/ { chp:"chpBuy",   id:"CBy", Nm:"ABuy",    f:"ShoppingCart",      e:["C","R","R","N"], l:"", xd:-%_CHIP_WIDTH%_-5, yd:-10,  p:"DL.ShoppingCart.ShoppingCartX(" },
	              /*10*/ { chp:"chpAcn",   id:"CMy", Nm:"AMy",     f:"YourAccount",       e:["C","R","R","N"], l:"", xd:-%_CHIP_WIDTH%_-5, yd:-10,  p:"DL.MiscDlgs.MyAccount(" },
	              /*11*/ { chp:"chpMor",   id:"CMor",Nm:"AMor",    f:"MoreResults",       e:["C","R","N","N"], l:"", xd:-%_CHIP_WIDTH%_-5, yd:-20,  p:"" },
	              /*12*/ { chp:"chpMoreInfo",   id:"MoreInfo",Nm:"AAdvSrch",f:"AdvSearch",      e:["","","",""],     l:"", xd:10,  yd:-20, p:"internal " },
						 // ---------- b0=0 Short Nav
	              /*12*/ { chp:"",         id:"",    Nm:"",        f:"",                  e:["C","D","R","N"], l:"", xd:0,   yd:0,   p:"" },
	              /*13*/ { chp:"",         id:"",    Nm:"",        f:"",                  e:["C","D","R","N"], l:"", xd:0,   yd:0,   p:"" },
	              /*14*/ { chp:"",         id:"",    Nm:"",        f:"",                  e:["C","D","R","N"], l:"", xd:0,   yd:0,   p:"" },
						 // ---------- b0=1 Each search
	              /*15*/ { chp:"chpGP",    id:"u_Btn0A",Nm:"",     f:"PriceKeywords",     e:["C","D","R","N"], l:"", xd:-%_GETPRICE_TOOLTIP_WIDTH%_,   yd:-10,   p:"" },
				  /*16*/ { chp:"chpFS",    id:"u_Btn01A",Nm:"",    f:"FindSimilar",       e:["C","D","R","N"], l:"", xd:-%_FINDSIM_TOOLTIP_WIDTH%_,   yd:-10,   p:"" },
	              /*17*/ { chp:"chpDC",    id:"u_Btn1A",Nm:"",     f:"DownloadComp",      e:["C","D","R","N"], l:"", xd:-%_DOWNCOMP_TOOLTIP_WIDTH%_,   yd:-10,   p:"" },
	              /*18*/ { chp:"chpAC",    id:"u_Btn2A",Nm:"",     f:"AddToCart",         e:["C","D","R","N"], l:"", xd:-%_ADDTOCART_TOOLTIP_WIDTH%_,   yd:-10,   p:"" },
						 // ---------- b0=2 Previous search
	              /*19*/ { chp:"",         id:"",    Nm:"",        f:"",                  e:["C","D","R","N"], l:"", xd:0,   yd:0,   p:"" },
	              /*20*/ { chp:"",         id:"",    Nm:"",        f:"",                  e:["C","D","R","N"], l:"", xd:0,   yd:0,   p:"" },
	              /*21*/ { chp:"",         id:"",    Nm:"",        f:"",                  e:["C","D","R","N"], l:"", xd:0,   yd:0,   p:"" },
				  /*22*/ { chp:"",         id:"",    Nm:"",        f:"",                  e:["C","D","R","N"], l:"", xd:0,   yd:0,   p:"" },
						 // ---------- b0=3 Saved Comp
				  /*23*/ { chp:"chpGP",    id:"u_Btn0A",Nm:"", 	   f:"PriceKeywords",     e:["C","D","R","N"], l:"", xd:-%_GETPRICE_TOOLTIP_WIDTH%_,   yd:-10,   p:"" },
				  /*24*/ { chp:"chpFS",    id:"u_Btn01A",Nm:"",    f:"FindSimilar",       e:["C","D","R","N"], l:"", xd:-%_FINDSIM_TOOLTIP_WIDTH%_,   yd:-10,   p:"" },
	              /*25*/ { chp:"chpAC",    id:"u_Btn1A",Nm:"",     f:"AddToCart",         e:["C","D","R","N"], l:"", xd:-%_ADDTOCART_TOOLTIP_WIDTH%_,   yd:-10,   p:"" },
				  /*26*/ { chp:"",         id:"",    Nm:"",        f:"",                  e:["C","D","R","N"], l:"", xd:0,   yd:0,   p:"" },
						 // ---------- b0=4 Purchased
	              /*27*/ { chp:"chpGP",    id:"u_Btn0A",Nm:"",     f:"PriceKeywords",     e:["C","D","R","N"], l:"", xd:-%_GETPRICE_TOOLTIP_WIDTH%_,   yd:-10,   p:"" },
	              /*28*/ { chp:"chpFS",    id:"u_Btn01A",Nm:"",    f:"FindSimilar",       e:["C","D","R","N"], l:"", xd:-%_FINDSIM_TOOLTIP_WIDTH%_,  yd:-10,   p:"" },
	              /*29*/ { chp:"chpODS",   id:"u_Btn1A",Nm:"",     f:"OpenDownloadStatus",e:["C","D","R","N"], l:"", xd:-%_OPENDOWNLOADSTAT_TOOLTIP_WIDTH%_,   yd:-10,   p:"" },
				  /*30*/ { chp:"",         id:"",    Nm:"",        f:"",                  e:["C","D","R","N"], l:"", xd:0,   yd:0,   p:"" },
						 // ---------- b0=3 Get Price
	              /*31*/ { chp:"",         id:"",    Nm:"",        f:"",                  e:["C","D","R","N"], l:"", xd:0,   yd:0,   p:"" },
	              /*32*/ { chp:"",         id:"",    Nm:"",        f:"",                  e:["C","D","R","N"], l:"", xd:0,   yd:0,   p:"" },
	              /*33*/ { chp:"",         id:"",    Nm:"",        f:"",                  e:["C","D","R","N"], l:"", xd:0,   yd:0,   p:"" },
				  /*34*/ { chp:"",         id:"",    Nm:"",        f:"",                  e:["C","D","R","N"], l:"", xd:0,   yd:0,   p:"" },
						  // Buffer
	              /*35*/ { chp:"",  	   id:"",    Nm:"",        f:"",                  e:["C","R","R","N"], l:"", xd:10,  yd:-20, p:"" },
	              /*36*/ { chp:"",         id:"",    Nm:"",        f:"",                  e:["C","R","R","N"], l:"", xd:0,   yd:0,   p:"" },
	              /*37*/ { chp:"",         id:"",    Nm:"",        f:"",                  e:["C","R","R","N"], l:"", xd:0,   yd:0,   p:"" },
	              /*38*/ { chp:"",         id:"",    Nm:"",        f:"",                  e:["C","R","R","N"], l:"", xd:0,   yd:0,   p:"" },
	              /*39*/ { chp:"",         id:"",    Nm:"",        f:"",                  e:["C","R","R","N"], l:"", xd:0,   yd:0,   p:"" },
	              /*40*/ { chp:"",         id:"",    Nm:"",        f:"",                  e:["C","R","R","N"], l:"", xd:0,   yd:0,   p:"" },
	              /*41*/ { chp:"",         id:"",    Nm:"",        f:"",                  e:["C","R","R","N"], l:"", xd:0,   yd:0,   p:"" },
	              		//Search lang
	              /*42*/ { chp:"chpLNG",   id:"UsedLangA",Nm:"ALng",    f:"SearchLang",   e:["C","R","N","N"], l:"", xd:-%_SEARCHLANG_TOOLTIP_WIDTH%_, yd:-%_SEARCHLANG_TOOLTIP_HEIGHT%_,  p:"" }
 ];
	var glb_ProcCache=["","","","","","","","","","","","","","","","", "","","","","","","","","","","","","","","","", /* 032 */
	                   "","","","","","","","","","","","","","","","", "","","","","","","","","","","","","","","","", /* 064 */
	                   "","","","","","","","","","","","","","","","", "","","","","","","","","","","","","","","","", /* 096 */
	                   "","","","","","","","","","","","","","","","", "","","","","","","","","","","","","","","","", /* 128 */
	                   "","","","","","","","","","","","","","","","", "","","","","","","","","","","","","","","","", /* 160 */
	                   "","","","","","","","","","","","","","","","", "","","","","","","","","","","","","","","","", /* 192 */
	                   "","","","","","","","","","","","","","","","", "","","","","","","","","","","","","","","","", /* 224 */
	                   "","","","","","","","","","","","","","","","", "","","","","","","","","","","","","","","","", /* 256 */
	                   "","","","","","","","","","","","","","","","", "","","","","","","","","","","","","","","","", /* 288 */
	                   "","","","","","","","","","","","","","","","", "","","","","","","","","","","","","","","","", /* 320 */
	                   "","","","","","","","","","","","","","","","", "","","","","","","","","","","","","","","","", /* 352 */
	                   "","","","","","","","","","","","","","","","", "","","","","","","","","","","","","","","","", /* 384 */
	                   "","","","","","","","","","","","","","","","", "","","","","","","","","","","","","","","","", /* 416 */
	                   "","","","","","","","","","","","","","","","", "","","","","","","","","","","","","","","","", /* 448 */
	                   "","","","","","","","","","","","","","","","", "","","","","","","","","","","","","","","","", /* 480 */
	                   "","","","","","","","","","","","","","","","", "","","","","","","","","","","","","","","","",""];
	var glb_ProcIndx =0;
	var glb_SaveIndx =0;
	var glb_b0=%_b0%_; /* glb_b0=0:Short Nav/1:search/2:previous search/3=Saved comps/4=Purchased/5=ImgPrep */
	var glb_b1=%_b1%_; /* glb_b1=0:NoGIF/1=GIF(getting images)/2=Loading for image detail */
	var glb_inProcBottomNav       =false;
	var glb_initTryCnt            =0;
	var glb_initAll_NotDone       =true;
	var glb_LastInitialize_NotDone=true;
	var glb_duringInitialize      =true;
	var glb_inInitASub1           =false;
	var glb_KeyAtFocus            ="";
    var glb_Searchable            =false; /* F: EditBox focused T: */
	var glb_bSearchWithinEnabled = false;
    var glb_JSCt_uKeyWord;
	var glb_MThumbState;          /* 1: visible, 2: MoreThum enable|disable 4: focused */
	var glb_GIFDisp=false, glb_GIFLabel="", glb_ReTryCnt=0;
	var glb_bt0=true, glb_bt1=true, glb_bt2=true, glb_bt3=true, glb_prev_KWd="", glb_bt01=true; //glb_bt01 for Find Similar - Boxcar3
	var glb_Prev_Selection=-2, glb_Prev_b0=-2,  glb_prev_bt0, glb_prev_bt1, glb_prev_bt2, glb_prev_bt3,glb_prev_bt01; //glb_prev_bt01 for Find Similar - Boxcar3
	var glb_curr_KWd="%_ENTER_KEYWORD%_", glb_OlduKeyWd="", glb_OldxOfy="", glb_charAt1="";
	var glb_GP_TimeOutSec, glb_GP_ImageEndNo;
	var glb_TimerModeMismatch=15000;/* 15 sec. */
	var glb_TimerStdBottom   =5000; /* 5  sec. */
	var glb_MaxCntStdBottom  =2;    /* 15 sec. */
	var glb_UniqueID         =-1;
	var glb_PrevDispLang     =" ";
	var glb_PrevValueAmt     ="";
	var glb_Running          =false;
	var glb_prev_WheelLabel  ="x y";
	var glb_chk2Enter        =0;
	var glb_chk2EntOn        =false;
    // Stores the number of collections available
	var glb_iNumCollections = 0;
	// Array storing the collection display names
    var glb_arCollections = [ ];
  	// Stores whether the Search-Within item is shown
  	var glb_bSearchWithinShown = false;
  	var glb_DontScheduleToggleOnNextFocus = false;
 	var glb_NBBSelect = new Image; // NBB - Nav Bar Button
	var glb_NBBRollover = new Image;
	var glb_NBBNormal = new Image;
	var glb_SBNormal = new Image;
	var glb_SBSelect = new Image;
	var glb_SPBNormal = new Image;
	var glb_SPBSelect = new Image;
	var glb_SPBDisabled = new Image;
	var glb_UpdateInfoWellScheduled = false;
	
    var glb_bSelectCollection = false;
    var glb_collectionName = "ChkSearchAll";
    
	//variables for dynamic infowell
	var glb_windowWidth = 0;
  	var glb_xOfyWidth = 0;
  	var glb_keywordCurPos = -1;
  	var glb_xofyHiddenBecauseOfSize = true;
    // Button states for Search and Search-within
  	var const_StateMouseUp    = 0;
  	var const_StateMouseDown  = 1;
  	var const_StateEnabled    = 2;
  	var const_StateDisabled   = 3;
  	var glb_oESVals = {};
	var glb_bModifyingDrawer = false;
	var glb_bTextSelection = true;
	var glb_bSearchWithinDoNotHide = false;
	var glb_bSettingsKeywordChanged = false;
	var glb_bKeywordHasFocus = false;
	var glb_indexToCurrentControlBarTooltip = -1;
	var glb_indexToCurrentSearchBarTooltip = -1;
	var glb_bSearchLangTooltpShown = false;
	var glb_searchHappened = false;
	var glb_collectionListWidthAdjusted = false;
	var glb_ParamFromES={
		str:       "xxx", /* original string */
		nstr:      3,     /*   and its size */
		IHave:     false, /* [0] true when "1" Control passed -> Reset Cnt */
		fORw:      "f",   /* [1] "f" or "w" */
		Selection: false, /* [2] true when "1" There is a selection */
		x:         0,     /* [3-10]  8 digits  x value */
		y:         0,     /* [11-18] 8 digits y value */
		nWheel:    0,     /* [19-22] 4 digits size of Wheel label, 9999 for no entry */
		Wheel:     "",    /* [38-]   Wheel label or "off" or "def" */
		nuKeyWord: 0,     /* [23-26] 4 digits size of key */
		nmxdispKw: 0,     /* [27-28] 4 digits size of key */
		uKeyWord:  "",    /* Key word */
		add:["","","",""],/* [29-32] for additional */
		dispLang:  "",    /* [33,34-37] description of display language */
		valueAmt:  "",    /* [3,34-37] description of display language */ 
    sShowDrawer: 'n', /* "y" or "n" */
		uniqueID:  -1
	};
	var glb_BtnLabel=
		[/*0*/{bl:" ",         btn:[{l:"",        w:"1",                f:""},
									{l:"",        w:"1",                f:""},
									{l:"",        w:"1",                f:""},
									{l:"",        w:"1",                f:""}]},
		 /*1*/{bl:" ",         btn:[{l:"%_BTN1%_",w:"1",				f:"PriceKeywords"},
									{l:"%_BTN01%_",w:"1",				f:"FindSimilar"}, //<Boxcar3>
									{l:"%_BTN2%_",w:"1",				f:"DownloadComp"},
									{l:"%_BTN3%_",w:"1",				f:"AddToCart"}]},
		 /*2*/{bl:"%_TYPE2%_", btn:[{l:"",        w:"1",                f:""},
									{l:"",        w:"1",                f:""},
									{l:"",        w:"1",                f:""},
									{l:"",        w:"1",                f:""}]},
		 /*3*/{bl:"%_TYPE3%_", btn:[{l:"%_BTN1%_",w:"1",				f:"PriceKeywords"},
									{l:"%_BTN01%_",w:"1",				f:"FindSimilar"},//<Boxcar3>
									{l:"%_BTN3%_",w:"1",				f:"AddToCart"},
									{l:"",        w:"1",                f:""}]},
		 /*4*/{bl:"%_TYPE4%_", btn:[{l:"%_BTN1%_",w:"1",				f:"PriceKeywords"},
									{l:"%_BTN01%_",w:"1",				f:"FindSimilar"},
									{l:"%_BTN4%_",w:"1",				f:"OpenDownloadStatus"},
									{l:"",        w:"1",                f:""}]},
		 /*5*/{bl:" ",         btn:[{l:"",        w:"1",                f:""},
									{l:"",        w:"1",                f:""},
									{l:"",        w:"1",                f:""},
									{l:"",        w:"1",                f:""}]}
		];
	function preloadImages()
	{
		glb_NBBSelect.src = "%_HTMLImageDir2%_/NavBar/NavBar_Button_S.png";
		glb_NBBRollover.src = "%_HTMLImageDir2%_/NavBar/NavBar_Button_R.png";
		glb_NBBNormal.src = "%_HTMLImageDir2%_/NavBar/NavBar_Button_N.png";
		glb_SBNormal.src = "%_HTMLImageDir2%_/NavBar/Search_N.png";
		glb_SBSelect.src = "%_HTMLImageDir2%_/NavBar/Search_S.png";
		//glb_SPBNormal.src = "%_HTMLImageDir2%_/NavBar/Split_N.png";
		//glb_SPBSelect.src = "%_HTMLImageDir2%_/NavBar/Split_S.png";
		//glb_SPBDisabled.src = "%_HTMLImageDir2%_/NavBar/Split_D.png";
		document.all("Td_Btn0A").style.backgroundImage = "url('" + glb_NBBNormal.src + "')";
		document.all("Td_Btn01A").style.backgroundImage = "url('" + glb_NBBNormal.src + "')";
		document.all("Td_Btn1A").style.backgroundImage = "url('" + glb_NBBNormal.src + "')";
		document.all("Td_Btn2A").style.backgroundImage = "url('" + glb_NBBNormal.src + "')";
		document.all("Search1").style.backgroundImage = "url('" + glb_SBNormal.src + "')";
		//document.all("Split").style.bacgroundImage = "url('" + glb_SPBDisabled.src + "')";
	}
	function convertToInteger( str, ist, ied )
	{
		// strictly use only '0'-'9' characters / parseInt() does not work is there is a preceeding '0'
		var i, v=0, Bt;
		for( i=ist; i<=ied; i++ )
		{
			Bt = str.charCodeAt( i );
			if( ( Bt >= 48 )&&( Bt <= 57 ) ) v = ( 10*v ) + ( Bt-48 );
		}
		return( v );
	}
	function trimString (sSource)
    {
        if (sSource != undefined)
        {
            return sSource.replace(/^\s+/g, '').replace(/\s+$/g, '');
        }
        else
        {
            return '';
        }
    }

    function isFEPLanguage()
    {
        if ((glb_searchLocale != 'ko_KR')
            && (glb_searchLocale != 'ja_JP')
            && (glb_searchLocale != 'zh_CN')
            && (glb_searchLocale != 'zh_TW'))
        {
            return false;
        }
        else
        {
            return true;
        }
    }
	/* === TopNav bar portion === */
	function MacCheck()
	{
	   return;
	   //	Bug #: 	1429873
	   //The code below has been commented since it was unneccesarily doing the following for mac and due to the timers involved, the search button gets
	   //enabled randomly once the user moves the focus on search textbox and then clicks on the ASP fav folders in quick succession
	   //The code might have been written to get around some mac specfic Opera glitch, which does not seem to exist now.
	   
		//if( glb_KeyAtFocus == document.FormName.searchfield.value )
		//{
			//setTimeout( "MacCheck();", 500 );
		//}
		//else
		//{
		//	glb_KeyAtFocus = "D u m m y ~ _ !   ";
		//	glb_Searchable = true; /* EditBox is cleared as it's the first char */
		//	UpdateSearchBtnStates();
		//}
	}
	if( PTSGLilo_Prototype=="yes" )
	{
		var PTSGLilo_SavedKeyword  =["","","","","","","","","","","","","","","","",
									 "","","","","","","","","","","","","","","","",
									 "","","","","","","","","","","","","","","","",
									 "","","","","","","","","","","","","","","","",
									 "","","","","","","","","","","","","","","","",
									 "","","","","","","","","","","","","","","","",
									 "","","","","","","","","","","","","","","","",
									 "","","","","","","","","","","","","","","",""];
		var PTSGLilo_CorrectKeyword=["","","","","","","","","","","","","","","","",
									 "","","","","","","","","","","","","","","","",
									 "","","","","","","","","","","","","","","","",
									 "","","","","","","","","","","","","","","","",
									 "","","","","","","","","","","","","","","","",
									 "","","","","","","","","","","","","","","","",
									 "","","","","","","","","","","","","","","","",
									 "","","","","","","","","","","","","","","",""]; 

		function PTSGLilo_SpellCheck( inStr, status /* 0=doSearch|Thesaurus 2=KeyUp */ )
		{
			var ii=inStr.split(" ");
			var j, k=0, corr, st, o="";
			var bInQuote=false;
			if( status != 0 )
			{	// when onKeyUp
				st = inStr.charAt( inStr.length - 1 );
				if( st != ' ' )
					return( inStr ); // If the last char is not space char. on KeuUp event, return
			}
			for( j=0;j<ii.length;j++ )
			{
				if( ( PTSGLilo_SavedKeyword[j] != undefined )&&( PTSGLilo_SavedKeyword[j] == ii[j] ) )
				{	// already Examined and equal
					;
				}
				else if( ( ii[j] ).charAt(0) == '"' )
				{
					PTSGLilo_CorrectKeyword[j] = ( PTSGLilo_SavedKeyword[j] = ii[j] );
					bInQuote = true;
				}
				else if( bInQuote )
				{
					st = ( PTSGLilo_CorrectKeyword[j] = ( PTSGLilo_SavedKeyword[j] = ii[j] ) );
					if( st.charAt( st.length-1 ) == '"' )
						bInQuote = false;
				}
				else
				{
					st = "0" + ( 10000 + j );
					PTSGLilo_CorrectKeyword[j] = call( "_cbNav_PTSGLilo_SpellCheck", const_DocID+st.substr(2,4)+ii[j] );
					PTSGLilo_SavedKeyword[j]   = ii[j]
				};
				if( PTSGLilo_CorrectKeyword[j] != "" )
				{
					if( k > 0 )
						o += " ";
					o += PTSGLilo_CorrectKeyword[j];
					k++;
				}
			}
			if( status != 0 )
			{
				o += " "; // Last char must be ' ' and this is OK
			}
			return( o );
		}
		function PTSGLilo_Thesaurus()
		{
			var i, j, iKeyword, uKeyword, iArray;
			if( ! glb_duringInitialize )
			{
				if( ! glb_Searchable )
				{
					return( false );
				};
				glb_Searchable = false; /* Go button is pressed */
				//getImgData( 31, 2, glb_tTb[4].Nm );
				iKeyword = document.FormName.searchfield.value;
				/* take out trailing spaces */
				for( i=iKeyword.length-1; i>=0; i-- )
				{
					if( iKeyword.charAt(i) != ' ' )
					{
						break;
					};
				};
				if( i >= 0 )
				{
					uKeyword = iKeyword.substr( 0, i+1 );
				}
				else
				{
					uKeyword = "";
				};
				if( ( uKeyword != "" )&&
					( uKeyword != const_JSCt_NA )&&
					( uKeyword != const_JSCt_DefuKeyWord ) )
				{
					uKeyword = removeIllegalSearchChars( uKeyword );
					uKeyword = PTSGLilo_SpellCheck( uKeyword, 0 /* Go */ );
					iArray = uKeyword.split( ' ' );
					if( iArray.length == 0 )
					{
						document.FormName.searchfield.value = const_JSCt_DefuKeyWord;
					}
					else
					{
						if( iArray.length == 1 )
						{
							uKeyword = call( "_cbNav_PTSGLilo_Thesaurus", const_DocID+"0000"+uKeyword );
						}
						document.FormName.searchfield.value = uKeyword;
						glb_chk2EntOn = false;
						glb_Searchable = true;
						glb_ParamFromES.uKeyWord  = uKeyword;
						glb_ParamFromES.nuKeyWord = uKeyword.length;
					    setTimeout( "chk2Enter(14);", 10 );
//						call( "_cbNav_SetKeyword", const_DocID+escape( uKeyword ) );
//						call( "_cbNav_ExecES", const_DocID+"%_WEB_OR_FILE%_DL.search.basicSearchFromES(\""+escape(uKeyword)+"\", " );
					}
				}
				else
				{
					if( ( glb_KeyAtFocus == "" )||
						( glb_KeyAtFocus == const_JSCt_NA )||
						( glb_KeyAtFocus == const_JSCt_DefuKeyWord )||
						( glb_KeyAtFocus =="D u m m y ~ _ !   " ) )
					{
						document.FormName.searchfield.value = const_JSCt_DefuKeyWord;
					}
					else
					{
						document.FormName.searchfield.value = glb_KeyAtFocus;
					};
				};
			};
			return( false );
		}
	} // if( PTSGLilo_Prototype=="yes" )
	function OnFocus%_WEB_OR_FILE%_()
	{
        var bExpandAdvDrawer = false;

		if( ! glb_duringInitialize )
		{
			if( document.FormName.searchfield.value == const_JSCt_DefuKeyWord )
			{
				document.FormName.searchfield.value = "";
			};
            glb_KeyAtFocus = document.FormName.searchfield.value;
			document.FormName.searchfield.focus();
            if (glb_bTextSelection == true)
			{
				document.FormName.searchfield.select();
				glb_bTextSelection = false;
				bExpandAdvDrawer = glb_advSearchAutoOpen;
			}
            document.FormName.searchfield.focus();
            if( const_win_OR_mac == 'm' )
			{
				setTimeout( "MacCheck();", 500 );
			}
    		if ((trimString(document.FormName.searchfield.value) != '')
    		  || (isFEPLanguage() == true))
            {
                glb_Searchable = true;
            }
            else
            {
                glb_Searchable = false;
            }
            UpdateSearchBtnStates();

            if (trimString(document.FormName.searchfield.value) == '')
            {
                bExpandAdvDrawer = glb_advSearchAutoOpen;
            }
            if ((bExpandAdvDrawer == true) && (IsAdVisible() == false)
                && (glb_DontScheduleToggleOnNextFocus == false))
            {
                setTimeout('ToggleAdvancedOptionsDrawer();',0);
            }
        }
        glb_bKeywordHasFocus = true;
        glb_DontScheduleToggleOnNextFocus = false;

        return( true );
	}
	function OnBlur%_WEB_OR_FILE%_()
	{
		if( ! glb_duringInitialize )
		{
			glb_KeyAtFocus = "";
			if ((trimString(document.FormName.searchfield.value) != '')
			     || (isFEPLanguage() == true))
			{
				glb_Searchable = true;
            }
            else
            {
                glb_Searchable = false;
            }
            UpdateSearchBtnStates();
		}
		glb_bKeywordHasFocus = false;
		return( true );
	}
	function OnChange%_WEB_OR_FILE%_(e)
	{
        if( ! glb_duringInitialize )
		{
			if ((trimString(document.FormName.searchfield.value) != '')
			     || (isFEPLanguage() == true))
			{
                glb_Searchable = true;
            }
            else
            {
                glb_Searchable = false;
            }
		}
		if( e.keyCode == 13)
		{
			glb_bSettingsKeywordChanged = false;
		}
		else
		{
           	glb_bSettingsKeywordChanged = true;
		}
		return ( true );
    }
	function OnKeydown%_WEB_OR_FILE%_()
	{
		if( ! glb_duringInitialize )
		{
		    if( document.FormName.searchfield.value == glb_KeyAtFocus )
			{
                glb_KeyAtFocus = "D u m m y ~ _ !   ";
			}
		}
		return( true );
	}
	function OnKeyUp%_WEB_OR_FILE%_(e)
	{
        if( ! glb_duringInitialize )
		{
			if( PTSGLilo_Prototype=="yes" )
			{
				document.FormName.searchfield.value = PTSGLilo_SpellCheck( document.FormName.searchfield.value, 2 /* KeyUp */ );
			}
		    if ((trimString(document.FormName.searchfield.value) != '')
		      || (isFEPLanguage() == true))
            {
                glb_Searchable = true;
            }
            else
            {
                glb_Searchable = false;
            }
			if( e.keyCode == 13)
			{
				glb_bSettingsKeywordChanged = false;
			}
			else
			{
            	glb_bSettingsKeywordChanged = true;
			}
            UpdateSearchBtnStates();
        }
    }
    function OnKeyAsIs%_WEB_OR_FILE%_() { return( true ); }
	function removeIllegalSearchChars(kwd)
    {
	    var modkwd = "";
	    var i;
	    for(i = 0; i < kwd.length; i++)
	    {
	      if (kwd.charCodeAt(i) != 92)
        {
          modkwd += kwd.charAt(i);
        }
	    }
	    return modkwd;
    }
    function GetWheelText()
    {
        if ((glb_ParamFromES.Wheel == 'sho') || (glb_ParamFromES.Wheel == 'def')
            || (glb_ParamFromES.Wheel == 'xoy'))
        {
            return const_Ln1_STR2_Other; // Getting Images...
        }
        else
        {
            return glb_ParamFromES.Wheel;
        }
    }
    function UpdateSearchBtnStates()
    {
        var oSearchWithinCheck = document.getElementById("SrchWithin");
        var oSearchWithinText = document.getElementById("SrchWithinText");

        if (glb_Searchable == true)
        {
            ChangeSearchBtnState('Search1', 2);
        }
        else
        {
            ChangeSearchBtnState('Search1', 3);
        }

        if ((glb_ParamFromES.uKeyWord != undefined)
                && (trimString(glb_ParamFromES.uKeyWord) != '')
                && (glb_ParamFromES.uKeyWord != const_JSCt_DefuKeyWord))
        {
            glb_bSearchWithinEnabled = true;
            oSearchWithinText.style.color = '#000000';
        }
        else
        {
            glb_bSearchWithinEnabled = false;
            oSearchWithinText.style.color = '#999999';
        }

        oSearchWithinCheck.disabled = !(glb_bSearchWithinEnabled);
    }
	function doSearch( searchFieldText, searchKeyword, bSearchWithIn )
    {
		call( "_cbNav_IsSearchWithin", const_DocID+bSearchWithIn );
		if ( ifValidKeyword( searchKeyword ) )
		{
			if(IsAdVisible())
			{
				ToggleAdvancedOptionsDrawer();
			}
			var uKeyword = removeIllegalSearchChars( searchKeyword );
			WritexOfy( const_JSCt_NA );
			glb_curr_KWd  = uKeyword;
			glb_prev_KWd  = "->"+uKeyword;
			glb_OlduKeyWd = glb_prev_KWd;
			WriteKey(  uKeyword );
			glb_GIFDisp = false;
			GifVisible();
			glb_ParamFromES.uKeyWord  = uKeyword;
			glb_ParamFromES.nuKeyWord = uKeyword.length;
            // Remove focus from searchfield, for consistent behavior
			document.FormName.searchfield.blur();
            glb_Searchable = false; // Go button is pressed
			glb_bTextSelection = true; // Allow the text field to be selected next time
			var oSearchWithinCheck = document.getElementById("SrchWithin");
			if (oSearchWithinCheck != undefined)
            {
                oSearchWithinCheck.checked = false;
            }

			glb_bSettingsKeywordChanged = false;
			glb_searchHappened = true;
			UpdateSearchBtnStates();
			//hideSearchWithin();
      call( "_cbNav_SetKeyword", const_DocID+escape( searchFieldText ) );
			call( "_cbNav_ExecES", const_DocID+"%_WEB_OR_FILE%_DL.search.basicSearchFromES(\""+escape( searchKeyword )+"\", " +"\"" + escape( searchFieldText ) + "\", ");
		}
		else
		{
			if( ( glb_KeyAtFocus == "" )||
				    ( glb_KeyAtFocus == const_JSCt_NA )||
				    ( glb_KeyAtFocus == const_JSCt_DefuKeyWord )||
				    ( glb_KeyAtFocus =="D u m m y ~ _ !   " ) )
			{
				document.FormName.searchfield.value = const_JSCt_DefuKeyWord;
			}
			else
			{
				document.FormName.searchfield.value = glb_KeyAtFocus;
			}
		}
    }
    function ifProceedToSearch()
    {
    	if ((glb_duringInitialize) ||
    	    (!glb_Searchable)      ||
    	    (!areAllFiltersValid()))
    		return ( false );
		  return true;
    }
    function ifValidKeyword( uKeyword )
    {
        if ( ( trimString(uKeyword) == "" ) ||
			    ( uKeyword == const_JSCt_NA ) ||
			    ( uKeyword == const_JSCt_DefuKeyWord ) )
			return false;
		return true;
    }
    function removeLeadingAndTralingSpaces( iKeyword )
    {
    	var uKeyword;
    	for( var i=iKeyword.length-1; i>=0; i-- )
		{
			if( iKeyword.charAt(i) != ' ' )
			{
				break;
			};
		};
		var j = 0;
		for( j=0; j<iKeyword.length-1; j++ )
		{
			if( iKeyword.charAt(j) != ' ' )
			{
				break;
			};
		};
		if( i >= 0 )
		{
			uKeyword = iKeyword.substr( j, i+1-j );
		}
		else
		{
			uKeyword = "";
		}
		return ( uKeyword );
    }
	function Go%_WEB_OR_FILE%_()
	{
    	if ( ifProceedToSearch() == false )
    	{
            return false;
		}
        var oSearchWithinCheck = document.getElementById("SrchWithin");
        if ((glb_bSearchWithinEnabled == true) && (oSearchWithinCheck != undefined)
                        && (oSearchWithinCheck.checked == true))
        {
            return onClickSearchWithin();
        }
        else
        {
		  var uKeyword = removeLeadingAndTralingSpaces( document.FormName.searchfield.value );
		  if( PTSGLilo_Prototype=="yes" )
		  {
				uKeyword = PTSGLilo_SpellCheck( uKeyword, 0 /* Go */ );
  		  } // if( PTSGLilo_Prototype=="yes" )
		  return doSearch( uKeyword, uKeyword, 0 );
		}
	}
	function AddFunc( k, x, y )
	{
		var Obj1, Obj2, Nm="";
			switch( k ) {
				case 0:  BoxClickByName%_WEB_OR_FILE%_( "DL.MiscDlgs.aboutPreference(" ); break;//no longer used
				case 1:  // MouseOver
				         Nm = document.getElementById("UsedLangA").childNodes[0].nodeValue;
				         var chp = glb_tTb[42].chp;
				         if ( chp != "" )
				         {
				         	var xx, yy, cObj = document.all[ chp ].style;
				         	xx = x + glb_tTb[42].xd - 10;
				         	yy = y + glb_tTb[42].yd - 10;
				         	cObj.left = xx;
				         	cObj.top = yy;
				         	cObj.width = -glb_tTb[42].xd;
				         	cObj.height = -glb_tTb[42].yd;
				         	cObj.zIndex = 20;
						    cObj.visibility = "visible";
							glb_bSearchLangTooltpShown = true;
				         }
				         document.getElementById("UsedLangA").childNodes[0].nodeValue = Nm;
				         break;
				case 2:  // MouseOut
				         Nm = document.getElementById("UsedLangA").childNodes[0].nodeValue;
				         var chp = glb_tTb[42].chp;
						 var cObj = document.all[ chp ].style;
						 cObj.visibility = "hidden";
				         glb_bSearchLangTooltpShown = false;
				         document.getElementById("UsedLangA").childNodes[0].nodeValue = Nm;
				         break;
				case 3:
				        // Only if it's enabled
				        if ( ( glb_MThumbState & 2 ) != 0 )
                        {
                            MoreResult%_WEB_OR_FILE%_();
                        }
                break;
				case 4:
						if ( ( glb_MThumbState & 2 ) != 0 )
						{
						 document.all("Tb_More").style.cursor = "hand";
						 // display tool tip only if enabled.
						 var chp = glb_tTb[11].chp;
						 if( x >0 && y>0 && chp != "" )
						 {
							var yy, cObj = document.all[ chp ].style;
							if( y > cNavHeight )
							{
								yy = cNavHeight + glb_tTb[k].yd;
							}
							else
							{
								yy = y+glb_tTb[k].yd - 10;
							}
							if( yy < 0 )
							{
								yy = 2;
							};
							cObj.left = x  + glb_tTb[k].xd + document.body.scrollLeft - 70;
							cObj.top  = yy             + document.body.scrollTop - 10;
							cObj.visibility = "visible";
						 };
						}
						PutMoreResultString( 0, 0 );
						break;
				case 5:
						var chp = glb_tTb[11].chp;
						var cObj = document.all[ chp ].style;
						cObj.visibility = "hidden";
						document.all("Tb_More").style.cursor = "default";
						PutMoreResultString( 1, 1 );
						break;
				default: break;
			}
		return( false );
	}
	var glb_ButDisableTxtColor ="#666666";
	var glb_ButDisableBackColor="#FBFBFB";
	var glb_ButMouseOnTxtColor ="#000000";
	var glb_ButMouseOnBackColor="#FBFBFB";
	var glb_ButNormalTxtColor  ="#000000";
	var glb_ButNormalBackColor ="#FBFBFB";
	function HandleButton( k, which, html, x, y )
	{	// k = 0:OnClick 1:MouseOver 2:MouseOut 3:onMouseDown
		// which 0:Btn1 1:Btn01 2:Btn2 3:Btn3
		var idx = ( 4 * glb_b0 ) + 11 + which;
        var imgNm =  "NavBar_Button"; //glb_tTb[ idx ].Nm;
		var strNm, strTd, strImg;
		var strV, ObjS;
		var chp, aNm;
		var img = new Image;
		//<Boxcar3>
		switch (which)
		{
			case 0:
			{
			 strNm = "u_Btn0A";
			 strTd = "Td_Btn0A";
			 strImg = "img_Btn0A";
			 break;
			}
			case 1:
			{
			 strNm = "u_Btn01A";
			 strTd = "Td_Btn01A";
			 strImg = "img_Btn01A";
			 break;
			}
			case 2:
			{
			 strNm = "u_Btn1A";
			 strTd = "Td_Btn1A";
			 strImg = "img_Btn1A";
			 break;
			}
			case 3:
			default:
			{
			 strNm = "u_Btn2A";
			 strTd = "Td_Btn2A";
			 strImg = "img_Btn2A";
			 break;
			}
		}
		if( glb_BtnLabel[ glb_b0 ].btn[ which ].f != "" )
		{
			ObjS = document.all( strNm ).style;
			ObjTd = document.all( strTd ).style;
			if( ! ( glb_EnableButn[ which ] ) )
			{
				ObjS.color = glb_ButDisableTxtColor;
				ObjTd.backgroundImage = "url('" + glb_NBBNormal.src + "')";

				document.images[ strImg ].src = document.images[ strImg ].src.replace(/_[D,R,N,d,r,n].png/, "_D.png");
			}
			else if( k == 1 )
			{
				ObjTd.backgroundImage = "url('" + glb_NBBRollover.src + "')";
				ObjS.color = glb_ButMouseOnTxtColor;
				document.images[ strImg ].src = document.images[ strImg ].src.replace(/_[D,R,N,d,r,n].png/, "_N.png");
			}
			else if (k == 3)
			{
				ObjTd.backgroundImage = "url('" + glb_NBBSelect.src + "')";
			}
			else
			{
				if(k == 0)
				{
					ObjTd.backgroundImage = "url('" + glb_NBBSelect.src + "')";
					ObjS.color = "#000000";
					switch( which )
					{
						case  0:
						case  1:
						 GetImageDetail%_WEB_OR_FILE%_( which ); break;
						case  2: SaveLowRes%_WEB_OR_FILE%_();break;
						default: AddToCart%_WEB_OR_FILE%_();
					}
				}
				else
				{
					ObjTd.backgroundImage = "url('" + glb_NBBNormal.src + "')";
				}
				ObjS.color = glb_ButNormalTxtColor;
				document.images[ strImg ].src = document.images[ strImg ].src.replace(/_[D,R,N,d,r,n].png/, "_N.png");
			}
		}
	}
	function HandleSearchButton(k, which, x, y)
	{ // k: 0 => mouseUp, 1 => mouseDown, 2=> onMouseover, 3 => onMouseOut
	  // which: 3-Adv Search, 4- Search, 5- split button, 6- photos & illustration
	  switch (which)
	  {
	  	case 3:
		{
			switch (k)
				{
					case 0:
					{
					 	hideCurrentSearchTooltip();
					 	break;
					}
					case 1:
					{
						hideCurrentSearchTooltip();
					 	break;
					}
					case 2:
					{
						document.all("AdvSrch").style.cursor = "hand";
						if ( ( glb_indexToCurrentSearchBarTooltip != -1) && ( glb_indexToCurrentSearchBarTooltip != 3 ) )
							hideCurrentSearchTooltip();
						glb_indexToCurrentSearchBarTooltip = 3;
						var chp = glb_tTb[glb_indexToCurrentSearchBarTooltip].chp;
				        if ( chp != "" )
				        {
				        	var xx, cObj = document.all[ chp ].style;
							xx = x - "%_ADVSEARCH_TOOLTIP_WIDTH%_"/2;
							if ( xx < 0 )
								xx = 0;
							cObj.left = xx;
							cObj.width = "%_ADVSEARCH_TOOLTIP_WIDTH%_";
							cObj.height = "auto";
							cObj.top = parseInt("%_NAVBAR_ROW1%_") + parseInt("%_NAVBAR_ROW2%_") + parseInt("%_NAVBAR_ROW3%_") + parseInt("%_NAVBAR_ROW4%_") - 15;
							cObj.zIndex = 20;
							cObj.visibility = "visible";
						}
						break;
					}
					case 4:
					{
						document.all("MoreInfo").style.cursor = "hand";
						if ( ( glb_indexToCurrentSearchBarTooltip != -1) && ( glb_indexToCurrentSearchBarTooltip != 3 ) )
							hideCurrentSearchTooltip();
						glb_indexToCurrentSearchBarTooltip = 12;
						var chp = glb_tTb[glb_indexToCurrentSearchBarTooltip].chp;
				        if ( chp != "" )
				        {
				        	var xx, cObj = document.all[ chp ].style;
							xx = x - "%_ADVSEARCH_TOOLTIP_WIDTH%_"/2;
							if ( xx < 0 )
								xx = 0;
							cObj.left = xx;
							cObj.width = 113;
							cObj.height = "auto";
							cObj.top = 180
							cObj.zIndex = 20;
							cObj.visibility = "visible";
							
						}
						break;
					}
					case 3:
					default:
					{
						document.all("AdvSrch").style.cursor = "default";
						hideCurrentSearchTooltip();
						break;
					}
				}
			break;
		}
		case 4:
		{
			if(glb_Searchable == true)
			{
				switch (k)
				{
					case 0:
					{
					 	document.all("Search1").style.backgroundImage = "url('" + glb_SBNormal.src + "')";
					 	hideCurrentSearchTooltip();
					 	break;
					}
					case 1:
					{
						document.all("Search1").style.backgroundImage = "url('" + glb_SBSelect.src + "')";
						hideCurrentSearchTooltip();
					 	break;
					}
					case 2:
					{
						document.all("Search1").style.cursor = "hand";
						if ( ( glb_indexToCurrentSearchBarTooltip != -1) && ( glb_indexToCurrentSearchBarTooltip != 4 ) )
							hideCurrentSearchTooltip();
						glb_indexToCurrentSearchBarTooltip = 4;
						var chp = glb_tTb[glb_indexToCurrentSearchBarTooltip].chp;
				        if ( chp != "" )
				        {
				        	var cObj = document.all[ chp ].style;
							cObj.visibility = "visible";
							cObj.left = x - "%_SEARCH_TOOLTIP_WIDTH%_"/2;
							cObj.width = "%_SEARCH_TOOLTIP_WIDTH%_";
							cObj.height = "auto";
							cObj.top = parseInt("%_NAVBAR_ROW1%_") + parseInt("%_NAVBAR_ROW2%_") - 15;
							cObj.zIndex = 20;
						}
						break;
					}
					case 3:
					{
						document.all("Search1").style.backgroundImage = "url('" + glb_SBNormal.src + "')";
						document.all("Search1").style.cursor = "default";
						hideCurrentSearchTooltip();
						break;
					}
				}
			}
			else
			{
				document.all("Search1").style.cursor = "default";
			}
			break;
		}
		case 5:
		{
			break;
		}
		case 6:
		{
			break;
		}
	  }
	}
	function PutMoreResultString( k /* 0=MouseOver 1=MouseOut */, where )
	{
		var Obj, str, Col, BCol;
		if( glb_b0 == 1 )
		{
			str = "%_MORERES2%_";
			if( ( glb_MThumbState & 2 ) != 0 )
			{ // Enabled
				Col  = "#027ABB";
			}
			else
			{ // disabled
				Col  = "#999999";
			};
			Obj = document.all( "TextMoreA" ).style;
			Obj.color  = Col;
			document.getElementById("TextMoreA").childNodes[0].nodeValue = str;
		}
	}
	function MoreThumbBtn( NorD, bOn /* true=make enabled | false=make disabled */ )
	{ // "D", false | "N", true | "N", false
		if( ( const_Web_OR_FV == 'f' )&&( glb_b0 == 1 ) )
		{
			if( bOn )
			{ // NorD = "N"
				if( ( glb_MThumbState & 3 ) == 1 )
				{ /* visible but disabled */
					getImgDt31( NorD, glb_tTb[11].Nm );
					glb_MThumbState |= 2; // Mark enabled
				}
			}
			else
			{ // NorD is "N"|"D"
				if( ( glb_MThumbState & 3 ) == 3 )
				{ /* visible and enabled */
					getImgDt31( NorD, glb_tTb[11].Nm );
					glb_MThumbState &= 1; // Mark disabled / focus off
				}
			}
			PutMoreResultString( 1, 2 ); // write as MouseOut */
			glb_tTb[11].l = NorD;
		};
	}
	function MoreThumbDisable()
	{
		MoreThumbBtn( "D", false );
	}
	function MoreThumbEnable()
	{
		MoreThumbBtn( "N", true );
	}
	function MoreThumbFocus()
	{
		MoreThumbEnable();
		if( ( glb_MThumbState & 3 ) == 3 )
		{ /* visible and enabled */
			document.formmore.hidenbtn.focus();
		}
	}
	function SetL1Getting( bSet )
	{
		var str;
		if( bSet )
		{
			if( glb_GIFLabel == "" )
				 str = "%_LN1_STR2%_";
			else str = glb_GIFLabel;
			if( document.getElementById("L1Getting").childNodes[0].nodeValue.length < 3 )
				document.getElementById("L1Getting").childNodes[0].nodeValue = str;
			document.all("L1Getting").style.visibility = "visible";
			document.all("L1Getting").style.textAlign = "center";
		}
		else
		{
			document.getElementById("L1Getting").childNodes[0].nodeValue = ".";
			document.all("L1Getting").style.visibility = "hidden";
		}
	}
	function GifVisible()
	{
		if( ! glb_GIFDisp )
		{
			glb_GIFDisp = true;
			document.all("Td_GettingImg").style.visibility = "visible";
			document.all("Td_GettingImg").style.display = '';
			document.all("Td_GettingImg").style.textAlign = "center";
			document.all("Td_GettingImg").style.align = "center";
			document.all("Td_moreXofY").style.visibility = "hidden";
			document.all("Td_moreXofY").style.display = "none";
			document.all("Td_Keyword").style.visibility = "hidden";
			document.all("Td_Keyword").style.display = "none";
			glb_keywordCurPos = -1;
			document.all("Td_Label").style.visibility = "hidden";
			document.all("Td_Label").style.display = "none";

			SetL1Getting( true );
		};
	}
	function GifHide()
	{
		if( glb_GIFDisp )
		{
			glb_GIFDisp = false;
			document.all("Td_GettingImg").style.visibility = "hidden";
			document.all("Td_GettingImg").style.display = "none";

            if (glb_b0 == 1)
			{
				document.all("Td_moreXofY").style.visibility = "visible";
				document.all("Td_moreXofY").style.display = "inline"; // should it be ''?
                document.all("Td_Label").style.visibility = "hidden";
                document.all("Td_Label").style.display = "none";

                UpdateInfoWellSizeAndPosition(3);
			}
			else
			{
                document.all( "Td_TextMore" ).style.visibility     = "hidden";
                document.all( "Td_Keyword" ).style.visibility     = "hidden";
                document.all("Td_Label").style.visibility = "visible";
                document.all("Td_Label").style.display = "inline"; // should it be ''?
            }
			SetL1Getting( false );
		};
	}
	function GetImageDetail%_WEB_OR_FILE%_( which )
	{
		if( glb_bt0 || glb_bt01)
		{
		  if( which == 0 )
			BoxClickByName%_WEB_OR_FILE%_( "DL.imgDetail.getPrice(" );
		  else
			BoxClickByName%_WEB_OR_FILE%_( "DL.imgDetail.getKeywords(" );
		}
		return true;
	}
	function SaveLowRes%_WEB_OR_FILE%_()
	{
		if( glb_b0 == 1 )
		{
			BoxClickByName%_WEB_OR_FILE%_( "DL.GetComp.KeepComp(" );
		}
		if( glb_b0 == 3)
		{
			BoxClickByName%_WEB_OR_FILE%_( "DL.ShoppingCart.AddToCart(" );
		}
		if (glb_b0 == 4)
		{
			BoxClickByName%_WEB_OR_FILE%_( "DL.Download.DownloadStock(" );
		}
		return true;
	}
	function AddToCart%_WEB_OR_FILE%_()
	{
		BoxClickByName%_WEB_OR_FILE%_( "DL.ShoppingCart.AddToCart(" );
		return true;
	}
	function MoreResult%_WEB_OR_FILE%_()
	{
		switch( glb_b0 ) {
			case 1: if( glb_bt3 )
				{
					glb_GIFDisp = false;
					GifVisible();
					BoxClickByName%_WEB_OR_FILE%_( "DL.search.MoreThumbs(" );
				};
				break;
		};
		return( false );
	}
	// Checks if the adv search drawer is current visible
	function IsAdVisible()
	{
        var oDrawerObj = document.getElementById("SearchOptions");
        return ((oDrawerObj != undefined) && (oDrawerObj.style.display != 'none'));
  }

	function SetAdvDrawerVisibility ( bShow )
	{
        if (glb_bModifyingDrawer == true)
        {
            return;
        }
        glb_bModifyingDrawer = true;
        var oDrawerObj = document.getElementById("SearchOptions");
        if ((oDrawerObj == undefined) || (document.images["mAdvSearch"] == undefined))
        {
            return;
        }
        var sImgUrl = document.images["mAdvSearch"].src;
        if (bShow == true) // Show the drawer.
        {
            oDrawerObj.style.display = '';
            sImgUrl = sImgUrl.replace("Closed","Open");
            cNavHeight = cNavHeightExpanded;

            AdjustCollectionsListWidth();
        }
        else  // bShow is false. Hide the drawer.
        {
            oDrawerObj.style.display = 'none';
            sImgUrl = sImgUrl.replace("Open","Closed");
            cNavHeight = cNavHeightOriginal;
        }
        // Original --> document.images["mAdvSearch"].src = sImgUrl;
        self.setTimeout('document.images.mAdvSearch.src = "' + sImgUrl + '";',10);
        glb_bModifyingDrawer = false;
    }

	function ToggleAdvancedOptionsDrawer()
	{
    	if (false == IsAdVisible())
		{
		  SetAdvDrawerVisibility(true);
		  call('_cbNav_ToggleAdvancedOptions', const_DocID + 'S');

		  AdjustCollectionsListWidth();
		}
		else
		{
		  call('_cbNav_ToggleAdvancedOptions', const_DocID + 'H');
		  SetAdvDrawerVisibility(false);
		}
		return true;
	}

	function UpdateChangedFromDefault(oChangedFromDefault)
	{
	
			document.all("SrchLabel").childNodes[0].nodeValue = oChangedFromDefault.sCFD;
    }
	function PopulateCollections()
	{
        var sCollectionsSource = call('_cbNav_GetCollectionsList');
        glb_arCollections = eval(sCollectionsSource);
        glb_iNumCollections = glb_arCollections.length;
        var tElem = document.getElementById("Collections");
        var trElem, tdElem;
        var sDisplayName, sID, sValueCollectionName;

        for (var iterColl = 0; iterColl < glb_iNumCollections; ++iterColl)
        {
            sDisplayName = glb_arCollections[iterColl].CollectionDisplayName.Value;
            sID = "Collection" + iterColl;
            trElem = tElem.insertRow(tElem.rows.length);
            tdElem = trElem.insertCell(trElem.cells.length);
            tdElem.style.paddingRight = "10px"
            tdElem.className = "checkboxes";
            
            tdElem.innerHTML = '<input TYPE="checkbox" height="13px" width="100%" name="Collection" value="' + iterColl + '" checked ID="' + sID + '" class="checkbox" onClick="changeSelectedOption(this.checked);"> ' + sDisplayName;
                
            trElem = tElem.insertRow(tElem.rows.length);
            tdElem = trElem.insertCell(trElem.cells.length);
            tdElem.height = 4;
        }
    }

      
  
   //Select proper UI based on whether we have value collection/Photo Object feature 
   // enabled or not.
  
   function SelectUI()
   {
       var bValueCollectionsFeatureFlag = call('_cbNav_GetValueCollectionsFeatureFlag');
       
       var bPhotoObjectFeatureFlag = call('_cbNav_GetPhotoObjectCollectionsFeatureFlag'); 
       
      
       var tElem = document.getElementById("AdvSearchOptions3");
       
       var trElem;
       var tdElem;
       
      
       if(bPhotoObjectFeatureFlag == true)
       {
           //add the photo object UI
           var tdElem3 = document.getElementById("PhotoObjectCol");
           tdElem3.innerHTML = tdElem3.innerHTML+ "&nbsp;&nbsp;%_ADV_PHOTOOBJECT%_";
       }
       else
       {
          //do not display photo object UI.  
          var tphoto = document.getElementById("PhotoObject");
          tphoto.style.display = 'none'; 
          tphoto.checked = false; 
       }
       
       if(bValueCollectionsFeatureFlag == true)
       {
          
          // makes radio button for "Seach all collections"
          trElem = tElem.insertRow(tElem.rows.length);
         
          trElem.style = "height:13px";
          tdElem = trElem.insertCell(trElem.cells.length);
          tdElem.id = "Td_ChkSearchAll";
          tdElem.align = "left";
          tdElem.width = "100%";
          tdElem.style.paddingRight = "10px";
          tdElem.innerHTML = '<input TYPE="radio" name="Collection" value = "SearchAllCollection" checked ID="ChkSearchAll" onClick = "selectAllCollections(this.checked);" selected = "true" >%_ADV_COLLECTALL%_<br /> ';
          tdElem.className = "checkboxes";
          
          // makes radio button for "Search low priced collections".
          trElem = tElem.insertRow(tElem.rows.length);
          trElem.style = "height:13px";
          tdElem = trElem.insertCell(trElem.cells.length);
          tdElem.id = "Td1";
          tdElem.align = "left";
          tdElem.width = "100%";
          tdElem.style.paddingRight = "10px";
          tdElem.innerHTML = '<input TYPE="radio" name="Collection" value ="ValueCollection" ID="ValueCollection" onClick = "SelectValueCollections();"/>%_VALUECOLLEC%_<a nohref id="ValueCollDesc">%_VALUEAMT%_</a>';
          tdElem.className = "checkboxes";       
          
          // makes radio button for "Search selected collections".
          trElem = tElem.insertRow(tElem.rows.length);
          trElem.style = "height:13px";
          tdElem = trElem.insertCell(trElem.cells.length);
          tdElem.id = "Td2";
          tdElem.align = "left";
          tdElem.width = "100%";
          tdElem.style.paddingRight = "10px";
          tdElem.innerHTML = '<input TYPE="radio" name="Collection" value ="SearchCollection" ID="SearchCollection" onClick = "searchCollections();"/>%_SEARCHCOLLEC%_';
          tdElem.className = "checkboxes";
                              
        }
        else
        {
          trElem = tElem.insertRow(tElem.rows.length);
          trElem.style = "height:13px";
          tdElem = trElem.insertCell(trElem.cells.length);
          tdElem.id = "Td_ChkSearchAll";
          tdElem.align = "left";
          tdElem.width = "100%";
          tdElem.ID = "ChkSearchAll"
          tdElem.style = "padding-left:2px;padding-right:10px;padding-bottom:3px;FONT-FAMILY:%_PRIMARYFONT%_;";
          tdElem.style.paddingRight = "10px";
          tdElem.style.paddingLeft = "0px";
          tdElem.style.paddingBottom = "2px";
          tdElem.innerHTML = '<input TYPE="checkbox" name="Collection" value = "SearchAllCollection" checked ID="ChkSearchAll" onClick = "selectAllCollections(this.checked);" selected = "true" >%_ADV_COLLECTALL%_<br /> ';
          tdElem.className = "checkboxes";
         
        } 
         
         
   }
   
  
  function AdjustCollectionsListWidth()
  {
  	  if ( !glb_collectionListWidthAdjusted )
  	  {
      	 var collectionFieldWidth = document.getElementById("CollectionsField").offsetWidth;
      	 var collectionListWidth = document.getElementById("CollectionsList").offsetWidth - 1;
      	 var collectionAllWidth = document.getElementById("Td_ChkSearchAll").offsetWidth + 10;

      	 if ( collectionListWidth < collectionAllWidth )
      	 {
      	 	collectionListWidth = collectionAllWidth - 10;
      	 }

         document.all("CollectionsList").style.width = collectionListWidth;
         document.all("CollectionsField").style.width = collectionFieldWidth + 5;
         document.all("CollectionsList").style.overflow = "auto";

         glb_collectionListWidthAdjusted = true;
      }
  }
  function UpdateKeyword()
  {
  		var keyword = "\"";
   		if ( glb_keywordCurPos >= 0)
   		{
   			keyword += glb_OlduKeyWd.substr(0, glb_keywordCurPos);
      	}
   		var lastKeyword = keyword + "...\"";
   		document.getElementById("Keyword").childNodes[0].nodeValue = lastKeyword;

     	while ( ( document.getElementById("Tb_SearchControlBar").offsetWidth <= glb_windowWidth )
     			&& ( document.getElementById("Tb_InfoWell").offsetWidth < const_infoWellMaxWidth )
     			&& ( glb_keywordCurPos <= glb_OlduKeyWd.length ) )
     	{
     		lastKeyword = document.getElementById("Keyword").childNodes[0].nodeValue;
     		if ( glb_keywordCurPos < glb_OlduKeyWd.length )
     		{
     			document.getElementById("Keyword").childNodes[0].nodeValue = keyword + "...\"";
     		}
     		else // if ( glb_keywordCurPos == glb_OlduKeyWd.length )
     		{
     			document.getElementById("Keyword").childNodes[0].nodeValue = keyword + "\"";
     		}

     		keyword += glb_OlduKeyWd.charAt(glb_keywordCurPos);
     		glb_keywordCurPos++;
     	}

     	if ( ( document.getElementById("Tb_SearchControlBar").offsetWidth > glb_windowWidth )
     			|| ( document.getElementById("Tb_InfoWell").offsetWidth > const_infoWellMaxWidth ) )
     	{
     		document.getElementById("Keyword").childNodes[0].nodeValue = lastKeyword;
     	}
    	glb_keywordCurPos--;

    	if ( ( glb_keywordCurPos < 0 ) && ( glb_OlduKeyWd.length < 4 ) )		//sometimes width of "..." comes greater than the actual keyword
    	{
    		document.getElementById("Keyword").childNodes[0].nodeValue = "\"" + glb_OlduKeyWd + "\"";

    		if ( ( document.getElementById("Tb_SearchControlBar").offsetWidth <= glb_windowWidth )
	    		&& ( document.getElementById("Tb_InfoWell").offsetWidth <= const_infoWellMaxWidth ) )
     		{
    			glb_keywordCurPos = glb_OlduKeyWd.length;
    		}
    	}
   }

  function TryToDisplayKeyword(sizeChange, keywordChange)
  {
  	 var keywordVisible = true;
  	 if ( document.all("Td_Keyword").style.visibility != "visible")
  	 	keywordVisible = false;

  	 if ( glb_xofyHiddenBecauseOfSize ||
  	 		( document.getElementById("Td_L1xOfy").style.visibility == "hidden") ||
  	 		( glb_OlduKeyWd == "" ) ||
  	 		( glb_OlduKeyWd == const_JSCt_NA ) ||
			( glb_OlduKeyWd == const_JSCt_DefuKeyWord ) )
  	 {
    	document.getElementById("Td_Keyword").style.visibility = "hidden";
    	document.getElementById("Td_Keyword").style.display = "none";

     	glb_keywordCurPos = -1;

     	return;
  	 }

  	 if ( document.getElementById("L1xOfy").childNodes[0].nodeValue == "" ) // even this statement, is it necessary??
  	 {
    	document.getElementById("Td_Keyword").style.visibility = "hidden";
    	document.getElementById("Td_Keyword").style.display = "none";

     	glb_keywordCurPos = -1;
     	keywordVisible = false;
  	 }

     if ( sizeChange == 0 )
     {
  	    if ( document.all("Td_Keyword").offsetWidth < 15 )
     	{
     		//HACK : forcing hidden, then visible resets width..otherwise don't..not sure what the reason is...

     		document.all("Td_Keyword").style.visibility = "hidden";
     		document.all("Td_Keyword").style.display = 'none';
     	}
     	document.getElementById("Keyword").childNodes[0].nodeValue = "\"...\"";
     	document.getElementById("Td_Keyword").style.visibility = "visible";
     	document.getElementById("Td_Keyword").style.display = '';
     	glb_keywordCurPos=0;
      	UpdateKeyword();
     }
     else if ( sizeChange > 0 )
     {
     	if ( document.all("Td_Keyword").offsetWidth < 15 )
     	{
     		//HACK : forcing hidden, then visible resets width..otherwise don't..not sure what the reason is...
     		document.all("Td_Keyword").style.visibility = "hidden";
     		document.all("Td_Keyword").style.display = 'none';

     		document.all("Keyword").childNodes[0].nodeValue = "\"...\"";
     		document.all("Td_Keyword").style.visibility = "visible";
     		document.all("Td_Keyword").style.display = '';

     		glb_keywordCurPos = 0;
     	}
     	if ( ( !keywordVisible || ( document.all("Keyword").childNodes[0].nodeValue == "" ) ) && ( ( document.all("Td_ExpandingCell").offsetWidth + document.all("Td_Keyword").offsetWidth ) > 15  ) )
     	{
     		document.all("Keyword").childNodes[0].nodeValue = "\"...\"";
     		document.all("Td_Keyword").style.visibility = "visible";
     		document.all("Td_Keyword").style.display = '';

     		glb_keywordCurPos = 0;
     	}

     	if ( glb_keywordCurPos < 0 )
     		glb_keywordCurPos = 0;
		if ( ( glb_keywordCurPos >= 0) && ( glb_keywordCurPos < glb_OlduKeyWd.length ) )
		{
        	UpdateKeyword();
     		if ( glb_keywordCurPos < 0 )
     		{
     			document.all("Td_Keyword").style.visibility = "hidden";
     			document.all("Td_Keyword").style.display = "none";
     		}
     	}
     }
     else if ( glb_keywordCurPos >= 0 )// ( sizeChange < 0)
     {
     	var keyword = "\"";
     	while ( ( ( document.getElementById("Tb_SearchControlBar").offsetWidth > glb_windowWidth )
     			|| ( document.getElementById("Tb_InfoWell").offsetWidth > const_infoWellMaxWidth ) )
     			&& ( glb_keywordCurPos >= 0 ) )
     	{
     		keyword = "\"" + glb_OlduKeyWd.substr( 0, glb_keywordCurPos );
     		if ( glb_keywordCurPos < glb_OlduKeyWd.length )
     		{
     			document.getElementById("Keyword").childNodes[0].nodeValue = keyword + "...\"";
     		}
     		else
     		{
     			document.getElementById("Keyword").childNodes[0].nodeValue = keyword + "\"";
     		}

     		lastKeyword = document.getElementById("Keyword").childNodes[0].nodeValue;
     		glb_keywordCurPos--;
     	}

     	if ( ( glb_keywordCurPos < 0 ) && ( glb_OlduKeyWd.length < 4 ) )
    	{
    		document.getElementById("Keyword").childNodes[0].nodeValue = "\"" + glb_OlduKeyWd + "\"";

    		if ( ( document.getElementById("Tb_SearchControlBar").offsetWidth <= glb_windowWidth )
	     		&& ( document.getElementById("Tb_InfoWell").offsetWidth <= const_infoWellMaxWidth ) )
     		{
    			glb_keywordCurPos = glb_OlduKeyWd.length;
    		}
    	}
     	if ( ( document.getElementById("Tb_SearchControlBar").offsetWidth > glb_windowWidth )
     		|| ( document.getElementById("Tb_InfoWell").offsetWidth > const_infoWellMaxWidth ) )
     	{
     		document.getElementById("Td_Keyword").style.visibility = "hidden";
     		document.getElementById("Td_Keyword").style.display = "none";
     		glb_keywordCurPos = -1;
     	}
     }

     if ( document.getElementById("Keyword").childNodes[0].nodeValue == "" )
     {
     	document.all("Td_Keyword").style.visibility = "hidden";
     	document.all("Td_Keyword").style.display = "none";

     	glb_keywordCurPos = -1;
     }

     if ( glb_keywordCurPos < glb_OlduKeyWd.length )
     {
     	document.all("Keyword").title = glb_OlduKeyWd;
     }
     else
     {
     	document.all("Keyword").title = "";
     }
  }

  function AdjustKeywordAndXofY(sizeChange, keywordChange, xofyChange, paneChange)
  {
  	 if ( (glb_b0 != 1) || glb_GIFDisp )
  	 {
  	 	return;
  	 }

  	 //sizeChange=> 0:no change, +ve:increased, -ve: decreased
	 var xofyVisible = true;
  	 if ( document.all("Td_L1xOfy").style.visibility != "visible")
  	 	xofyVisible = false;

  	 if ( xofyChange )
  	 {
  	 	document.all("Td_L1xOfy").style.visibility = "visible";
  	 	document.all("Td_L1xOfy").style.display = '';
  	 	glb_xOfyWidth = document.all("L1xOfy").offsetWidth + 5;

  	 	xofyVisible = true;
  	 	glb_xofyHiddenBecauseOfSize = false;
  	 }
 	 else if ( ( sizeChange > 0 ) && glb_xofyHiddenBecauseOfSize && ( ( document.all("Td_ExpandingCell").offsetWidth +  document.all("Td_Keyword").offsetWidth ) > glb_xOfyWidth ) )
  	 {
  	 	document.all("Td_L1xOfy").style.visibility = "visible";
  	 	document.all("Td_L1xOfy").style.display = '';
  	 	glb_xofyHiddenBecauseOfSize = false;
  	 }

  	 TryToDisplayKeyword(sizeChange, keywordChange);

  	 if ( ( document.getElementById("Keyword").childNodes[0].nodeValue == "" ) ||
  	 			( document.getElementById("Tb_SearchControlBar").offsetWidth > glb_windowWidth ) )
  	 {
  	  	document.getElementById("Td_Keyword").style.visibility = "hidden";
  	  	document.all("Td_Keyword").style.display = "none";
  	  	glb_keywordCurPos = -1;
  	 }
 	 if ( document.getElementById("Tb_SearchControlBar").offsetWidth > glb_windowWidth )
  	 {
  	  	document.getElementById("Td_L1xOfy").style.visibility = "hidden";
  	  	document.getElementById("Td_L1xOfy").style.display = "none";
  	 	glb_xofyHiddenBecauseOfSize = true;
  	 }
  }

  function ShowInfoWellContents()
  {
  	 if (glb_b0 == 1)
  	 {
  	 	//search pane
  	 	document.all("Td_Label").style.visibility = "hidden";
  	 	document.all("Td_Label").style.display = "none";

  	 	if ( glb_GIFDisp )
  	 	{
  	 		document.all("Td_moreXofY").style.visibility = "hidden";
  	 		document.all("Td_moreXofY").style.display = 'none';

  	 		document.getElementById("Td_Keyword").style.visibility = "hidden";
  	  		document.all("Td_Keyword").style.display = "none";
  	  		glb_keywordCurPos = -1;
  	 	}
  	 	else
  	 	{
  	 		document.all("Td_moreXofY").style.visibility = "visible";
  	 		document.all("Td_moreXofY").style.display = '';

  	 		document.all("Td_GettingImg").style.visibility = "hidden";
  	 		document.all("Td_GettingImg").style.display = 'none';
  	 	}
  	 }
  	 else
  	 {
  	 	document.all("Td_Keyword").style.visibility = "hidden";
  	 	document.all("Td_Keyword").style.display = "none";

  	 	document.all("Td_L1xOfy").style.visibility = "hidden";
  	 	document.all("Td_L1xOfy").style.display = "none";

  	 	document.getElementById("Label").childNodes[0].nodeValue = "";

  	 	document.all("Td_Label").style.visibility = "visible";
  	 	document.all("Td_Label").style.display = '';

  	 	document.all("Td_moreXofY").style.visibility = "hidden";
  	 	document.all("Td_moreXofY").style.display = "none";

  	 	document.all("Td_GettingImg").style.visibility = "hidden";
  	 	document.all("Td_GettingImg").style.display = 'none';

  	 	if (glb_b0 != 0)
  	 		document.getElementById("Label").childNodes[0].nodeValue =  glb_BtnLabel[ glb_b0 ].bl;
  	 	if (glb_b0 == 0)
  	 	{
  	 		//short nav
  	 	}
  	 	else if (glb_b0 == 2)
  	 	{
  	 		//previous search
  	 	}
  	 	else if (glb_b0 == 3)
  	 	{
  	 		//Saved comps
  	 	}
  	 	else if (glb_b0 == 4)
  	 	{
  	 		//purchased
  	 	}
  	 }
  }

  function UpdateInfoWellSizeAndPosition(changeBy)
  {
  	  /*changeBy: 0=>Window Resize, 1=>Keyword update, 2=>x of y update, 3=>pane change */
  	  if ( document.body.clientWidth == 0 )
  	  {
  		 glb_keywordCurPos = -1;
  		 glb_xofyHiddenBecauseOfSize = true;
  		 glb_windowWidth = 0;

  		 glb_UpdateInfoWellScheduled = false;
  	  	 return;
  	  }

  	  if ( changeBy == 0)
  	  {
  	  	//window resize
  	  	var prevWidowWidth = glb_windowWidth;
  	  	glb_windowWidth = document.body.clientWidth;

  	  	//we may need to do some adjustments
  	  	if ( glb_windowWidth > prevWidowWidth )
  	  	{
  	  		//window size is increased...
  	  		if ( prevWidowWidth == 0 )
  	  			AdjustKeywordAndXofY(1, true, false, false);
  	  		else
  	  			AdjustKeywordAndXofY(1, false, false, false);
  	  	}
  	  	else
  	  	{
  	  		//window size is reduced...
  	  		AdjustKeywordAndXofY(-1, false, false, false);
  	  	}
  	  }
  	  else if ( changeBy == 1 )
  	  {
  	  	//Keyword update
  	  	glb_keywordCurPos = -1;
  	  	AdjustKeywordAndXofY(0, true, false, false);
  	  }
  	  else if ( changeBy == 2 )
  	  {
  	    //x of y update
  	    AdjustKeywordAndXofY(0, false, true, false);
  	  }
  	  else
  	  {
  	  	//pane change
  	  	ShowInfoWellContents();

  	  	if ( ( glb_b0 == 1 ) && !glb_GIFDisp )
  	  	{
  	  		glb_xofyHiddenBecauseOfSize = true;
  	  		glb_keywordCurPos = -1;

  	  		AdjustKeywordAndXofY(1, true, true, true);
  	  	}
  	  	else
  	  	{
  	  		glb_xofyHiddenBecauseOfSize = true;
  	  		glb_keywordCurPos = -1;
  	  	}
  	  }

	  glb_UpdateInfoWellScheduled = false;
  }
  
  function selectAllCollections( checked )
  {
    
    glb_bSelectCollection = false;
      
    for (var iterColl = 0; iterColl < glb_iNumCollections; ++iterColl)
    {
      var oCollectionCheck = document.getElementById("Collection" + iterColl);
         
      oCollectionCheck.checked = checked;
    }
      
      changeSelectedOption( checked );
     //indicates "Select all" selected now.
      glb_collectionName = "ChkSearchAll";
       
 }
 
 
 //This function is called when we select the Search Selected Collections
 // radio button.

 function searchCollections()
  {
    var allSelected = true;
         
    for (var iterColl = 0; iterColl < glb_iNumCollections; ++iterColl)
    {
      // gets handle to the Collection checkboxes
      var oCollectionCheck = document.getElementById("Collection" + iterColl);
      
      var oCollectionTextCheck = document.getElementById("Collection" + iterColl+"text");
      
      if( false == glb_bSelectCollection)
      {
       //uncheck the collection.
       oCollectionCheck.checked = false;
      } 
    }
    glb_bSelectCollection = true;
   
    changeSelectedOption(true);
 }  
 
  
  //This function is called when we select the Search Low Priced Collections
 // radio button.
  function SelectValueCollections()
  {
        glb_bSelectCollection = false;
        
         var oCollectionCheck; 
         
        for (var iterColl = 0; iterColl < glb_iNumCollections; ++iterColl)
        {
            
            oCollectionCheck = document.getElementById("Collection" + iterColl);
           
            //check if ValueCollection tag present or not 
            //uncheck the checkboxes in case ValueCollection tag 
            //is not present.
            
            if( (undefined == glb_arCollections[iterColl].ValueCollection )
                || ( "0" ==glb_arCollections[iterColl].ValueCollection.Value ))
            {
                //uncheck all the other collections
                oCollectionCheck.checked = false;
               
            }
            else
            {
               oCollectionCheck.checked = true;    
            } 
       }//end of for (var iterColl = 0; iterColl < glb_iNumCollections; ++iterColl)
        
    glb_collectionName = "ValueCollection";    
    changeSelectedOption(true);
  }
  
  
   
 function changeSelectedOption( checked )
  {
    var oSelectAllCheck = document.getElementById("ChkSearchAll");
      
    // gives the status of Value Collection feature  
     var bValueCollectionsFeatureFlag = call('_cbNav_GetValueCollectionsFeatureFlag');
    
    // gives the status of Photo Object feature  
     var bPhotoObjectFeatureFlag = call('_cbNav_GetPhotoObjectCollectionsFeatureFlag'); 
    
    // handle for "search Selected Collections" radio
    var oSelectCollection;
    // handle for "search Images Less than USD .." radio
    var oValueCollection;
    
   if(true == bValueCollectionsFeatureFlag)
   {
    //these handles should be used only if Value collection feature is enabled.
    oSelectCollection = document.getElementById("SearchCollection");
    oValueCollection = document.getElementById("ValueCollection");
   }
    
    var allSelected = true;
    var sCollectionsList = "";
    var sCollectionsDisplayList = "";
    
   
    //handle for  "Masked Images" check box 
    var oMaskedImageCheck;
    
   if(true == bPhotoObjectFeatureFlag )
   {   
    //this handle should be used only if PhotoObject feature is enabled.
    oMaskedImageCheck = document.getElementById("PhotoObject");
   }
   
    var bNoCollectionSelected = true;
    
    var bvalueSelectOption = true;
            
    for (var iterColl = 0; iterColl < glb_iNumCollections; ++iterColl)
    {
      var oCollectionCheck = document.getElementById("Collection" + iterColl);
      
      allSelected = (allSelected && oCollectionCheck.checked);
     
      if (true == oCollectionCheck.checked)
      {
            bNoCollectionSelected = false;
            if (sCollectionsList != "")
            {
              sCollectionsList = sCollectionsList + ",";
              sCollectionsDisplayList = sCollectionsDisplayList + ",";
            }
            sCollectionsList = sCollectionsList + glb_arCollections[iterColl].CollectionName.Value;
            
            sCollectionsDisplayList = sCollectionsDisplayList + glb_arCollections[iterColl].CollectionDisplayName.Value;
         
           //checks if some non value collection selected or not..
           if( (undefined == glb_arCollections[iterColl].ValueCollection )
                || ( "0" ==glb_arCollections[iterColl].ValueCollection.Value ))
            {
              bvalueSelectOption = false;
            }
      }
      
          
      setFilter('collectionSelected[' + iterColl + ']', oCollectionCheck.checked,false,true);
   }
     
    
   
    if(true == bValueCollectionsFeatureFlag)
     {
      
        if(true == allSelected )
        {
         oSelectAllCheck.checked = true;
         //to tell that select collection is not selected now.
         glb_bSelectCollection = false;
        }
        else
        {
           if( (true == bvalueSelectOption) && (false == bNoCollectionSelected))
           {
              oValueCollection.checked = bvalueSelectOption;
              //to tell that select collection is not selected now.
              glb_bSelectCollection = false;
           } 
           else
           {
           	oSelectCollection.checked = true;
           	//to tell that select collection is selected now.
           	glb_bSelectCollection = true;
           }  
        }
     }
   else
   {
      oSelectAllCheck.checked = allSelected;
      glb_bSelectCollection = false;
    
   } 
      
    if( (true == bValueCollectionsFeatureFlag) && (false == allSelected) && (false == oValueCollection.checked) )
      {
        oSelectCollection.checked = true;
      }
     
     //In case Value Collection feature is enabled , make this flag as true..  
     if(true == bValueCollectionsFeatureFlag)
     {
        setFilter("CollectionValue", oValueCollection.checked, true, true);
        setFilter("CollectionSelect", oSelectCollection.checked, true, true);
     }   
   
    setFilter("collectionsAll", allSelected, true, true);
       
    setFilter("collectionNames", '"' + sCollectionsList + '"', true, true);
    setFilter("collectionDisplayNames", '"' + sCollectionsDisplayList + '"', true, true); // collection display names are always built alphabetically
    
  }

	function setFilter ( filterID, value )
	{
                       
        var oCFD = eval(call('_cbNav_SetFilter', filterID, value, const_DocID));

        if (filterID != 'autoOpen')
        {
            UpdateChangedFromDefault(oCFD);

            if ((trimString(document.FormName.searchfield.value) != '')
                && (document.FormName.searchfield.value != const_JSCt_DefuKeyWord))
            {
                glb_Searchable = true; // A filter changed. Make the term searchable...
            }

            glb_bSettingsKeywordChanged = true;
            UpdateSearchBtnStates();
        }
	}
  function setAllFilters ( source )
  {
    var oFilters = eval(source);
    setAllFiltersFromObj (oFilters);
    var oChangedFromDefault = eval(call("_cbNav_GetChangedFromDefault", const_DocID));
    UpdateChangedFromDefault(oChangedFromDefault);
  }

  function setAllFiltersFromObj ( oFilters )
  {
    // First, set the collection filters
    
    var allSelected = true;
    
     // gives the status of Value Collection feature  
     var bValueCollectionsFeatureFlag = call('_cbNav_GetValueCollectionsFeatureFlag');
    
    // gives the status of Photo Object feature  
     var bPhotoObjectFeatureFlag = call('_cbNav_GetPhotoObjectCollectionsFeatureFlag'); 
    
      var bNoCollectionSelected = true;
     
     var bvalueSelectOption  = true;
           
    for (var iterColl = 0; iterColl < glb_iNumCollections; ++iterColl)
    {
      var oCollectionCheck = document.getElementById("Collection" + iterColl);
            
      // If it is undefined, it means we've selected all.
      if (oFilters.collectionSelected[iterColl] == undefined)
      {
        oFilters.collectionSelected[iterColl] = true;
      }
       //checks if some non value collection selected or not..
      if( ((undefined == glb_arCollections[iterColl].ValueCollection ) || (undefined == glb_arCollections[iterColl].ValueCollection.Value)||( "0" == glb_arCollections[iterColl].ValueCollection.Value ) ) 
            && (oFilters.collectionSelected[iterColl]))
      {
        bvalueSelectOption  = false;
      }
      oCollectionCheck.checked = oFilters.collectionSelected[iterColl];
      if(true == oCollectionCheck.checked)
      {
        bNoCollectionSelected = false;
      }
      
      allSelected = allSelected & oCollectionCheck.checked;
     
    
    }//end of for loop  
   
           
    // The "Select All" radio
    var oSelectAllCheck = document.getElementById("ChkSearchAll");
    oSelectAllCheck.checked = oFilters.collectionsAll;
    
    // handle for "search Selected Collections" radio
    var oSelectCollection;
    // handle for "search Images Less than USD .." radio
    var oValueCollection;
   
   if(true == bValueCollectionsFeatureFlag)
   {   
    oValueCollection = document.getElementById("ValueCollection");
    oValueCollection.checked = oFilters.CollectionValue;
            
    oSelectCollection = document.getElementById("SearchCollection");
    oSelectCollection.checked = oFilters.CollectionSelect;
    
    if(allSelected == true)
    {
     oSelectAllCheck.checked = true;
     glb_bSelectCollection = false;
    }
    else
    {
       if( (true == bvalueSelectOption )&& (false == bNoCollectionSelected))
       {
          oValueCollection.checked =bvalueSelectOption;
          glb_bSelectCollection = false;
       } 
       else
       {
       	  oSelectCollection.checked = true;
       	  //to tell that select collection is selected now.
       	  glb_bSelectCollection = true;
       }  
    }
    
   }
   else
   {
     oSelectAllCheck.checked = allSelected;
     glb_bSelectCollection = false;
   }   
          
    // Other Filters
    // colorFormat
    var oCheck = document.getElementById("color");
    oCheck.checked = oFilters.colorFormat.color;
    oCheck = document.getElementById("bw");
    oCheck.checked = oFilters.colorFormat.bw;
    // orientation
    oCheck = document.getElementById("portrait");
    oCheck.checked = oFilters.orientation.portrait;
    oCheck = document.getElementById("square");
    oCheck.checked = oFilters.orientation.square;
    oCheck = document.getElementById("landscape");
    oCheck.checked = oFilters.orientation.landscape;
    oCheck = document.getElementById("panoramic");
    oCheck.checked = oFilters.orientation.panoramic;
    // media Type
    oCheck = document.getElementById("photos");
    oCheck.checked = oFilters.mediaType.photography;
    oCheck = document.getElementById("illustration");
    oCheck.checked = oFilters.mediaType.illustration;
   
    if(true == bPhotoObjectFeatureFlag)
   {   
    oCheck = document.getElementById("PhotoObject");
    oCheck.checked = oFilters.mediaType.photoobject;
   }
  
    // Update autoOpen...
    if (oFilters.autoOpen != undefined)
    {
        glb_advSearchAutoOpen = oFilters.autoOpen;
        var oAutoOpenObj = document.getElementById("AdvAutoOpenCheck");
        if (oAutoOpenObj != undefined)
        {
            oAutoOpenObj.checked = glb_advSearchAutoOpen;
        }
    }
  }
  function areAllFiltersValid()
  {

  	//AK:mediaType
  	var isContentValid =
		document.getElementById("photos").checked ||
		document.getElementById("illustration").checked||
		document.getElementById("PhotoObject").checked;

    // colorFormat
    var isColorValid =
		document.getElementById("color").checked ||
		document.getElementById("bw").checked;
    // orientation
    var isOrientationValid =
  		document.getElementById("portrait").checked		 ||
  		document.getElementById("square").checked		   ||
  		document.getElementById("landscape").checked	 ||
  		document.getElementById("panoramic").checked;
   	// collections
   
        
    var isCollectionValid = document.getElementById("ChkSearchAll").checked;
    if (!isCollectionValid)
    {
        for (var iterColl = 0; iterColl < glb_iNumCollections; ++iterColl)
        {
          var oCollectionCheck = document.getElementById("Collection" + iterColl);
          if (oCollectionCheck.checked)
          {
            isCollectionValid = true;
            break;
          }
        }
    }
    
    //end of added to check
    if (isOrientationValid == false && isCollectionValid == false && isColorValid == false && isContentValid == false)
    {
    	call("_cbNav_displayFiltersAlertBox", 5029);
    }
    else if (isOrientationValid == false && isCollectionValid == false && isColorValid == false)
    {
    	call("_cbNav_displayFiltersAlertBox", 5031," %_ADV_TINT%_, %_ADV_ORIENT%_, %_ADV_COLLECT%_." );
    }
    else if (isOrientationValid == false && isCollectionValid == false && isContentValid == false)
    {
    	call("_cbNav_displayFiltersAlertBox", 5031," %_ADV_CONTENT%_, %_ADV_ORIENT%_, %_ADV_COLLECT%_." );
    }
    else if (isOrientationValid == false && isColorValid == false && isContentValid == false)
    {
    	call("_cbNav_displayFiltersAlertBox", 5031," %_ADV_CONTENT%_, %_ADV_TINT%_, %_ADV_ORIENT%_." );
    }
    else if (isCollectionValid == false && isColorValid == false && isContentValid == false)
    {
    	call("_cbNav_displayFiltersAlertBox", 5031," %_ADV_CONTENT%_, %_ADV_TINT%_, %_ADV_COLLECT%_." );
    }
    else if (isContentValid == false && isOrientationValid == false)
    {
    	call("_cbNav_displayFiltersAlertBox", 5031, " %_ADV_CONTENT%_, %_ADV_ORIENT%_.");
    }
    else if (isContentValid == false && isColorValid == false)
    {
    	call("_cbNav_displayFiltersAlertBox", 5031, " %_ADV_CONTENT%_, %_ADV_TINT%_.");
    }
    else if (isContentValid == false && isCollectionValid == false)
    {
    	call("_cbNav_displayFiltersAlertBox", 5031, " %_ADV_CONTENT%_, %_ADV_COLLECT%_.");
    }
    else if (isOrientationValid == false && isCollectionValid == false)
    {
    	call("_cbNav_displayFiltersAlertBox", 5031, " %_ADV_ORIENT%_, %_ADV_COLLECT%_.");
    }
    else if (isOrientationValid == false && isColorValid == false)
    {
    	call("_cbNav_displayFiltersAlertBox", 5031, " %_ADV_TINT%_, %_ADV_ORIENT%_.");
    }
    else if (isCollectionValid == false && isColorValid == false)
    {
    	call("_cbNav_displayFiltersAlertBox", 5031, " %_ADV_TINT%_, %_ADV_COLLECT%_.");
    }
    else if (isColorValid == false)
    {
      call("_cbNav_displayFiltersAlertBox", 5028);
    }
    else if (isOrientationValid == false)
    {
      call("_cbNav_displayFiltersAlertBox", 5027);
    }
    else if (isCollectionValid == false)
    {
      call("_cbNav_displayFiltersAlertBox", 5030);
    }
    else if (isContentValid == false)
    {
    	 call("_cbNav_displayFiltersAlertBox", 5032);
    }
    else
    {
      return true;
    }

    // Open the drawer
    if(IsAdVisible() == false)
	{
		ToggleAdvancedOptionsDrawer();
	}

    return false;
}
	/* ===== bottom NavBar controls */
	function Cnv2Num( str )
	{
		var v=0, i, Bt;
		for( i=0; i<str.length; i++ )
		{
			Bt = str.charCodeAt(i);
			if( ( Bt >= 48 )&&( Bt < 58 ) )
			{
				v = ( 10 * v ) + ( Bt - 48 );
			}
		}
		return( v );
	};
	function GetParamFromES()
	{
		var str, TOut;
		if( glb_ReTryCnt > glb_MaxCntStdBottom )
		{
			TOut = "1";
		}
		else
		{
			TOut = "0";
		}
		str = call( "_cbNav_GetKeyword", const_DocID+"%_i_W_OR_F%_"+TOut );
		if( ( str.length > 0 )&&( str.charAt(0)!='0' ) )
		{
			return( str );
		}
		return( "" );
	}
	function WriteKey( NewuKeyWd )
	{
		var bRet = false;
		if ( NewuKeyWd == const_JSCt_NA )
		{
		}
		else if ( NewuKeyWd != glb_OlduKeyWd )
		{
			glb_OlduKeyWd = NewuKeyWd;
			UpdateInfoWellSizeAndPosition(1);

			bRet = true;
		}

		return bRet;
	}
  function UpdateXofYFromES( sNewX, sNewY )
  {

    glb_GIFDisp = true;
	GifHide();
    WritexOfy( sNewX + const_JSCt_xOFy + sNewY );
    glb_ParamFromES.y = Cnv2Num ( sNewY );
    glb_ParamFromES.x = Cnv2Num ( sNewX );
    if((glb_ParamFromES.y != 0) && (glb_ParamFromES.x < glb_ParamFromES.y))
	{
		glb_MThumbState = 1;
		MoreThumbEnable();
	}
	else
	{
     	glb_MThumbState = 3;
     	MoreThumbDisable();
    }
    return true;
  }
  function ShowGettingImagesFromES()
  {
    glb_GIFDisp = false;
    glb_GIFLabel = ''; // Reset the label
		GifVisible();
		return true;
  }
  function WritexOfy( NewxOfy )
	{
		var bRet = false;
		if (  ( NewxOfy == const_JSCt_NA ) )
		{
			glb_OldxOfy = "";
		}
		else if ( NewxOfy != glb_OldxOfy )
		{
			document.getElementById("L1xOfy").childNodes[0].nodeValue = NewxOfy;
			glb_OldxOfy = NewxOfy;
			UpdateInfoWellSizeAndPosition(2);

			bRet = true;
		}

		return (bRet)
	}
	function OneImagePreparationDone( iiStr )
	{
		call( "_cbimgDetail_ClosePrep", const_DocID+iiStr );
	}
	function procEachImage( iIndex )
	{
		var iiStr, str2, k, Ret, OnOff=false, bStatus;
		iiStr = iIndex.toString();
		str2  = call( "_cbimgDetail_Preparation", const_DocID+iiStr );
		k     = str2.indexOf(",,");
		if( k < 0 )
		{
			Ret = str2;
		}
		else
		{
			if( str2.charAt(k+2) == '1' )
			{
				OnOff = true;
			}
			Ret = str2.substr( 0, k );
		}
		if( Ret == "" )
		{
			SetL1Getting( OnOff );
			if( glb_ReTryCnt < glb_GP_TimeOutSec )
			{ // not Timeout so do again
				glb_ReTryCnt++;
				setTimeout( "procEachImage("+iIndex+");", 1000 );
				return;
			}
			bStatus = 2; // Timeout
			call( "_cbimgDetail_TimeOut",   const_DocID+iiStr ); /* n * 1/2 sec */
		}
		else
		{
			if( Ret == 'z' )
			{
				bStatus = 1; // error
				call( "_cbimgDetail_TimeOut", const_DocID+iiStr ); /* n * 1/2 sec */
			}
			else
			{
				bStatus = 0; // normal
				call( "_cbimgDetail_PrepOK",  const_DocID+iiStr );
			}
		}
		OneImagePreparationDone( iiStr );
		glb_ReTryCnt = 0;
		if( iIndex < glb_GP_ImageEndNo )
		{ // do the next image
			setTimeout( "procEachImage("+(iIndex+1)+");", 0 );
			return;
		}
	}
	function ExecCachedRequest()
	{
	  var k, request, reqChar1;
		for( k=0; k<512; k++ )
		{ // at most 512 (=buffer size) times
			if( glb_ProcCache[ glb_ProcIndx ] == "" )
			{ // No more cached request
		    glb_Running = false;
				return;
			}
			request  = glb_ProcCache[ glb_ProcIndx ];
			reqChar1 = request.charAt(1);
			glb_ProcCache[ glb_ProcIndx ] = "";
			ProcBottomNavEach( request );
			glb_ProcIndx = ( glb_ProcIndx + 1 ) % 512; // pointing next one
		}
		glb_Running = false;
	}
	function ProcClear()
	{
		// This is called when contentPaneMode becomes BM's filesystem. Used for cleaning up.
	}
	function ProcSetKeyword( escaped_Keyword )
	{
		var uKeyword;
		uKeyword = unescape( escaped_Keyword );
		document.FormName.searchfield.value = uKeyword;
		document.FormName.searchfield.click();
		if( const_Web_OR_FV == 'f' )
		{
			WriteKey( uKeyword );
		}
	}
	function hideCurrentSearchControlBarTooltip()
	{
		if ( glb_indexToCurrentControlBarTooltip != -1 )
		{
			chp = glb_tTb[glb_indexToCurrentControlBarTooltip].chp;
			document.all[ chp ].style.visibility = "hidden";
			glb_indexToCurrentControlBarTooltip = -1;
		}
	}
	function hideCurrentSearchTooltip()
	{
		if ( glb_indexToCurrentSearchBarTooltip != -1 )
		{
			chp = glb_tTb[glb_indexToCurrentSearchBarTooltip].chp;
			document.all[ chp ].style.visibility = "hidden";
			glb_indexToCurrentSearchBarTooltip = -1;
		}
	}
	function hideCurrentTooltips()
	{
		hideCurrentSearchControlBarTooltip();
		hideCurrentSearchTooltip();
	}
	function ProcBottomNav( escaped_string )
	{
    	hideCurrentTooltips();
		if( glb_ProcCache[ glb_SaveIndx ] != "" )
		{ // Buffer full. ignored
			return;
		}
		glb_ProcCache[ glb_SaveIndx ] = escaped_string; // so that we can place into queue
		glb_SaveIndx = ( glb_SaveIndx + 1 ) % 512; // pointing next one
		// dispatch processing queue
		if( ! glb_Running )
		{
			glb_Running = true;
			setTimeout( "ExecCachedRequest();", 0 );
		}
	}
	function SetTheOtherOne( fORt )
	{
		if( fORt )
		{
			return( false );
		}
		return( true );
	}
	function ShowHideNavButton( which, sh )
	{
		if( sh )
		{
			document.all(which).style.width = 22;
			document.all(which).style.visibility = "visible";
		}
		else
		{
			document.all(which).style.width = 0;
			document.all(which).style.visibility = "hidden";
		}
	}
	function ProcBottomNavEach( escaped_string )
	{
    var  str, nstr, wS, nW, nK, charCodedAt1, charAt1, script, nDisp, nValueAmt;
    
    var bValueCollectionsFeatureFlag = call('_cbNav_GetValueCollectionsFeatureFlag');
    
    var bForceShowGettingImages = false;
		var old_glb_b0;
		if( glb_inProcBottomNav )
		{
			script='ProcBottomNavEach( \"'+escaped_string+'\" );';
			setTimeout( '"'+script+'"', 100 );
			return( true ); /* retry! glb_inProcBottomNav is NOT cleared */
		}
		glb_inProcBottomNav   = true;
		glb_ReTryCnt          = 0;
		glb_ParamFromES.IHave = false;
		str     = unescape( escaped_string );
		nstr    = str.length;
		charAt1 = "?";
		if( ( nstr != glb_ParamFromES.nstr )||( str != glb_ParamFromES.str ) )
		{
			if( str.charAt(0) == "1" )
			{
				glb_ParamFromES.IHave = true;
			}
			if( nstr > 1 )
			{
				//glb_ParamFromES.fORw = str.charAt(1);
				/* b0|  0   1   2   3   4   5  */
				/* f | 'a' 'b' 'c' 'd' 'e' 'f' */
				/* w | 'r' 's' 't' 'u' 'v' 'w' */
				charCodedAt1 = str.charCodeAt(1);
				charAt1      = str.charAt(1);
        if( charCodedAt1 <= 102 )
				{
					glb_ParamFromES.fORw = 'f';
					glb_b0 = charCodedAt1 - 97;
				}
				else
				{
					glb_ParamFromES.fORw = 'w';
					glb_b0 = charCodedAt1 - 114;
				}
				if( nstr > 2 )
				{
					if( str.charAt(2) == "1" )
					{
						glb_ParamFromES.Selection = 1;
					}
					else
					{
						glb_ParamFromES.Selection = 0;
					}
					if( nstr > 10 )
					{
						wS = str.substring( 3,11 );
						glb_ParamFromES.x = Cnv2Num( wS );
						if( nstr > 18 )
						{
							glb_ParamFromES.y = Cnv2Num( str.substring( 11,19 ) );
							if( nstr > 22 )
							{
								nW = Cnv2Num( str.substring( 19,23 ) );
								if( nW != 0 )
								{
                                  glb_ParamFromES.Wheel = str.substr( 42,nW ); 
								}
								glb_ParamFromES.nWheel = nW;
								if( nstr > 26 )
								{
									nK = Cnv2Num( str.substring( 23,27 ) );
									if( nK != 0 )
									{
										glb_ParamFromES.uKeyWord = str.substr( 42+nW, nK );
									}
									glb_ParamFromES.nuKeyWord = nK;
									if( nstr > 28 )
									{
										glb_ParamFromES.nmxdispKw = Cnv2Num( str.substring( 27,29 ) );
										if( nstr > 29 )
										{
											glb_ParamFromES.add[0] = str.charAt(29);
											if( nstr > 30 )
											{
												glb_ParamFromES.add[1] = str.charAt(30);
												if( nstr > 31 )
												{
													glb_ParamFromES.add[2] = str.charAt(31);
													if( nstr > 32 )
													{
														glb_ParamFromES.add[3] = str.charAt(32);
														if( nstr > 34 )
														{
															glb_ParamFromES.uniqueID = Cnv2Num( str.substring( 33,34 ) );
															nDisp                    = Cnv2Num( str.substring( 34,38 ) );
															if (( nDisp > 0 ) && ( nstr >= 42+nW+nK))
															{
																glb_ParamFromES.dispLang = str.substr( 42+nW+nK, nDisp );
															}
															else
															{
																glb_ParamFromES.dispLang = "";
															}
															
															
															if(true == bValueCollectionsFeatureFlag)
															{
                                                                nValueAmt = Cnv2Num( str.substring( 38,42 ) );
    															if (( nValueAmt > 0 ) && ( nstr >= 42+nDisp+nW+nK))
    															{
    																glb_ParamFromES.valueAmt = str.substr( 42+nDisp+nW+nK, nValueAmt );
    															}
    															else
    															{
    																glb_ParamFromES.valueAmt = "";
    															}
    															
    															
                                                                if (nstr >= 42+nValueAmt+nDisp+nW+nK)
                                                                {
                                                                    glb_ParamFromES.sShowDrawer = str.substr(42+nValueAmt+nDisp+nW+nK, 1);
                                                                }
                                                            }//end of if(...)
                                                           
                                                            else
                                                            {
                              
                                                                if (nstr >= 38+nW+nK+nDisp)
                                                                {
                                                                    glb_ParamFromES.sShowDrawer = str.substr(38+nW+nK+nDisp, 1);
                                                                }
                                                            } //end of else
                                                           
														}
													}
													else
													{
														glb_ParamFromES.add[3] = "?";
													}
												}
												else
												{
													glb_ParamFromES.add[2] = "?";
												}
											}
											else
											{
												glb_ParamFromES.add[1] = "?";
											}
										}
										else
										{
											glb_ParamFromES.add[0] = "?";
										}
									}
									else
									{
										glb_ParamFromES.nmxdispKw = 22;
									}
								}
							}
							else
							{
								glb_ParamFromES.nWheel = 9999;
							}
						}
						else
						{
							glb_ParamFromES.y = -1;
						}
					}
					else
					{
						glb_ParamFromES.x = -1;
					}
				}
				else
				{
					glb_ParamFromES.Selection = 0;
				}
			}
			glb_ParamFromES.str  = str;
			glb_ParamFromES.nstr = nstr;
		}
		if( ! glb_ParamFromES.IHave )
		{
			glb_inProcBottomNav = false;
			return( false ); /* glb_inProcBottomNav is cleared */
		}
		// To handle searches from the html (including no-search page)...
		if ((glb_Prev_b0 == 0) && (glb_b0 == 1) && (glb_ParamFromES.uKeyWord == ''))
		{
      		glb_GIFDisp = false;
      		GifVisible();
    	}
    if( ( glb_charAt1 != charAt1 )||
			( glb_ParamFromES.uKeyWord != glb_prev_KWd ) )
		{
            call( "_cbNav_HTMScriptBegin", const_DocID+"%_i_W_OR_F%_"+cNavHeight );
            glb_Searchable = glb_bKeywordHasFocus;
            if (glb_b0 == 1)
            {
                if (glb_bKeywordHasFocus == true)
                {
                    glb_bTextSelection = true;
                    glb_DontScheduleToggleOnNextFocus = true; // focus() call below shouldn't trigger a toggle
				    document.FormName.searchfield.focus();
				}
            }
            else if (glb_b0 != 1)
            {
                document.FormName.searchfield.blur();; // dummy focus
                glb_bTextSelection = true;
                glb_bKeywordHasFocus = false;
                glb_DontScheduleToggleOnNextFocus = false;
            }
            if ((glb_ParamFromES.uKeyWord == undefined) ||
                (glb_ParamFromES.uKeyWord == const_JSCt_DefuKeyWord) ||
                (trimString(glb_ParamFromES.uKeyWord) == ''))
            {
                glb_Searchable = false;
            }
			glb_prev_KWd   = "";
			glb_OlduKeyWd  = "";
			glb_charAt1    = charAt1;
			glb_UniqueID   = glb_ParamFromES.uniqueID;
		if( glb_b0 != 0)
		{
      		if( glb_b0 == 1 )
			{
				// If it's 'xoy', make it visible. Otherwise, leave untouched.
				if (glb_ParamFromES.Wheel == 'xoy')
				{
                    glb_MThumbState = 1; /* 1: visible, 2: MoreThum enable|disable 4: focused */
                    glb_GIFDisp = true;  /* force to hide */
                    GifHide();
				}
			}
			if ( glb_b0 != old_glb_b0 )
			{
				UpdateInfoWellSizeAndPosition(3);
			}

			if (glb_b0 == 1 )
			{
				document.images[ "img_Btn1A" ].src = "%_HTMLImageDir2%_/NavBar/DownloadComp_N.png";
			}
			else if (glb_b0 == 3 )
			{
				document.images[ "img_Btn1A" ].src = "%_HTMLImageDir2%_/NavBar/AddToCart_N.png";
			}
			else
			{
				document.images[ "img_Btn1A" ].src = "%_HTMLImageDir2%_/NavBar/OpenDownloadStatus_N.png";
			}
			if (glb_b0 == 1 || glb_b0 == 3 || glb_b0 == 4) // 1=> search folder, 3 => Downloaded Comps folder, 4 => Purchased images
			{
				// Get Price Button
				glb_EnableButn[ 0 ] = true;
				document.getElementById("u_Btn0A").childNodes[0].nodeValue = glb_BtnLabel[ glb_b0 ].btn[0].l;
				document.all("Td_Btn0A").style.visibility = "visible";
				//sep button
				document.all("Btn0Sep").style.visibility = "visible";
				//Find Similar button
				glb_EnableButn[ 1 ] = true;
				document.getElementById("u_Btn01A").childNodes[0].nodeValue = glb_BtnLabel[ glb_b0 ].btn[1].l;
				document.all("Td_Btn01A").style.visibility = "visible";
				//sep button
				document.all("Btn01Sep").style.visibility = "visible";
				//Download Comp incase of glb_b0 =1, Add To Cart button incase of glb_b0 = 3, Open Download Status incase of glb_b0 = 4
				if(glb_b0 == 4)
				{
					glb_EnableButn[ 2 ] = true;
				}
				else
				{
					glb_EnableButn[ 2 ] = false;
				}
				document.getElementById("u_Btn1A").childNodes[0].nodeValue = glb_BtnLabel[ glb_b0 ].btn[2].l;
				document.all("Td_Btn1A").style.visibility = "visible";
				if(glb_b0 ==1) // only incase of search folder enable the fourth button and the 3rd separator
				{
					// Add to Cart button
					glb_EnableButn[ 3 ] = true;
					document.all("Td_Btn2A").style.visibility = "visible";
					document.all("Btn1Sep").style.visibility = "visible";
					document.getElementById("u_Btn2A").childNodes[0].nodeValue = glb_BtnLabel[ glb_b0 ].btn[3].l;
					HandleButton(2,3,0,-1,-1);
				}
				else
				{
					glb_EnableButn[ 3 ] = false;
					document.all("Td_Btn2A").style.visibility = "hidden";
					document.getElementById("u_Btn2A").childNodes[0].nodeValue = " ";
					document.all("Btn1Sep").style.visibility = "hidden";
				}
				//disable the buttons initially
				HandleButton( 2, 0, 0, -1, -1 );
				HandleButton( 2, 1, 0, -1, -1 );
				HandleButton( 2, 2, 0, -1, -1 );
			}
			else
			{
				glb_GIFDisp = false;
				SetL1Getting( false );
				glb_EnableButn[ 0 ] = false;
				document.getElementById("u_Btn0A").childNodes[0].nodeValue = " ";
				document.all("Td_Btn0A").style.visibility = "hidden";
				document.all("Btn0Sep").style.visibility = "hidden";
				glb_EnableButn[ 1 ] = false;
				document.getElementById("u_Btn01A").childNodes[0].nodeValue = " ";
				document.all("Td_Btn01A").style.visibility = "hidden";
				document.all("Btn01Sep").style.visibility = "hidden";
				glb_EnableButn[ 2 ] = false;
				document.getElementById("u_Btn1A").childNodes[0].nodeValue = " ";
				document.all("Td_Btn1A").style.visibility = "hidden";
				document.all("Btn1Sep").style.visibility = "hidden";
				glb_EnableButn[ 3 ] = false;
				document.getElementById("u_Btn2A").childNodes[0].nodeValue = " ";
				document.all("Td_Btn2A").style.visibility = "hidden";
			}
		}
			glb_Prev_b0        = -1;
			glb_Prev_Selection = -1;
		} // if( ( glb_charAt1 != charAt1 )
		if ( glb_PrevDispLang != glb_ParamFromES.dispLang )
		{
			glb_PrevDispLang = glb_ParamFromES.dispLang;
			if( /* ( glb_b0 == 1 )&& */ ( glb_PrevDispLang != "" ) )
			{
				document.getElementById("UsedLangA").childNodes[0].nodeValue = glb_PrevDispLang;
				document.getElementById("UsedLangA").style.visibility = "visible";
				//AddFunc( 2 );
			}
			else
			{
				document.getElementById("UsedLangA").childNodes[0].nodeValue = "";
				document.getElementById("UsedLangA").style.visibility = "hidden";
			}

            // Uncheck the search-within checkbox on language change
            document.getElementById("SrchWithin").checked = false;
			var sExecStr = call('_cbNav_RefreshSearchLangLocaleOps');
			if (sExecStr != undefined)
			{
                eval(sExecStr);
                if (trimString(document.FormName.searchfield.value)=='')
                {
                    glb_Searchable = isFEPLanguage();
                    UpdateSearchBtnStates();
                }
            }
		}
		
		// AK:added by aman
																	
            if(true == bValueCollectionsFeatureFlag)
			{
        
                if ( glb_PrevValueAmt != glb_ParamFromES.valueAmt )
    		    {
                    document.getElementById("ValueCollDesc").childNodes[0].nodeValue = glb_ParamFromES.valueAmt;
                    glb_PrevValueAmt = glb_ParamFromES.valueAmt;
                }
    
            } //end of if.
        // AK:end of added by aman  
       		
        if( glb_ParamFromES.fORw != const_Web_OR_FV )
		{
			setTimeout( "BottomNav%_WEB_OR_FILE%_();", glb_TimerModeMismatch ); // 15 sec. interval
		}
		if( glb_ParamFromES.Selection > 0 )
		{
			switch( glb_b0 ) { // there is Selected ones
				case 1:  // search            [ImgDet] [SaveLow] [Add2Cart] [More] 		 [FindSimilar]
					 glb_bt0 = true;   glb_bt1 = true;   glb_bt2 = true;  glb_bt3 = true; glb_bt01 = true;  break;
				case 3:  // SavedRowRes       [ImgDet] [Add2Cart] [.] [.]			 [FindSimilar]
				case 4:  // Purchased         [ImgDet] [DwnLoad]  [.] [.]			 [FindSimilar]
					 glb_bt0 = true;  glb_bt1 = true;   glb_bt2 = false;  glb_bt3 = false; glb_bt01 = true;  break;
				default: // ImgPrep,fileview  [.]                [.]        [.]			  [.]
					 glb_bt0 = false;  glb_bt1 = false;  glb_bt2 = false; glb_bt3 = false; glb_bt01 = false; break;
			}
		}
		else
		{
			switch( glb_b0 ) { // there is NOT Selected ones
				case 1:  // search            [ImgDet] [SaveLow] [Add2Cart] [More]	[FindSimilar]
					 glb_bt0 = false;  glb_bt1 = false;  glb_bt2 = false; glb_bt3 = true; glb_bt01 = false; break;
				case 4:  // Purchased         [ImgDet]      [DwnLoad]  [.]  [.]	[FindSimilar]
					 glb_bt0 = false;  glb_bt1 = true;  glb_bt2 = false;  glb_bt3 = false; glb_bt01 = false;break;
			 	//se 3:  // SavedRowRes             [ImgDet]  [Add2Cart] [.][.]	[FindSimilar]
				//se 4:  // Purchased               [ImgDet]  [DwnLoad]  [.][.] [FindSimilar]
				default: // ImgPrep,fileview  [.]                [.]        [.] [.]
					 glb_bt0 = false;  glb_bt1 = false;  glb_bt2 = false; glb_bt3 = false; glb_bt01 = false; break;
			}
		}
		if( glb_bt0 )
		{
			document.getElementById("Td_Btn0A").style.cursor = "hand";
		}
		else
		{
			document.getElementById("Td_Btn0A").style.cursor = "default";
		}
		if(glb_bt01)
		{
			document.getElementById("Td_Btn01A").style.cursor = "hand";
		}
		else
		{
			document.getElementById("Td_Btn01A").style.cursor = "default";
		}
		if( glb_bt1 )
		{
			document.getElementById("Td_Btn1A").style.cursor = "hand";
		}
		else
		{
			document.getElementById("Td_Btn1A").style.cursor = "default";
		}
		if( glb_bt2 )
		{
			document.getElementById("Td_Btn2A").style.cursor = "hand";
		}
		else
		{
			document.getElementById("Td_Btn2A").style.cursor = "default";
		}
        var bSelectionSame = (glb_Prev_Selection < 0);

        if( ( glb_Prev_b0 != glb_b0 )||
			( glb_prev_KWd != glb_ParamFromES.uKeyWord ) )
		{
			document.getElementById("SrchWithin").checked = false;
		}
		if( ( glb_Prev_b0 != glb_b0 )||
			( glb_Prev_Selection !=  glb_ParamFromES.Selection )||
			( glb_prev_KWd != glb_ParamFromES.uKeyWord ) )
		{
			glb_prev_bt0 = SetTheOtherOne( glb_bt0 );
			glb_prev_bt1 = SetTheOtherOne( glb_bt1 );
			glb_prev_bt2 = SetTheOtherOne( glb_bt2 );
			glb_prev_bt3 = SetTheOtherOne( glb_bt3 );
			glb_prev_bt01 = SetTheOtherOne( glb_bt01 );
			glb_prev_KWd = "x y ~"+glb_b0;
			glb_Prev_b0  = -1;
			glb_Prev_Selection = glb_ParamFromES.Selection;
		}
    	if( glb_bt0 != glb_prev_bt0 )
		{ // [GetPrice] only
			glb_prev_bt0 = glb_bt0;
			if( glb_BtnLabel[ glb_b0 ].btn[0].l != "" )
			{
				glb_EnableButn[ 0 ] = glb_bt0;
				HandleButton( 2, 0, 0, -1, -1 );
			}
		} // glb_bt0
		if( glb_bt01 != glb_prev_bt01 )
		{ // [FindSimilar] only
			glb_prev_bt01 = glb_bt01;
			if( glb_BtnLabel[ glb_b0 ].btn[1].l != "" )
			{
				glb_EnableButn[ 1 ] = glb_bt01;
				HandleButton( 2, 1, 0, -1, -1 );
			}
		} // glb_bt01
		if( glb_bt1 != glb_prev_bt1 )
		{ // [Add2Cart] or [Download manager]
			glb_prev_bt1 = glb_bt1;
			if( glb_BtnLabel[ glb_b0 ].btn[2].l != "" )
			{
				glb_EnableButn[ 2 ] = glb_bt1;
				HandleButton( 2, 2, 0, -1, -1 ); // HandleButton(2,2,0)
			}
		} // glb_bt1
		if( glb_bt2 != glb_prev_bt2 )
		{ // [Add2Cart]
			glb_prev_bt2 = glb_bt2;
			if( glb_BtnLabel[ glb_b0 ].btn[3].l != "" )
			{
				glb_EnableButn[ 3 ] = glb_bt2;
				HandleButton( 2, 3, 0, -1, -1 );
			}
		} // glb_bt2
		// Keyword editbox and "Result for ..."
		if( glb_b0 == 1 )
		{
            if ( glb_ParamFromES.nuKeyWord > 0 )
            {
                glb_curr_KWd = glb_ParamFromES.uKeyWord;
			}
		}
		else
		{
			glb_curr_KWd = const_JSCt_DefuKeyWord;
		}
		if( ( glb_Prev_b0 != glb_b0 )||
			( ( glb_prev_KWd != glb_curr_KWd )&&( glb_curr_KWd != "" ) ) )
		{
			document.FormName.searchfield.value = glb_curr_KWd;
			glb_bTextSelection = glb_bTextSelection || bSelectionSame;
			WriteKey( glb_curr_KWd ); // put "result for..." for glb_b0 == 1
			glb_Prev_b0  = glb_b0;
			glb_prev_KWd = glb_curr_KWd;
		}
		if ( glb_b0 == 1 )
		{
      if (glb_ParamFromES.Wheel == 'xoy')
			{
        WritexOfy( glb_ParamFromES.x+const_JSCt_xOFy+glb_ParamFromES.y );
      }
		}
    else
		{
			glb_OldxOfy = "";
			var oSearchWithinCheck = document.getElementById("SrchWithin");
			if (oSearchWithinCheck != undefined)
			{
			 oSearchWithinCheck.checked = false;
			}
		}
		// special GIF
		if( ( glb_ParamFromES.add[3] == "+" )&&
			( glb_ParamFromES.Wheel != "" )&&
			( glb_ParamFromES.Wheel != glb_prev_WheelLabel ) )
		{
			if( glb_GIFLabel == "" )
			{
				glb_prev_WheelLabel = glb_ParamFromES.Wheel;
				glb_GIFLabel = document.getElementById("L1Getting").childNodes[0].nodeValue;
				document.getElementById("L1Getting").childNodes[0].nodeValue = GetWheelText(); // glb_ParamFromES.Wheel;
				GifVisible();
			}
		}
		else if( glb_ParamFromES.add[3] == "-" )
		{
			GifHide();
		}

		if( glb_b0 == 1)
		{
			if((glb_ParamFromES.y != 0) && (glb_ParamFromES.x < glb_ParamFromES.y))
			{
				glb_MThumbState = 1;
				MoreThumbEnable();
			}
			else
			{
        glb_MThumbState = 3;
				MoreThumbDisable();
      }
		}
		if( glb_ParamFromES.add[3] == "-" )
		{
			if( glb_GIFLabel != "" )
			{
				document.getElementById("L1Getting").childNodes[0].nodeValue = glb_GIFLabel;
				glb_GIFLabel = "";
				document.all("L1Getting").style.visibility = "hidden";
			}
			glb_prev_WheelLabel = "";
		}
		UpdateSearchBtnStates();

		glb_inProcBottomNav = false;
		return( true ); /* glb_inProcBottomNav is cleared */
	}
	function BottomNav%_WEB_OR_FILE%_()
	{ // in Search
		var bAns;
		bAns = GetParamFromES();
		// glb_ParamFromES.add[0]=='1' means all thumbnails were recieved
		if( bAns != "" )
		{
			ProcBottomNav( bAns );
		}
		else
		{
			++glb_ReTryCnt;
		} // bAns
		if( const_PushFromES != 1 ) {
			setTimeout( "BottomNav%_WEB_OR_FILE%_();", glb_TimerStdBottom );
		}
	}
	/* === Common control === */
	function getImgDt31( NorD, Nm )
	{
		if( NorD == "D" )
		{
			return( getImgData( 32, 2, Nm ) );
		}
		else
		{
			return( getImgData( 32, 3, Nm ) );
		}
	}
	function getImgData( k, j, Nm )
	{
		var m, oNm, e, fNm;
		if(k >= 7 && k <= 10)
		{
			return;
		}
		if( ! glb_iMg[k].e[j].s )
		{
			if( k > 30 )
			{
				if( k == 31 )
				{
					m = 4;
				}
				else
				{
					m = 11;
				}
				if( j == 3 )
				{
					fNm = "%_HTMLImageDir2%_/NavBar/"+glb_tTb[m].f+"_N.png"
				}
				else
				{
					fNm = "%_HTMLImageDir2%_/NavBar/"+glb_tTb[m].f+"_D.png"
				}
			}
			else
			{
				oNm = glb_tTb[k].f;
				e   = glb_tTb[k].e[j];
				if( e == "" )
				{
					fNm = "%_HTMLImageDir2%_/NavBar/"+oNm+".png";
				}
				else
				{
					fNm = "%_HTMLImageDir2%_/NavBar/"+oNm+"_"+e+".png";
				}
			}
			glb_iMg[k].e[j].p     = new Image();
			if( ( glb_iMg[k].e[j].p != null )&&( glb_iMg[k].e[j].p != undefined ) )
			{
				glb_iMg[k].e[j].s     = true;
				glb_iMg[k].e[j].p.src = fNm;
			}
		}
		if( glb_iMg[k].e[j].s )
		{
			//bug 1156400, 1163026 relates to opera bug
			if( document.images[ Nm ].src != glb_iMg[k].e[j].p.src )
				document.images[ Nm ].src  = glb_iMg[k].e[j].p.src;
		}
	   	return( glb_iMg[k].e[j].p );
	}
	function ChangeButton%_WEB_OR_FILE%_(k,j,x,y)
	{
		var chp, aNm, iNm;
		if( ( ! glb_Searchable )&&( k == 4 ) )
		{
			return( true );
		}
		// if (k==11) and (More-> thumbnail is disabled)
		if( ( ( k == 11 )&&( ( glb_MThumbState & 2 ) == 0 ) )||
		    ( glb_tTb[k].l == "D" ) )
		{
			return( true );
		}
		chp = glb_tTb[k].chp;
		aNm = glb_tTb[k].id;
		if (k != 0)
		{
			getImgData( k, j, glb_tTb[k].Nm );
		}
		if( x < ( -9998 ) )
		{
			if( chp != "" )
			{
				document.all[ chp ].style.visibility = "hidden";
			}
			if( aNm != "" )
			{
				document.all[ aNm ].style.cursor = "default";
			}
		} else {
			if( chp != "" )
			{
				var yy, cObj = document.all[ chp ].style;
				if( y > cNavHeight )
				{
					yy = cNavHeight + glb_tTb[k].yd;
				}
				else
				{
					yy = y+glb_tTb[k].yd - 10;
				}
				if( yy < 0 )
				{
					yy = 2;
				}
				cObj.left = x  + glb_tTb[k].xd + document.body.scrollLeft;
				cObj.top  = yy             + document.body.scrollTop;
				cObj.visibility = "visible";
			}
			if( aNm != "" )
			{
				document.all[ aNm ].style.cursor = "hand";
			}
		}
		return( true );
	}
	function BoxClickByName%_WEB_OR_FILE%_(p)
	{
		if( ( ! glb_duringInitialize )&&
		    ( p != "" ) )
		{
			call( "_cbNav_ExecES", const_DocID+p );
		}
		return( true );
	}
	function BoxClick%_WEB_OR_FILE%_(k)
	{
		var p = glb_tTb[k].p;
		if( ( k == 11 )&&( ( glb_MThumbState & 2 ) == 0 ) )
		{
			return;
		}
		return( BoxClickByName%_WEB_OR_FILE%_( p ) );
	}
	function LastInitialize%_WEB_OR_FILE%_()
	{
	  var str;
		glb_ReTryCnt  = 0;
		// Standard Nav bar
		if( document.all("L1Gif").style.visibility == "visible" )
		{
      glb_GIFDisp = false;
      GifVisible();
		}
		else
		{
      if (glb_b0 == 1)
      {
          UpdateXofYFromES('' + glb_ParamFromES.x, '' + glb_ParamFromES.y );
      }
      else
      {
          glb_GIFDisp = true;
          GifHide();
      }
		}
		if( glb_b0 == 1 )
		{
			if((glb_ParamFromES.y != 0) && (glb_ParamFromES.x < glb_ParamFromES.y))
      {
          glb_MThumbState = 1;
          MoreThumbEnable();
      }
      else
      {
          glb_MThumbState = 3;
          MoreThumbDisable();
      }
		}
		else
		{
			//glb_MThumbState = 0;
		}
		glb_ReTryCnt = 0;
    PutMoreResultString( 1, 3 );
		BottomNav%_WEB_OR_FILE%_();
		
		
		// Let's hide the Search Control bar if it's the Web NavBar
		// (to prevent unnecessary scrolling of Opera in the NavBar)
		if ('w' == const_Web_OR_FV)
		{
            var oControlBar = document.getElementById('Tb_SearchControlBar');
            if ((undefined != oControlBar) && (undefined != oControlBar.style))
            {
                oControlBar.style.visibility = 'hidden';
                oControlBar.style.display = 'none';
            }
        }
	}
	function initForceEnd() { glb_inInitASub1 = false; }
	function initASub2()
	{
		var bStart=false, szStr;
		glb_initTryCnt++;
		if( glb_initTryCnt > 5 ) {
			window.location.reload( true );
		}
		if( glb_duringInitialize )
		{
			setTimeout( "initForceEnd();", 750 );
			if( call( "_cbNav_HTMScriptBegin", const_DocID+"%_i_W_OR_F%_"+cNavHeight ) == "XXX" )
			{
				szStr  = call( "_cbNav_InitStrings", const_DocID+"%_i_W_OR_F%_" );
				nszStr = szStr.length;
				if( nszStr >= 20 )
				{
					glb_ParamFromES.x = convertToInteger( szStr,  2,  9 );
					glb_ParamFromES.y = convertToInteger( szStr, 12, 19 );
					if( nszStr > 20 )
					{
						glb_ParamFromES.uKeyWord = szStr.substring( 20, nszStr );
					}
					if( glb_ParamFromES.uKeyWord != "" )
					{
						document.FormName.searchfield.value = glb_ParamFromES.uKeyWord;
					}
					else
					{
						document.FormName.searchfield.value = const_JSCt_DefuKeyWord;
					}
					document.FormName.searchfield.style.visibility = "visible";
				}
			}
		}
		if( document.FormName.searchfield.style.visibility == "visible" )
		{
			glb_duringInitialize = false;
			if( glb_LastInitialize_NotDone )
			{
				glb_LastInitialize_NotDone = false;
				LastInitialize%_WEB_OR_FILE%_();
			}
		}
		glb_inInitASub1 = false;
		return( true );
	}

	function initASub1()
	{
		if( ! glb_inInitASub1 )
		{
			glb_inInitASub1 = true;
			setTimeout( "initASub2();",10 );
		}
		if( glb_duringInitialize )
		{
			setTimeout( "initASub1();", 500 );
		}
		else
		{
			document.FormName.searchfield.style.visibility = "visible";
		}
	}
	function initAll( f )
	{
		preloadImages();
		if( ! const_PushFromES )
		{
			glb_TimerModeMismatch=2000; /* 2000 */
			glb_TimerStdBottom   =1000; /* 1000 */
			glb_MaxCntStdBottom  =15;   /* 15 sec. */
		}
		if( glb_initAll_NotDone )
		{
			glb_JSCt_uKeyWord   = unescape( "%_DEFEDITSTRING%_" );
			glb_initAll_NotDone = false;
			initASub1();
		}
		return( true );
	}

	function fin()
	{
		call( "_cbNav_HTMScriptEnd", const_DocID+"%_i_W_OR_F%_" );
		return( true );
	}

  function OnWindowResize()
	{
	    if (glb_UpdateInfoWellScheduled != true)
	    {
	      //if( const_win_OR_mac == 'w' )
		  //{
			//ChangeFocus();
		  //}
		  setTimeout('UpdateInfoWellSizeAndPosition(0);', 250);
          glb_UpdateInfoWellScheduled = true;
		}

		//UpdateInfoWellSizeAndPosition(0);
	}

  function chk2Again()
	{
        ++glb_chk2Enter; // 250 milisec.
        if( glb_chk2Enter > 10 )
		{
			glb_chk2EntOn = false;
		}
		else
		{
			setTimeout( "chk2Again();", 250 );
		}
	}

  function chk2Enter( k )
	{
		if( glb_chk2EntOn )
		{
            return( false );
		}
		document.all[ "chpALogo" ].style.visibility = "hidden";
		document.all[ "chpHome" ].style.visibility  = "hidden";
		document.all[ "chpBuy" ].style.visibility   = "hidden";
		document.all[ "chpGo" ].style.visibility    = "hidden";
		document.all[ "chpHelp" ].style.visibility  = "hidden";
		document.all[ "chpTip" ].style.visibility   = "hidden";
		document.all[ "chpASer" ].style.visibility  = "hidden";
		document.all[ "chpAcn" ].style.visibility   = "hidden";
		document.all[ "chpMor" ].style.visibility   = "hidden";
		document.all[ "chpAdv" ].style.visibility   = "hidden";
		document.all[ "chpGo" ].style.visibility   = "hidden";
		document.all[ "chpSp" ].style.visibility   = "hidden";
		document.all[ "chpPI" ].style.visibility   = "hidden";
		document.all[ "chpGP" ].style.visibility   = "hidden";
		document.all[ "chpDC" ].style.visibility   = "hidden";
		document.all[ "chpAC" ].style.visibility   = "hidden";
		document.all[ "chpODS" ].style.visibility   = "hidden";
		document.all[ "chpFS" ].style.visibility   = "hidden";
		document.all[ "chpLNG" ].style.visibility   = "hidden";
		glb_chk2Enter = 0;
		glb_chk2EntOn = true;
		setTimeout( "chk2Again();", 250 );
		switch( k )
		{
			case  0:
			case  1:
			case  5:
			case  6:
			case  7:
			case  8:
			case  9:
			case 10: ChangeButton%_WEB_OR_FILE%_(k,3,-9999,-9999);  BoxClick%_WEB_OR_FILE%_( k ); break;
			case  2: //AddFunc(2); return( AddFunc( 0 ) ); // no longer used
			case  3: if ((glb_MThumbState & 2) != 0)
                     {
                        AddFunc(5,-1,-1); return( AddFunc( 3, -1, -1 ) );
                     }
                     break;
			case  4: ChangeButton%_WEB_OR_FILE%_(11,3,-9999,-9999);
                     if ((glb_MThumbState & 2) != 0)
                     {
                        return( MoreResult%_WEB_OR_FILE%_() );
                     }
                     break;
			case 11: HandleButton(2,0,1,-1,-1); HandleButton(0,0,1,-1,-1); break;
			case 12: HandleButton(2,2,1,-1,-1); HandleButton(0,2,1,-1,-1); break;
			case 13: HandleButton(2,3,1,-1,-1); HandleButton(0,3,1,-1,-1); break;
            case 14: if (Go%_WEB_OR_FILE%_() == false)
                     {
						// If there was a problem, let's not delay response to any more immediate clicks...
						glb_chk2EntOn = false;
                     }
                     break;
            case 15: HandleButton(2,1,1,-1,-1); HandleButton(0,1,1,-1); break;
            case 20: LaunchHelpFile(); break;
			case 33:
		             if( PTSGLilo_Prototype=="yes" )
					 {
						 PTSGLilo_Thesaurus();
					 }
                     break;
		}
		return( false );
	}

	function getTheFirstWord( keyWord )
	{
		var firstWord = "";
		if ( keyWord.charAt(0) == '%_MISC_LPAREN%_')
			firstWord = '%_MISC_LPAREN%_';
		else
		{
			var i = 0;
			while( keyWord.charAt(i) == ' ' )
				i++;
			while ( ( keyWord.charAt(i) != '"' ) && ( keyWord.charAt(i) != ' ' ) && ( keyWord.charAt(i) != '%_MISC_LPAREN%_' ) && ( i < keyWord.length ) )
			{
				firstWord += keyWord.charAt(i);
				i++;
			}
		}
		return firstWord;
	}
	function getWordCount( keyWord )
	{
		//returns many(2) or one(1)
		//if it finds OR, AND , NOT return 2, else return 1
		var count = 2;
		var capsWord = keyWord.toUpperCase();
		if ( ( capsWord.lastIndexOf(" " + const_Op_And + " ") == -1 )	&&
			( capsWord.lastIndexOf(" " + const_Op_Or + " ") == -1 ) &&
			( capsWord.lastIndexOf(" " + const_Op_Not + " ") == -1 ) )
			count = 1;
		return count;
	}
	function onClickSearchWithin()
	{
		//hideSearchWithin();
		if ( !ifProceedToSearch() )
			return false;
		var searchFieldKeyword = document.FormName.searchfield.value;
		var searchKeyword = document.FormName.searchfield.value;
        var uKeyword = removeIllegalSearchChars( searchKeyword );
		var refineKeyword = removeLeadingAndTralingSpaces( document.FormName.searchfield.value );
        if ( glb_Searchable && ifValidKeyword( glb_OlduKeyWd ) && ifValidKeyword( refineKeyword ) )
		{
			if ( glb_OlduKeyWd != uKeyword )
			{
				searchKeyword = "";
				var oldSimplifiedKeyword = call( "_cbNav_GetSimplifiedKeyword", const_DocID );
				if ( ( oldSimplifiedKeyword != undefined ) && ( oldSimplifiedKeyword != "" ) )
				{
        	searchKeyword = '%_MISC_LPAREN%_' + oldSimplifiedKeyword + '%_MISC_RPAREN%_';
        }
        else
        {
        	searchKeyword = '%_MISC_LPAREN%_' + glb_OlduKeyWd + '%_MISC_RPAREN%_';
        }
				var oldFirstKeyword = getTheFirstWord( glb_OlduKeyWd );
				var oldWordCount = getWordCount( glb_OlduKeyWd );
				var newFirstKeyword = getTheFirstWord( refineKeyword ).toUpperCase();
				var newWordCount = getWordCount( refineKeyword );
				searchFieldKeyword = "";
        if (glb_OlduKeyWd.toUpperCase().indexOf(' ' + const_Op_Or + ' ') != -1)
				{
					searchFieldKeyword = '%_MISC_LPAREN%_' + glb_OlduKeyWd + '%_MISC_RPAREN%_';
					if ( searchKeyword == "" )
						searchKeyword = '%_MISC_LPAREN%_' + glb_OlduKeyWd + '%_MISC_RPAREN%_';
				}
				else
				{
					searchFieldKeyword = glb_OlduKeyWd;
					if ( searchKeyword == "" )
						searchKeyword = glb_OlduKeyWd;
				}
				if ( ( newFirstKeyword == const_Op_And ) ||
					( newFirstKeyword == const_Op_Or ) ||
					( newFirstKeyword == const_Op_Not ) )
				{
					searchFieldKeyword += " " + refineKeyword;
					searchKeyword += " " + refineKeyword;
				}
				else if ( (newFirstKeyword == '%_MISC_LPAREN%_' )
                  || ( refineKeyword.toUpperCase().indexOf(' ' + const_Op_Or + ' ') == -1 ))
				{
					searchFieldKeyword += " " + const_Op_And + " " + refineKeyword;
					searchKeyword += " " + const_Op_And + " " + refineKeyword;
				}
				else
				{
					searchFieldKeyword += " " + const_Op_And + ' ' + '%_MISC_LPAREN%_' + refineKeyword + '%_MISC_RPAREN%_';
					searchKeyword += " " + const_Op_And + ' ' + '%_MISC_LPAREN%_' + refineKeyword + '%_MISC_RPAREN%_';
				}
			}
			return doSearch( searchFieldKeyword, searchKeyword, 1 );
		}
	}
	// Function to refresh values from ES
	function RefreshValuesFromES()
  {
	  if( PTSGLilo_Prototype=="yes" )
	  {
		  document.getElementById("Thesaurus").style.visibility = "visible";
		  document.images[ "CLilo" ].src = "%_HTMLImageDir2%_/NavBar/Lilo.png";
	  }
      var glb_oESVals = eval( call('_cbNav_RefreshValuesFromES', const_DocID) );
      if (glb_oESVals == undefined)
      {
          return;
      }
      // Update filter settings
      if (glb_oESVals.settings != undefined)
      {
          setAllFiltersFromObj(glb_oESVals.settings);
          // Update autoOpen...
          if (glb_oESVals.settings.autoOpen != undefined)
          {
            glb_advSearchAutoOpen = glb_oESVals.settings.autoOpen;
            var oAutoOpenObj = document.getElementById("AdvAutoOpenCheck");
            if (oAutoOpenObj != undefined)
            {
                oAutoOpenObj.checked = glb_advSearchAutoOpen;
            }
          }
      }
      // Update Change from default
      var oCFD = eval(call("_cbNav_GetChangedFromDefault", const_DocID));
      UpdateChangedFromDefault(oCFD);
      // Finally, set the drawer visibility
      if (glb_oESVals.showAdvancedDrawer != undefined)
      {
          SetAdvDrawerVisibility(glb_oESVals.showAdvancedDrawer);
      }
      UpdateSearchBtnStates();
  }

	function ChangeSearchBtnState(sBtnID, iState)
	{
		var sFileSuffix = '';
		var sFontColor = '';
    if (iState == const_StateDisabled)
		{
            if (sBtnID == 'Search1')
            {
                sFontColor = '#999999';
            }
            else if (sBtnID == 'Split')
            {
                sFileSuffix = '_D';
			}
		}
		else if ((iState == const_StateEnabled) || (iState == const_StateMouseUp))
    {
        if (sBtnID == 'Search1')
        {
            sFontColor = '#000000';
        }
        sFileSuffix = '_N';
    }
    else if (iState == const_StateMouseDown)
		{
            sFileSuffix = '_S';
		}
		if (sFileSuffix != '')
		{
            sFilename = "%_HTMLImageDir2%_/NavBar/Search" + sFileSuffix + ".png";
            document.getElementById(sBtnID).style.backgroundImage = "url('" + sFilename  + "')";
        }
        if (sFontColor != '')
        {
            document.getElementById("Search").style.color = sFontColor;
        }
	}
	function LaunchHelpFile()
	{
		call ("_cbNav_RunHelpFile", "");
	}


   // -->
  </script>
  </head>
  <body onLoad="initAll('f');RefreshValuesFromES();" onUnload="fin();"  onresize="OnWindowResize();" bgcolor="#ffffff" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0">
  <!-- divs for absolute tool tip locations BEG -->
   <div id="chpALogo" class="chip"> %_MAINPAGE%_ </div>
   <div id="chpHome"  class="chip"> %_MAINPAGE%_ </div>
   <div id="chpBuy"   class="chip"> %_SHOPCART%_ </div>
   <div id="chpGo"    class="chip"> %_STARTSER%_ </div>
   <div id="chpHelp"  class="chip"> %_HELP%_ </div>
   <div id="chpTip"   class="chip"> %_SERTIPS%_ </div>
   <div id="chpASer"  class="chip"> %_ADVSEARCH%_ </div>
   <div id="chpAcn"   class="chip"> %_YOURACCNT%_ </div>
   <div id="chpMor"   class="chip"> %_MORERESULT%_ </div>
   <div id="chpAdv"   class="chip"> %_ADVSEARCH%_ </div>
   <div id="chpMoreInfo"   class="chip"> %_MORE_INFO_TIP%_ </div>
   <div id="chpSp"    class="chip"> %_SPLIT%_ </div>
   <div id="chpPI"    class="chip"> %_PHOTO_ILLUS%_ </div>
   <div id="chpGP"    class="chip"> %_GET_PRICE%_ </div>
   <div id="chpDC"    class="chip"> %_DOWNLOAD_COMP%_ </div>
   <div id="chpAC"    class="chip"> %_ADD_TO_CART%_ </div>
   <div id="chpODS"   class="chip"> %_OPEN_DL_STATUS%_ </div>
   <div id="chpFS"    class="chip"> %_FIND_SIMILAR%_ </div>
   <div id="chpLNG"   class="chip"> %_CHANGE_SEARCH_LANG_TIP%_ </div>
  <!-- divs for absolute tool tip locations END -->
  <!-- The entire NavBar is defined as single table with three trs -->
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
   <!-- Row 1 -->
    <tr width="100%" class="brandBar" style="height:%_NAVBAR_ROW1%_;">
     <td style="height:%_NAVBAR_ROW1%_;">
     <table border="0" cellspacing="0" cellpadding="0" style="height:%_NAVBAR_ROW1%_;width:100%;">
      <tr class="brandBar1">
       <td style="width:6px;" class="brandBar1" nowrap>
       </td>
       <td style="width:165px;min-width:165px;max-width:165px;" class="brandBar1" nowrap>
         <img id="CLg" name="ALogo" src="%_HTMLImageDir2%_/NavBar/Logo.png" onMouseOver="ChangeButton%_WEB_OR_FILE%_(0,2,event.x,event.y)" onMouseOut="ChangeButton%_WEB_OR_FILE%_(0,3,-9999,-9999)" onClick="chk2Enter(0)"/>
       </td>
       <td style="width:20px;background:transparent;position:fixed" class="brandBar1" nowrap> <!-- -->
       </td>
       <td align="right" style="width:300px;background-color:#F7F7F7;background:transparent;" nowrap>
	    <a id="CHm" style="cursor:default">
         <img id="Home_N" src="%_HTMLImageDir2%_/NavBar/Home_N.png" name="AHome" usemap="#mAHome" width="22" height="22" border="0">
         <map name="mAHome">
          <area shape="rect" coords="0,0,22,22" nohref
                  onMouseOver=ChangeButton%_WEB_OR_FILE%_(7,2,event.x,event.y) onMouseOut=ChangeButton%_WEB_OR_FILE%_(7,3,-9999,-9999) onClick=chk2Enter(7)>
         </map>
        </a>
        <a id="CBy" style="cursor:default">
         <img id="ShoppingCart_N" src="%_HTMLImageDir2%_/NavBar/ShoppingCart_N.png" name="ABuy" usemap="#mABuy" width="22" height="22" border="0">
          <map name="mABuy">
           <area shape="rect" coords="0,0,22,22" nohref
              onMouseOver=ChangeButton%_WEB_OR_FILE%_(9,2,event.x,event.y) onMouseOut=ChangeButton%_WEB_OR_FILE%_(9,3,-9999,-9999) onClick=chk2Enter(9)>
         </map>
        </a>
        <a id="CMy" style="cursor:default">
         <img id="YourAccount_N" src="%_HTMLImageDir2%_/NavBar/YourAccount_N.png" name="AMy" usemap="#mAMy" width="22" height="22" border="0">
          <map name="mAMy">
           <area shape="rect" coords="0,0,22,22" nohref
               onMouseOver=ChangeButton%_WEB_OR_FILE%_(10,2,event.x,event.y) onMouseOut=ChangeButton%_WEB_OR_FILE%_(10,3,-9999,-9999) onClick=chk2Enter(10)>
          </map>
        </a>
        <a id="CHp" style="cursor:default">
         <img id="Help_N" src="%_HTMLImageDir2%_/NavBar/Help_N.png" name="AHp" usemap="#mAHp" width="22" height="22" border="0">
          <map name="mAHp">
           <area shape="rect" coords="0,0,22,22" nohref
		   		onMouseOver=ChangeButton%_WEB_OR_FILE%_(8,2,event.x,event.y) onMouseOut=ChangeButton%_WEB_OR_FILE%_(8,3,-9999,-9999) onClick=chk2Enter(20)>
          </map>
        </a>
       </td>
       <td class="brandBar1" style="width:10px;background-color:#F7F7F7;background:transparent;" nowrap>
       </td>
      </tr>
     </table>
     </td>
    </tr>
   </table>
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
   <!-- Row 2 -->
   <tr width="100%" style="height:%_NAVBAR_ROW2%_;background-color:#F7F7F7;">
    <td width="100%" style="height:%_NAVBAR_ROW2%_;">
    </td>
   </tr>
   <!-- Row 3 -->
    <tr width="100%" align="center" style="height:%_NAVBAR_ROW3%_;vertical-align:center;background-color:#F7F7F7">
     <td width="100%" align="center" style="height:%_NAVBAR_ROW3%_;">
      <table width="100%" align="center" border="0" cellpadding="0" cellspacing="0" style="height:%_NAVBAR_ROW3%_;vertical-align:center;background-color:#F7F7F7">
      <tr align="center">
       <td align="center" class="sbox" border=1 style="height:100%;width:320px;background:transparent;border-width:thin;border-color:#B0B0B0">
        <form id="FormName" name="FormName" onSubmit="return( chk2Enter(14) )">
         <!-- table for Search button BEG -->
         <table height="100%" border="0" cellspacing="0" cellpadding="0">
          <tr style="height:20px">
           <td style="background:transparent;">
             <input id="searchText" type="text" name="searchfield" value=" " style="height:20px;color:#000000;width:190px;font-size:%_SEARCHFIELD_FONTSIZE%_; font-family: %_PRIMARYFONT%_; visibility:hidden" onKeyDown=OnKeydown%_WEB_OR_FILE%_() onFocus=OnFocus%_WEB_OR_FILE%_() onBlur=OnBlur%_WEB_OR_FILE%_() onKeyUp=OnKeyUp%_WEB_OR_FILE%_(event) onChange=OnChange%_WEB_OR_FILE%_(event) >
           </td>
           <td id="searchTd" style="height:20px;vertical-align:middle; padding:0px">
               <div id="Search1" style="border:1px #B0B0B0 solid;text-align:center;vertical-align:middle;padding:0px;background-image:url('%_HTMLImageDir2%_/NavBar/Search_N.png');background-repeat:repeat;">
                <table border="0" cellspacing="0" cellpadding="0" style="height:18px;">
                 <tr>
                 <td>
	              <a nohref id="Search" name="ASearch" style="height:100%;font-family: %_PRIMARYFONT%_;color:#000000;text-align:center;font-size:%_BUTTON_FONTSIZE%_;font-weight:%_SEARCH_BUTTON_STYLE%_;padding-left:10px;padding-right:9px;" onMouseOut="HandleSearchButton(3,4,event.x,event.y)" onMouseOver="HandleSearchButton(2,4,event.x,event.y)" onMouseDown="HandleSearchButton(1,4,event.x,event.y)" onMouseUp="HandleSearchButton(0,4,event.x,event.y)" onClick="chk2Enter(14);">%_SEARCH%_</a>
	            </td>
	           </tr>
	           </table>
	           </div>
	       </td>
		   <td style="height:%_NAVBAR_ROW3%_;width:10px;background:transparent;">&nbsp;
       	   </td>
       	   <td style="FONT-FAMILY:%_PRIMARYFONT%_;" id="SrchWithinText" class="checkboxes" nowrap>
       	    <input TYPE="checkbox" class="checkbox" value = "No" ID="SrchWithin" onClick="setFilter('','');" disabled />&nbsp;&nbsp;%_SPLITRE%_
       	   </td>
       	   <!-- Lilo prototype -BEGIN- (  if( PTSGLilo_Prototype=="yes" ) ) -->
		   <td style="height:%_NAVBAR_ROW3%_;width:10px;background:transparent;">&nbsp;</td>
		   <td id="Thesaurus" style="height:%_NAVBAR_ROW3%_;width:22px;background:transparent;visibility:hidden">
             <img id="CLilo" name="ALilo" src="%_HTMLImageDir2%_/NavBar/Spacer.gif" onClick="chk2Enter(33)"/>
           </td>
           <!-- Lilo prototype -END- -->
	      </tr>
	      
	     </table>
	    </form>
	   </td>
	  </tr>
	  
	  </table>
	 </td>
    </tr>
    <!-- Row 4 -->
    <tr width="100%" style="height:%_NAVBAR_ROW4%_;background-color:#F7F7F7;">
    <td width="100%" style="height:%_NAVBAR_ROW4%_">
    </td>
   </tr>
   </table>
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <!-- Row 5 -->
    <tr style="height:%_NAVBAR_ROW5%_;min-height:%_NAVBAR_ROW5%_;max-height:%_NAVBAR_ROW5%_;background-color:#F7F7F7">
     <td style="width:100%;background:transparent;height:%_NAVBAR_ROW5%_;">
	  <!-- Table for Advanced Search setting tab BEG -->
	   <table width="100%" ID="Table5" border="0" cellspacing="0" cellpadding="0">
	    <tr>
	    <td align="left">
	    	<table border="0" cellspacing="0" cellpadding="0">
	    		<tr>
		 			<td style="padding:0px;padding-left:14px;padding-right:4px;vertical-align:middle;width:10px;background:transparent;" nowrap>
		  				<a style="vertical-align:middle;" nohref>
		   					<img style="vertical-align:middle;" src="%_HTMLImageDir2%_/NavBar/AdvancedSearch_Closed.png" name="mAdvSearch" onMouseOver="this.style.cursor='hand';" onMouseOut="this.style.cursor='default';" onClick="ToggleAdvancedOptionsDrawer()">
		  				</a>
		 			</td>
		 			<td style="padding:0px;border:0px;border-bottom-color:#027ABB;border-bottom-style:dotted;border-bottom-width:thin;background:transparent;" nowrap> <!--  -->
           				<a nohref id="AdvSrch" style="font-weight:bold;color:#027ABB;text-align:center;cursor:default;background:transparent;font-family:%_PRIMARYFONT%_;font-size:%_BUTTON_FONTSIZE%_ ;" onMouseOut="HandleSearchButton(3,3,event.x,event.y)" onMouseOver="HandleSearchButton(2,3,event.x,event.y)" onMouseDown="HandleSearchButton(1,3,event.x,event.y)" onMouseUp="HandleSearchButton(0,3,event.x,event.y)" onClick="ToggleAdvancedOptionsDrawer()" > %_ADV_SEARCH%_ <!-- %_BUTTON_FONTSIZE%_ -->
           				</a>
		 			</td>
		 			<td style="padding:0px;padding-left:9px;background:transparent;text-align:left;" nowrap>
		  				<div id="SrchLabel" class="gray" style="font-family: %_PRIMARYFONT%_">&nbsp;</div>
		 			</td>
		         </tr>
		 	</table>
		 </td>
		 <td align="right">
		 	<table border="0" cellspacing="0" cellpadding="0">
		 		<tr>
		 			<td style="padding-right:10px">
		  				<div class="gray" nowrap>
		    				<a nohref id="UsedLangA" style="visibility:visible; font-family: %_PRIMARYFONT%_;cursor:default;" name="ALng" onMouseOver="AddFunc(1, event.x, event.y)" onMouseOut="AddFunc(2, event.x, event.y)">.</a>
          				</div>
 		 			</td>
	    		</tr>
	    	</table>
	    </td>
	    </tr>
	   </table>
	  <!-- Table for Advanced Search setting tab END -->
     </td>
    </tr>
	<!-- Row 6 -->
    <tr width="100%" style="height:%_NAVBAR_ROW6%_;background-color:#F7F7F7;">
     <td width="100%" style="height:%_NAVBAR_ROW6%_">
     </td>
    </tr>
       
    <tr style="background-color:#F7F7F7;" >
	 <td >
	  <form METHOD="" ACTION="" ID="Form1">
	   <div id="SearchOptions" style="display:none;">
	    <!-- Table for Advanced Search options drawer BEG -->
	    <table cellspacing="0" width="100%" style="background-color:#F7F7F7;" ID="Table1">
	     <tr style="background-color:#F7F7F7;" valign="top">
	     <div style="border-top-color:#CCCCCC;border-top-width:thin;border-top-style:solid;padding-top:5px">
	       <td align="left" style="padding-left:15px;height:%_ADVOPTIONSBOX_HEIGHT%_;" style="FONT-FAMILY:%_PRIMARYFONT%_"  class="checkboxes" nowrap> <!--  -->
	        <fieldset style="height:%_ADVOPTIONSBOX_HEIGHT%_; color:#000000; border-color:#CCCCCC;border-width:thin;border-style:solid;">
	        <legend align="left">&nbsp;%_ADV_CONTENT%_&nbsp;</legend>
	         <!-- Table for Tint BEG -->
	         <table border="0" cellpadding="0" style="padding-left:8px;padding-top:5px;padding-right:7px" ID="AdvSearchOptions0" >
	          <tr><td style="FONT-FAMILY:%_PRIMARYFONT%_ height:13px"  class="checkboxes" nowrap><input TYPE="checkbox"  class="checkbox" name="mediaType.photography" value = "Yes" checked ID="photos" onClick="setFilter(this.name, this.checked, true,false);">&nbsp;&nbsp;%_ADV_PHOTO%_</td></tr>
	          <tr><td style="height:1px"></td></tr>
	          <tr><td style="FONT-FAMILY:%_PRIMARYFONT%_ height:13px"  class="checkboxes" nowrap><input TYPE="checkbox"  class="checkbox" name="mediaType.illustration" value = "Yes" checked ID="illustration" onClick="setFilter(this.name, this.checked, true, false);">&nbsp;&nbsp;%_ADV_ILLUS%_</td></tr>
	          <tr><td style="height:1px"></td></tr>
	          <tr><td style="FONT-FAMILY:%_PRIMARYFONT%_ height:13px" class="checkboxes" id = "PhotoObjectCol" nowrap><input TYPE="checkbox" class="checkbox" name="mediaType.photoobject" value = "Yes" checked ID="PhotoObject" onClick="setFilter(this.name, this.checked, true, false);"></td></tr>          
			 </table>
			 <!-- Table for Tint END -->
			</fieldset>
		   </td>
	       <td align="left" style="padding-left:9px;height:%_ADVOPTIONSBOX_HEIGHT%_;" style="FONT-FAMILY:%_PRIMARYFONT%_"  class="checkboxes" nowrap> <!--  -->
	        <fieldset style="height:%_ADVOPTIONSBOX_HEIGHT%_; color:#000000; border-color:#CCCCCC;border-width:thin;border-style:solid;">
	        <legend align="left">&nbsp;%_ADV_TINT%_&nbsp;</legend>
	         <!-- Table for Tint BEG -->
	         <table border="0" cellpadding="0" style="padding-left:8px;padding-top:5px;padding-right:7px" ID="AdvSearchOptions1" >
	          <tr><td style="FONT-FAMILY:%_PRIMARYFONT%_ height:13px"  class="checkboxes" nowrap><input TYPE="checkbox"  class="checkbox" name="colorFormat.color" value = "Yes" checked ID="color" onClick="setFilter(this.name, this.checked, true,false);">&nbsp;&nbsp;%_ADV_COLOR%_</td></tr>
	          <tr><td style="height:1px"></td></tr>
	          <tr><td style="FONT-FAMILY:%_PRIMARYFONT%_ height:13px"  class="checkboxes" nowrap><input TYPE="checkbox"  class="checkbox" name="colorFormat.bw" value = "Yes" checked ID="bw" onClick="setFilter(this.name, this.checked, true, false);">&nbsp;&nbsp;%_ADV_BLACKWHITE%_</td></tr>
			 </table>
			 <!-- Table for Tint END -->
			</fieldset>
		   </td>
		   <td align="left" style="padding-left:9px;height:%_ADVOPTIONSBOX_HEIGHT%_;" style="FONT-FAMILY:%_PRIMARYFONT%_"  class="checkboxes" nowrap> <!--  -->
		    <fieldset style="height:%_ADVOPTIONSBOX_HEIGHT%_; color:#000000; border-color:#CCCCCC;border-width:thin;border-style:solid;">
		    <legend align="left">&nbsp;%_ADV_ORIENT%_&nbsp;</legend>
		     <!-- Table for Orientation BEG -->
		     <table border="0" cellpadding="0" style="padding-left:8px;padding-top:5px;padding-right:7px" ID="AdvSearchOptions2">
		      <tr><td style="FONT-FAMILY:%_PRIMARYFONT%_ height:13px"  class="checkboxes" nowrap><input TYPE="checkbox"  class="checkbox" name="orientation.portrait" value = "Yes" checked ID="portrait" onClick="setFilter(this.name, this.checked, true, false);">&nbsp;&nbsp;%_ADV_PORTRAIT%_</td></tr>
		      <tr><td style="height:1px"></td></tr>
		      <tr><td style="FONT-FAMILY:%_PRIMARYFONT%_ height:13px"  class="checkboxes" nowrap><input TYPE="checkbox"  class="checkbox" name="orientation.square" value = "Yes" checked ID="square" onClick="setFilter(this.name, this.checked, true, false);">&nbsp;&nbsp;%_ADV_SQUARE%_</td></tr>
		      <tr><td style="height:1px"></td></tr>
		      <tr><td style="FONT-FAMILY:%_PRIMARYFONT%_ height:13px"  class="checkboxes" nowrap><input TYPE="checkbox"  class="checkbox" name="orientation.landscape" value = "Yes" checked ID="landscape" onClick="setFilter(this.name, this.checked, true, false);">&nbsp;&nbsp;%_ADV_LANDSCAPE%_</td></tr>
		      <tr><td style="height:1px"></td></tr>
		      <tr><td style="FONT-FAMILY:%_PRIMARYFONT%_ height:13px"  class="checkboxes" nowrap><input TYPE="checkbox"  class="checkbox" name="orientation.panoramic" value = "Yes" checked ID="panoramic" onClick="setFilter(this.name, this.checked, true, false);">&nbsp;&nbsp;%_ADV_PANORAMIC%_</td></tr>
		     </table> <!-- AdvSearchOptions2 -->
		     <!-- Table for Orientation END -->
		    </fieldset>
		   </td>
		   <td align="left" style="padding-left:9px;height:%_ADVOPTIONSBOX_HEIGHT%_;FONT-FAMILY:%_PRIMARYFONT%_;"  class="checkboxes" nowrap cellpadding="0" cellspacing="0">
		    <fieldset id="CollectionsField" style="color:#000000;height:%_ADVOPTIONSBOX_HEIGHT%_; border-color:#CCCCCC;border-width:thin;border-style:solid;">
		    <legend align="left">&nbsp;%_ADV_COLLECT%_&nbsp;</legend>
		     <table border="0" cellpadding="0" ID="AdvSearchOptions3" style="padding-left:8px;padding-top:5px;padding-right:7px">
		      
		      <script type="text/javascript">
		               <!--
		                SelectUI();
		               // -->
		       </script>
		       
		      <tr width="100%" height="100%">
		       <td align="left" style="FONT-FAMILY:%_PRIMARYFONT%_"  class="checkboxes" nowrap height="100%">

		        <!-- Outer Table for Collections BEG -->
		        <table align="left" border="1" style="border:thin;border-color:#000000;" cellspacing="0" cellpadding="1">
		         <tr>
		          <td  align="left" width="100%" style="FONT-FAMILY:%_PRIMARYFONT%_"  class="checkboxes" nowrap>
		           <div id="CollectionsList" height="%_COLLECTIONHEIGHT%_px" style="padding-left:0px;padding-right:10px;height:%_COLLECTIONHEIGHT%_px; max-height:%_COLLECTIONHEIGHT%_px; background-color:#ffffff; "> <!-- 302px -->

		            <!-- Inner Table for Collections BEG -->
		            <table border="0" cellspacing="0" cellpadding="0" ID="Collections">
		             <tr>
		              <td>
		               <!-- content wil be added here by PopulateCollections() -->
		               <script type="text/javascript">
		               <!--
		                PopulateCollections();
		               // -->
		               </script>
		              </td>
		             </tr>
		            </table>
		            <!-- Inner Table for Collections END -->

		           </div>
		          </td>
		         </tr>
		        </table>
		        <!-- Outer Table for Collections END -->

		       </td>
		      </tr>
		     </table> <!-- AdvSearchOptions3 -->
		    </fieldset>
		   </td>
		   <td style="width:10px">
		   </td>
		   <td align="right">
		   </td>
		   </div>
		  </tr>
          <tr style="height:7px;background-color:#F7F7F7;"  valign="top">
	       <td width="100%" style="background-color:#F7F7F7;" colspan=7>
	       </td>
	      </tr>
		 </table>
		<!-- Table for Advanced Search options drawer END -->
		 <table cellspacing="0" width="100%" style="background-color:#F7F7F7;padding-bottom:9px;" ID="Table_AdvOpenOption">
    		 <tr style="height:13px;background-color:#F7F7F7;"  valign="top">
                <td align="left" style="padding-left:15px;FONT-FAMILY:%_PRIMARYFONT%_ height:13px"  class="checkboxes" nowrap>
                    <input TYPE="checkbox" class="checkbox" name="autoOpen" id="AdvAutoOpenCheck" onClick="glb_advSearchAutoOpen = this.checked; setFilter(this.name, this.checked);" checked /> %_ADV_OPEN_AUTO%_
                </td>
             </tr>

		 </table>
	   </div>
	  </form>
     </td>
    </tr>
   </table>
   <table id="Tb_SearchControlBar" width="100%" border="0" cellspacing="0" cellpadding="0" nowrap>
    <!-- Row 1 -->
    <tr border="0" style="height:%_NAVBAR_ROW7%_;">
     <td style="padding-left:0px;padding-right:0px;">
     <table id="notHomePageOrShoppingCartView" height="100%" width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr style="background-image:url('%_HTMLImageDir2%_/NavBar/SearchControlBar_Background.png');background-repeat:repeat;">
      <td align="left">
      <table id="Tb_SearchControl" border="0" cellspacing="0" cellpadding="0">
      <tr>
      	  <td id="Td_Btn0A" nowrap style="padding-left:5px;padding-right:4px;text-align:left;" onClick=chk2Enter(11) onMouseOver=HandleButton(1,0,1,event.x,event.y) onMouseOut=HandleButton(2,0,1,event.x,event.y) onMouseDown=HandleButton(3,0,1,event.x,event.y)>
		  	<a style="vertical-align:middle;" nohref>
		   		<img id="img_Btn0A" src="%_HTMLImageDir2%_/NavBar/GetPrice_D.png">
		  	</a>
           <a id="u_Btn0A" style="text-align:left;color:#00000;font-family:%_PRIMARYFONT%_;font-size:10;">.
           </a>
          </td>
          <td style="vertical-align:middle;" nowrap>
           <img id="Btn0Sep" src='%_HTMLImageDir2%_/NavBar/Divider.png'>
          </td>
          <td id="Td_Btn01A" style="padding-left:5px;padding-right:4px;background:transparent;text-align:left;" nowrap onClick=chk2Enter(15) onMouseOver=HandleButton(1,1,1,event.x,event.y) onMouseOut=HandleButton(2,1,1,event.x,event.y) onMouseDown=HandleButton(3,1,1,event.x,event.y)>
		  	<a style="vertical-align:middle;" nohref>
		   		<img id="img_Btn01A" style="padding-right:1px;" src="%_HTMLImageDir2%_/NavBar/FindSimilar_D.png">
		  	</a>
           <a id="u_Btn01A" style="color:#000000;text-align:center;background:transparent;font-family:%_PRIMARYFONT%_;font-size:10;">.
           </a>
          </td>
          <td style="vertical-align:middle;" nowrap>
           <img id="Btn01Sep" src='%_HTMLImageDir2%_/NavBar/Divider.png'>
          </td>
          <td id="Td_Btn1A" style="padding-left:5px;padding-right:4px;background:transparent;text-align:left;" nowrap onClick=chk2Enter(12) onMouseOver=HandleButton(1,2,1,event.x,event.y) onMouseOut=HandleButton(2,2,1,event.x,event.y) onMouseDown=HandleButton(3,2,1,event.x,event.y)>
		  	<a style="vertical-align:middle;" nohref>
		   		<img id="img_Btn1A" style="padding-right:1px;" src="%_HTMLImageDir2%_/NavBar/DownloadComp_D.png">
		  	</a>
           <a id="u_Btn1A" style="color:#000000;text-align:center;background:transparent;font-family:%_PRIMARYFONT%_;font-size:10;">.
		   </a>
          </td>
          <td style="vertical-align:middle;" nowrap>
           <img id="Btn1Sep" src='%_HTMLImageDir2%_/NavBar/Divider.png'>
          </td>
          <td id="Td_Btn2A" style="padding-left:5px;padding-right:4px;background:transparent;text-align:left;" nowrap  onClick=chk2Enter(13) onMouseOver=HandleButton(1,3,1,event.x,event.y) onMouseOut=HandleButton(2,3,1,event.x,event.y) onMouseDown=HandleButton(3,3,1,event.x,event.y)>
		  	<a style="vertical-align:middle;" nohref>
		   		<img id="img_Btn2A" style="padding-right:1px;" src="%_HTMLImageDir2%_/NavBar/AddToCart_D.png">
		  	</a>
           <a id="u_Btn2A" style="color:#000000;text-align:center;background:transparent;font-family:%_PRIMARYFONT%_;font-size:10;">.
		   </a>
          </td>
      </tr>
      </table>
      </td>
      <td id="Td_ExpandingCell" width="100%" style="padding-left:5px;">
      </td>
      <td style="padding-left:5px;" align="right">
      <table id="Tb_InfoWell" align="right" border="0" cellspacing="0" cellpadding="0">
      <tr align="right">
      	<td border="0" width="5px">
      		<span>
           		<img src="%_HTMLImageDir2%_/NavBar/asp_infowell_left.png">
       	 	</span>
      	</td>
      	<td border="0" style="background-image:url('%_HTMLImageDir2%_/NavBar/asp_infowell_bak.png');background-repeat:repeat;">
			<table border="0" cellspacing="0" cellpadding="0">
      		<tr>
      		<td>
      			<table id="Td_Keyword" border="0" cellspacing="0" cellpadding="0" style="visibility:hidden;display:none">
      				<tr>
      					<td  vertical-align:middle; align="center" border="0" style="padding-left:2x;padding-right:0px;visibility:visible;" nowrap>
      						<a id="Keyword" style="text-align:center;color:#333333;font-family:%_PRIMARYFONT%_;font-size:10;visibility:visible;">.</a>
      					</td>
            			<td id="Separator" style="padding-left:4px;padding-right:0px;">
                 			<img src="%_HTMLImageDir2%_/NavBar/InfoWellDivider.png">
            			</td>

           			</tr>
            	</table>
            </td>

            <td id="Td_Label" nowrap style="padding-left:10px; padding-right:9px">
      			<a id="Label" style="text-align:center;color:#333333;font-family:%_PRIMARYFONT%_;font-size:10;display:inline">.</a>
            </td>
      		<td id="Td_GettingImg" align="center" border="0" style="visibility:hidden;">
              <table border="0" cellspacing="0" cellpadding="0" align="center">
               <tr>
                <td id="L1Gif" nowrap align="center" style="vertical-align:middle;padding-left:9px;">
                   <a style="vertical-align:middle;" nohref>
		   			<img src="%_HTMLImageDir2%_/NavBar/InProgress.gif">
		  		   </a>
		  		 </td>
		  		 <td nowrap style="vertical-align:middle;padding-left:5px;padding-right:10px;">
                  <a id="L1Getting" style="vertical-align:middle;color:#333333;text-align:center;visibility:hidden;font-family:%_PRIMARYFONT%_;font-size:10;" >.</a>
                </td>
               </tr>
              </table>
             </td>
			<td id="Td_moreXofY" nowrap align="center" border="0" style="padding:0px;visibility:hidden;">
             <!-- XofY, More -->
              <table border="0" cellspacing="0" cellpadding="0" >
               <tr>
               	<td>
               		<table style="visiblity:hidden" border="0" cellspacing="0" cellpadding="0">
      					<tr>
              				<td id="Td_L1xOfy" vertical-align:middle; style="padding-left:5px;visibility:hidden;" nowrap>
              	 				<a id="L1xOfy" style="color:#333333;font-family: %_PRIMARYFONT%_;font-size:10px;">.%_LN1_STR3%_</a>
        	  				</td>
        	  			</tr>
        	  		</table>
        	  	</td>
				<td onClick="return( chk2Enter(3) )" onMouseOver="AddFunc(4, event.x, event.y)" onMouseOut="AddFunc(5, event.x, event.y)">
          			<table id="Tb_More" border="0" cellspacing="0" cellpadding="0" >
          				<tr>
          					<td id="Td_TextMore" vertical-align:middle; nowrap class="ThisBlack" style="padding-left:4px;padding-right:2px;" >
             	  				<a id="TextMoreA" style="font-size:11px;font-weight:bold;color:#027ABB;visibility:visible; font-family: %_PRIMARYFONT%_;">%_MORERES2%_
              	  				</a>
          					</td>

          					<td nowrap width="18px" style="vertical-align:middle;padding-right:2px;padding-top:2px">
           	     				<a>
            	  					<img id="MoreResults_N" src="%_HTMLImageDir2%_/NavBar/MoreResults_N.png" name="AMor" vertical-align="middle" border="0">
		         				</a>
  		        			</td>
  		        		</tr>
  		        	</table>
  		        	<!-- Tb_More -->
  		        </td>

    		   </tr>
     		  </table>
         	</td>

      	 	</tr>
      		</table>
      </td>

      <td border="0">
      	<span>
        	<img src="%_HTMLImageDir2%_/NavBar/asp_infowell_right.png">
       	 </span>
      </td>
      </tr>
      </table>
      </td>
    </tr>
    </table>
   </td>
  </tr>
 </table>
</body>
</html>
