// ********************************************************************************************************************
// Base Item Page Javascript
// Version 2.4.0a
//
// Date Created:  2007-01-24
// Last Modified: 2009-11-04
//
// Requires: Common v1.1+, Common-UI v1.1+
// Created by MeMSO of A Far Site Better
// (c) Copyright 2007 - 2009
if(typeof(INCLUDES)=='undefined')alert('Error! Common v1.1.0 or higher is required!');else if(VersionCompare('1.1.0',INCLUDES.common)==2)alert('Error! Common v1.1.0 or higher is required!');Include('common-ui.js','common_ui','1.1.0');INCLUDES.page_items='2.4.0';var IP_INTCOM_SCRIPT='intcom/items'+SiteScriptingExt;var IP_INTCOM_ITEMPAGE='items'+SiteScriptingExt;var Pgit76=9000;var PgitX=9000;var Pgit=200;var Pgitef='\~\:SQUID-PIE\:\~';var Pgit_3='&{@TE_)}RM!#\'';var Pgitrdl=11;var Pgitqg=11;var Pgit5G=15;var Pgitu='IPItemAccessoriesRegion';var PgitGsO='IPItemAccessoriesInner';var PgitIse='IPItemAccessoriesContent';var Pgitb1L='IPItemAccessoriesRow';var Pgituia='accessory';var PgitUA='accessquant';var Pgitx='IPIE7FixRegion';var Pgitp='IPItemSpecDDTitle';var Pgith1='IPItemSpecDDOuter';var Pgit8Qb='IPItemSpecDD';var PgitOWk='specdd';var Pgit5UQ='IPItemStyleDDOuter';var PgitQ='IPItemStyleDD';var Pgit8Wo='styledd';var PgitmM='IPItemCrossSellRegion';var PgitKnv='IPItemCrossSellList';var Pgit9An='IPItemNowViewing';var Pgita='IPINVInner';var PgitAQ='IPItemOtherViewsRegion';var Pgit36='IPIOVList';var PgitDQ='IPOtherViewItem';var PgitI='IPOtherViewItemIm';var PgitCFi='IPOtherViewItemViewIm';var Pgit2V='IPIOVOverlay';var Pgit8ih='IPIOVOverlayIm';var PgitEr='IPSwatchItem';var PgitRF='IPItemColorSwatchRegion';var PgitP='IPBrowseOtherItem';var PgitwO='IPPopupTempForm';var Pgitf='IPItemBBDDOuter';var Pgit7='IPItemBBDDOuterOn';var Pgit3='IPItemBBDDOuterDone';var Pgitsv0='IPOVLItem';var Pgit_='IPOVLItemMO';var Pgitm='IPOVLItemOn';var Pgit0L='IPICSLI';var Pgit8='IPICSLIMO';var PgitGc='IPICSLIOn';var Pgit66=100;var IP_SCRIPTROOTDIRECTORY='/';var IP_HTTPSROOTDIRECTORY='/';var IP_INTCOMROOTDIRECTORY='/';var IP_IMAGEROOTDIRECTORY='/';var ItemPageStatic;ItemPageStatic={DeptsItemsControlFlags:0,ItemsControlFlags:0,ItemsControlFlags2:0,DeptsControlFlags:0,ManuControlFlags:0,StylesControlFlags:0,CookieItemControlFlags:0};var ItemPage=null;var ip_flags=0;var ip_wmwindow=null;var ip_returnurl='';var ip_postloaditemid=0;var ip_zoomobject;var IPSharedData;IPSharedData={ZoomIndex:-1,CachedChildData:[],CachedChildNum:0,RegistryList:null,RegistryNum:-1,TechData:[],TechNum:0,TechImageData:[],TechImageNum:0,Buttons:null};IPSharedData.Buttons={ContinueShopping:'',ContinueShoppingWid:0,ContinueShoppingHei:0,CreateReg:'',CreateRegWid:0,CreateRegHei:0,AddToReg:'',AddToRegWid:0,AddToRegHei:0,AddToRegs:'',AddToRegsWid:0,AddToRegsHei:0,GoToReg:'',GoToRegWid:0,GoToRegHei:0,GoToRegs:'',GoToRegsWid:0,GoToRegsHei:0,GoToWishList:'',GoToWishListWid:0,GoToWishListHei:0};var PgitR;IPInternalDHTMLLoadedData=null;var Pgit1;Pgit1={SwatchSwitch:0,OVImageWait:0,OVOverlayLoadWait:0};ExecuteOnLoad(IP_StartupTest);ExecuteOnUnLoad(IP_DeInitialize);IP_PageRestart();function IP_PageRestart(){ItemPage={ItemID:0,DefaultDeptID:0,DeptID:0,ManuID:0,StyleID:0,ChildID:0,DeptName:'',ManuName:'',ImageDir:'',Events:null,ItemData:null,Settings:null,Callbacks:null,Popups:null,CurChildData:null,ChildTieData:null,ChildNum:0,ChildNumOnSale:0,PageFlags:0,StyleData:null,StyleNum:0,StyleNumOnsite:0,StyleNumAvailable:0,StyleImageData:null,StyleImageNum:0,SpecData:null,SpecNum:0,SpecValueData:null,SpecValueNum:0,ImageData:null,ImageNum:0,ImageNumBase:0,ViewData:null,ViewNum:0,ViewImageData:null,ViewImageNum:0,AccessoryData:null,AccessoryNum:0,CrossSellData:null,CrossSellNum:0,BrowseOtherData:null,BrowseOtherNum:0,ID_BuyBoxForm:'',ID_MainImage:'IPMainImage',ID_ZoomPlacement:'IPrealZOOMPlacement',ID_ZoomHighlight:'IPrealZOOMHighlight',ID_ZoomFloater:'IPrealZOOMFloater',ID_ZoomOuter:'IPrealZOOMOuter',Name_Specs:'Attribute',Name_Styles:'Style',DefaultPriceString:'',DefaultPriceStringSale:'',DummyImages:[['noimage.gif',200,200],null,['noimage-m.gif',50,50],['noimage-t.gif',100,100],['noimage-m.gif',50,50],['noimage-t.gif',100,100],['noimage-m.gif',50,50],['noimage-t.gif',100,100],['noimage-m.gif',50,50],['noimage-t.gif',100,100],['noimage-m.gif',50,50],['noimage-t.gif',100,100]],PreloadStyleIDList:null,PreloadSpecList:[null,null,null,null],PreloadSpecs:[-1,-1,-1,-1],Dir_Auto:'',Dir_Main:'',Dir_Full:'',Dir_Zoom:'',CurImageData:[],CurImageIndexList:[],CurImageNum:0,CurImageIndex:-1,CurImageFlags:0,SpecValueIndices:[],CurStyleIndex:-1,CurDisplayStyleIndex:-1,CurOtherViewIndexMouse:-1,CurSwatchIndex:-1,CurSwatchIndexMouse:-1,CurSwatchPopupStyle:-1,CurSwatchNumRows:0,CurSwatchNumCols:0,BuyBoxForm:null};ItemPage.ItemData={Flags:0,Onsite:0,ModelYear:0,PriceMin:0,PriceMax:0,PriceMinOrig:0,PriceMaxOrig:0,MSRPMin:0,MSRPMax:0,Name:'',PLU:'',ItemTypeID:0,ItemTypeFlags:0,StatusFlags:0,ExtraTextFieldName:'',ExtraTextFieldWid:0,ExtraTextFieldHei:0};ItemPage.Settings={DisplayFlags:0x0004,LoginFormWid:600,LoginFormHei:450,SpecDefaultValue:'N/A',ZoomFlags:0x0000,ZoomViewPortWid:300,ZoomViewPortHei:300,StyleFlags:0x0000,StyleShownList:null,StyleShownOff:'&nbsp;',StyleShownImageNoColor:'Various',StyleNameDDMaxLen:30,NVFlags:0x0001,NVImageIndex:-1,NVEmptyContent:'',OVFlags:0x00000101,OVViewImageIndex:-1,OVListSeparator:', ',OVOuterID:'IPIOVListOuter',OVRegionWid:300,OVRegionHei:200,OVMaxCols:4,OVMaxRows:3,OVImageMaxWid:50,OVImageMaxHei:50,OVMainImageAuto:'',OVMainStyleImageAuto:'',OVOverlayModWid:0,OVOverlayModHei:0,OVOverlayModX:0,OVOverlayModY:0,OVOverlayClass:'',OVScrollerID:-1,OVPopupViewImageIndex:-1,OVPopupImageAuto:'',OVPopupStyleImageAuto:'',OVPopupImageWid:0,OVPopupImageHei:0,SwatchFlags:0x00000100,SwatchSwapTimeout:0,SwatchRegionWid:300,SwatchRegionHei:170,SwatchMaxCols:4,SwatchMaxRows:3,SwatchColWid:60,SwatchRowHei:60,SwatchColWidSub:10,SwatchMainImageED:-1,SwatchMainImageAuto:'',SwatchMainImageWid:50,SwatchMainImageHei:50,SwatchPopupImageED:-1,SwatchPopupImageAuto:'',SwatchPopupImageWid:100,SwatchPopupImageHei:100,SwatchScrollerID:-1,SwatchOuterID:'IPICSListOuter',SLFlags:0x0000,SLFormName:'swatchlimiterform',SLSeparator:' &amp; ',SLDDClass:'IPItemLimiterDDOption',SLTextClass:'IPItemLimiterTextOption',SLOuterID:'IPItemLimiterRegion',SLInnerID:'IPItemLimiter',SLDefaultContent:'all items',BOFlags:0x0101,BORegionWid:110,BORegionHei:350,BOMaxCols:2,BOMaxRows:6,BOColWid:60,BORowHei:60,BOColWidSub:10,BOScrollerID:-1,BOOuterID:'',CSFlags:0x0100,ACCFlags:0x0000,ACCShowExtraIDs:'',ACCHideExtraIDs:'',ACCTableWid:200,ACCInnerMaxHei:100,ACCScrollerID:-1,ACCATCContent:'Add to Cart',ACCATCImage:'',ACCATCImageWid:0,ACCATCImageHei:0,ACCWLSeparator:' - ',ACCWLContent:'Add to Wish List',ACCWLImage:'',ACCWLImageWid:0,ACCWLImageHei:0,ACCRegSeparator:' - ',ACCRegContent:'Add to Registry',ACCRegImage:'',ACCRegImageWid:0,ACCRegImageHei:0,ACCShowList:[],ACCHideList:[],ACCColumnFormat:null};ItemPage.Events={ChildIDChange:'',SetDisplayStyle:'',SetImage:'',SpecDDChange:'',StyleDDChange:'',AddToCart:'',AddToCartComplete:'',IntComStart:'',IntComEnd:'',OtherViewBuild:'',OtherViewImagesDone:'',OtherViewImagesAbort:'',OtherViewMO:'',SwatchBuild:'',SwatchItemMO:'',SwatchItemClick:'',CrossSellMO:'',BrowseOtherMO:'',AccessoriesToggle:'',AccessoriesReDraw:'',AccessoriesRowMO:'',AccessoriesThumbMO:''};ItemPage.Callbacks={PriceContent:'',LoginContent:'',NVContent:'',OVItem:'',OVPopup:'',SwatchText:'',SwatchPopup:'',CSItem:'',CSPopup:'',BOItem:'',BOPopup:'',ACCItemName:'',ACCItemExtra:'',ACCPopup:'',TechPopup:'',RegistryNone:'',RegistrySingle:'',RegistryMany:''};ItemPage.Popups={OtherView:new IP_DPopupObject('IPItemOtherViewPopup','','',40,-4,0x00),ColorSwatch:new IP_DPopupObject('IPItemColorSwatchesPopup','','',40,-4,0x00),Accessory:new IP_DPopupObject('IPItemAccessoryPopup','','',-16,-32,0x02),BrowseOther:new IP_DPopupObject('IPItemBrowseOtherPopup','','',-16,-32,0x02),CrossSell:new IP_DPopupObject('IPItemCrossSellPopup','','',40,-4,0x00),Simple:new IP_DPopupObject('IPItemSimplePopup','','',0,-8,0x01)};ip_flags&=0xF0000000;PgitR={Flags:0x0000,OVLoadIteration:0,SharedIntCom:'',LastIndices:[-1,-1,-1,-1,-1,-1,-1,-1],IntComExtras:[false,false],SwatchLimitSet:null,DPopupNumVisible:0,ExtraValues:[-1,'','',0,0,0,'',0,0,'','','','',''],IntComIndexList:[],IntComNumInUse:0,LoginCallback:''};if(!(ItemPageStatic.ItemsControlFlags&0x01)){if(ItemPageStatic.ItemsControlFlags&0x080000&&ItemPage.Settings.ACCFlags&0x01){for(q=0;q<IPSharedData.CachedChildNum;q++){IPSharedData.CachedChildData[q].AccessoryNum=-1;}}}ip_zoomobject=null;}function IP_PreInitialize(){if(ip_flags&0x08)return ;IPCustom_PageRestart();var _vtf,_zV,_P;var _jHJ,__sX,_KqN;if(!(ip_flags&0x10000000)){if(User.InIE7){Create(Pgitx);SetContent(Pgitx,'&nbsp;');SetVisible(Pgitx,1);}if(IPSharedData.ZoomIndex==-1){IPSharedData.ZoomIndex=Zoom_AllocateZoomImages(1);if(IPSharedData.ZoomIndex!=-1){ip_zoomobject=ZoomImages[IPSharedData.ZoomIndex];ip_zoomobject.FloaterOverrideID=ItemPage.ID_ZoomFloater;ip_zoomobject.OuterOverrideID=ItemPage.ID_ZoomOuter;ip_zoomobject.HighlightOverrideID=ItemPage.ID_ZoomHighlight;ip_zoomobject.MainImageID=ItemPage.ID_MainImage;ip_zoomobject.PositionFloaterID=ItemPage.ID_ZoomPlacement;ip_zoomobject.ViewPortWid=ItemPage.Settings.ZoomViewPortWid;ip_zoomobject.ViewPortHei=ItemPage.Settings.ZoomViewPortHei;}}Event_AddHandler('mousemove','IP_OnMouseMove();');IPCustom_OneTimeInitialize();ip_flags|=0x10000000;}else {if(IPSharedData.ZoomIndex!=-1)ip_zoomobject=ZoomImages[IPSharedData.ZoomIndex];}if(!(ItemPage.PageFlags&0x02))ItemPage.BuyBoxForm=GPT(ItemPage.ID_BuyBoxForm);if(ItemPage.SpecValueData!=null)ItemPage.SpecValueNum=ItemPage.SpecValueData.length;else ItemPage.SpecValueNum=0;PgitR.SharedIntCom='deptid='+ItemPage.DefaultDeptID+'&itemid='+ItemPage.ItemID+'&fa='+((ItemPage.PageFlags&0x01)?1:0);ItemPage.Dir_Auto=IP_IMAGEROOTDIRECTORY+'images/items/'+ItemPage.ImageDir+'/auto/';ItemPage.Dir_Main=IP_IMAGEROOTDIRECTORY+'images/items/'+ItemPage.ImageDir+'/main/';ItemPage.Dir_Full=IP_IMAGEROOTDIRECTORY+'images/items/'+ItemPage.ImageDir+'/full/';ItemPage.Dir_Zoom=IP_IMAGEROOTDIRECTORY+'images/items/'+ItemPage.ImageDir+'/zoom/';if(ItemPage.Settings.SwatchMainImageED>0)ItemPage.Settings.SwatchMainImageED*=3;if(ItemPage.Settings.SwatchPopupImageED>0)ItemPage.Settings.SwatchPopupImageED*=3;if(ItemPage.StyleData!=null){ItemPage.StyleNum=ItemPage.StyleData.length;if(ItemPage.PageFlags&0x01){ItemPage.StyleNumOnsite=ItemPage.StyleNum;}else {__sX=0;for(_jHJ=0;_jHJ<ItemPage.StyleNum;_jHJ++){if(ItemPage.StyleData[_jHJ][1]&0x01)__sX++;}ItemPage.StyleNumOnsite=__sX;}}if(ItemPage.SpecData!=null)ItemPage.SpecNum=ItemPage.SpecData.length;if(ItemPage.SpecValueData!=null)ItemPage.SpecValueNum=ItemPage.SpecValueData.length;if(ItemPage.ImageData!=null)ItemPage.ImageNum=ItemPage.ImageData.length;if(ItemPage.ViewData!=null)ItemPage.ViewNum=ItemPage.ViewData.length;if(ItemPage.AccessoryData!=null){ItemPage.AccessoryNum=ItemPage.AccessoryData.length;for(_jHJ=0;_jHJ<ItemPage.AccessoryNum;_jHJ++){if(!(ItemPage.AccessoryData[_jHJ][1]&0x01)){PgitR.Flags|=0x01;break;}}}if(ItemPage.CrossSellData!=null)ItemPage.CrossSellNum=ItemPage.CrossSellData.length;if(ItemPage.BrowseOtherData!=null)ItemPage.BrowseOtherNum=ItemPage.BrowseOtherData.length;if(ItemPage.ImageNum)IP_IndexViews(0,ItemPage.ImageNum-1);if(ItemPage.ImageNum)IP_IndexStyleImageTies(0,ItemPage.ImageNum-1);for(_jHJ=0;_jHJ<ItemPage.SpecNum;_jHJ++){for(__sX=ItemPage.SpecData[_jHJ][3];__sX<ItemPage.SpecData[_jHJ][3]+ItemPage.SpecData[_jHJ][4];__sX++){ItemPage.SpecValueData[__sX][2]=_jHJ;}}if(ItemPage.ChildTieData!=null){ItemPage.ChildNum=ItemPage.ChildTieData.length;ItemPage.ChildNumOnSale=0;for(_jHJ=0;_jHJ<ItemPage.ChildNum;_jHJ++){if(ItemPage.ChildTieData[_jHJ][1]&0x10)ItemPage.ChildNumOnSale++;}}else {ItemPage.ChildNum=0;ItemPage.ChildNumOnSale=0;}ip_flags|=0x08;IP_ContentInitialize(0x010000);if(ItemPage.CrossSellNum&&ItemPage.Settings.CSFlags&0x01)IP_CrossSellBuild();if(ItemPage.Settings.BOFlags&0x01)IP_BrowseOtherBuild();}function IP_ContentInitialize(_c){var _p,_,_r;var _4M,_K,_j;if(!(ItemPageStatic.ItemsControlFlags&0x01)){IP_ChildTieConvert(_c);if(_c&0x010000)IP_PreSelectSetup();}if(ItemPage.Settings.SwatchFlags&0x01){IP_SwatchBuild();if(ItemPage.Settings.SLFlags&0x01)IP_SwatchLimiterBuild();}if(!(ItemPage.PageFlags&0x02)){_p=1;for(_=0;_<ItemPage.SpecNum;_++){_4M=ItemPage.SpecData[_];if(!(ItemPage.Settings.DisplayFlags&0x02)){SetContent(Pgitp+_,FormFix(_4M[1])+':');}if(_4M[5]>1){ItemPage.SpecValueIndices[_]=-1;_K='<select name="'+PgitOWk+_+'" onchange="IP_SpecDDChange('+_+');">\n';_K+='<option value="-1" selected="selected">';if(ItemPage.Settings.DisplayFlags&0x01)_K+='select...';else _K+='select '+FormFix(_4M[1].toLowerCase())+'...';_K+='</option>\n';if(_p){for(_r=_4M[3];_r<_4M[3]+_4M[4];_r++){if(ItemPage.SpecValueData[_r][6]&0x01){_j=ItemPage.SpecValueData[_r][1];if(_j=='')_j=ItemPage.Settings.SpecDefaultValue;_K+='<option value="'+_r+'">'+FormFix(_j)+'</option>\n';}}SetClass(Pgith1+_,Pgit7);_p=0;}else {SetClass(Pgith1+_,Pgitf);}_K+='</select>';}else {if(_4M[5]==1){curindex=-1;for(_r=_4M[3];_r<_4M[3]+_4M[4];_r++){if(ItemPage.SpecValueData[_r][6]&0x01){curindex=_r;break;}}ItemPage.SpecValueIndices[_]=curindex;_j=ItemPage.SpecValueData[curindex][1];if(_j=='')_j=ItemPage.Settings.SpecDefaultValue;_K=FormFix(_j);}else {ItemPage.SpecValueIndices[_]=-1;_K=FormFix(ItemPage.Settings.SpecDefaultValue);}if(ItemPage.Settings.DisplayFlags&0x08){_j=FormFix(_4M[1])+':';if(ItemPage.Class_SpecAsTextPrepend)_j='<div class="'+ItemPage.Class_SpecAsTextPrepend+'">'+_j+'</div>';_K=_j+_K;}SetClass(Pgith1+_,Pgitf);}SetContent(Pgit8Qb+_,_K);}}if(ItemPageStatic.StylesControlFlags&0x01&&!(ItemPage.PageFlags&0x02)){if(ItemPage.StyleNumAvailable>1){ItemPage.CurStyleIndex=-1;_K='<select name="'+Pgit8Wo+'" onchange="IP_StyleDDChange();">\n';_K+='<option value="-1" selected="selected">';if(ItemPage.Settings.DisplayFlags&0x01)_K+='select...';else _K+='select '+FormFix(ItemPage.Name_Styles.toLowerCase())+'...';_K+='</option>\n';if(_p){for(_r=0;_r<ItemPage.StyleNum;_r++){if(ItemPage.StyleData[_r][1]&0x02){_j=(ItemPage.StyleData[_r][3]=='')?ItemPage.StyleData[_r][2]:ItemPage.StyleData[_r][3];if(_j.length>ItemPage.Settings.StyleNameDDMaxLen)_j=_j.substring(0,ItemPage.Settings.StyleNameDDMaxLen-3)+'...';_K+='<option value="'+_r+'">'+FormFix(_j)+'</option>\n';}}SetClass(Pgit5UQ,Pgit7);_p=0;}else {SetClass(Pgit5UQ,Pgitf);}_K+='</select>';}else {if(ItemPage.StyleNumAvailable==1){if(ItemPage.PageFlags&0x01){ItemPage.CurStyleIndex=0;}else {for(_=0;_<ItemPage.StyleNum;_++){if(ItemPage.StyleData[_][1]&0x02){ItemPage.CurStyleIndex=_;break;}}}_K=FormFix((ItemPage.StyleData[ItemPage.CurStyleIndex][3]=='')?ItemPage.StyleData[ItemPage.CurStyleIndex][2]:ItemPage.StyleData[ItemPage.CurStyleIndex][3]);}else {ItemPage.CurStyleIndex=-1;_K='N/A';}if(ItemPage.Settings.DisplayFlags&0x08){_j=FormFix(ItemPage.Name_Styles)+':';if(ItemPage.Class_SpecAsTextPrepend)_j='<div class="'+ItemPage.Class_SpecAsTextPrepend+'">'+_j+'</div>';_K=_j+_K;}SetClass(Pgit5UQ,Pgitf);}SetContent(PgitQ,_K);}ItemPage.CurDisplayStyleIndex=-2;if(ItemPageStatic.StylesControlFlags&0x01&&(ItemPage.StyleID||ItemPage.Settings.StyleFlags&0x02||!ItemPage.ImageNumBase)){if(ItemPage.StyleID){_4M=IP_GetIndexStyle(ItemPage.StyleID);if(_4M<0)_4M=0;}else {_4M=0;}if(!(ItemPage.StyleData[_4M][1]&0x02)){for(_=0;_<ItemPage.StyleNum;_++){if(ItemPage.StyleData[_][1]&0x02){_4M=_;break;}}}setTimeout('IP_DisplayStyleSet('+_4M+');',10);}else {setTimeout('IP_DisplayStyleSet(-1);',10);}if(ItemPage.Settings.OVFlags&0x02){ItemPage.CurImageNum=0;for(_=0;_<ItemPage.StyleNum;_++){if(ItemPage.StyleData[_][1]&0x02){if(ItemPage.StyleData[_][6]>0){for(_r=0;_r<ItemPage.StyleData[_][6];_r++){_p=ItemPage.StyleData[_][5]+_r;ItemPage.CurImageIndexList[ItemPage.CurImageNum]=_p;ItemPage.CurImageData[ItemPage.CurImageNum++]=ItemPage.ImageData[_p];}}}}for(_=0;_<ItemPage.ImageNumBase;_++){ItemPage.CurImageIndexList[ItemPage.CurImageNum]=_;ItemPage.CurImageData[ItemPage.CurImageNum++]=ItemPage.ImageData[_];}ItemPage.CurImageIndex=-2;IP_MainImageSet(0);IP_OtherViewsBuild();}ItemPage.ChildID=-1;IP_SetChildID(0);IPCustom_PreInitialize();setTimeout('IP_Initialize();',10);}function IP_Initialize(){if(!(ip_flags&0x08))return ;var _,_wL,_fn;_wL=0;for(_=0;_<ItemPage.SpecNum;_++){if(ItemPage.SpecData[_][5]>1){_wL++;_fn=_;}}if(ItemPage.StyleNumAvailable>1){_wL++;_fn=0x0100;}if(!_wL){if(!(ItemPageStatic.ItemsControlFlags&0x01))IP_RequestChildData();ip_flags|=0x0100;}else if(ItemPage.StyleID||ItemPage.PreloadSpecs[0]>=0){setTimeout('IP_PreSelectInitialize();',10);}else if(_wL==1&&ItemPage.Settings.DisplayFlags&0x10&&!(ItemPage.PageFlags&0x02)){if(_fn==0x0100){ItemPage.BuyBoxForm.elements[Pgit8Wo].selectedIndex=1;setTimeout('IP_StyleDDChange();',10);}else {ItemPage.BuyBoxForm.elements[PgitOWk+_fn].selectedIndex=1;setTimeout('IP_SpecDDChange('+_fn+');',10);}}ip_flags|=0x01;IPCustom_Initialize();}function IP_PreSelectInitialize(){var _I3f;for(_I3f=0;_I3f<ItemPage.SpecNum;_I3f++){if(ItemPage.PreloadSpecs[_I3f]<0)return ;if(ItemPage.SpecData[_I3f][5]<=1)continue;SmartForm_SelectValue(ItemPage.BuyBoxForm,PgitOWk+_I3f,ItemPage.PreloadSpecs[_I3f].toString(),0x01);if(IP_SpecDDChange(_I3f)){return ;}}if(ItemPage.StyleNumAvailable>1&&ItemPage.StyleID){var _o=IP_GetIndexStyle(ItemPage.StyleID);if(_o>=0){SmartForm_SelectValue(ItemPage.BuyBoxForm,Pgit8Wo,_o.toString(),0x01);IP_StyleDDChange();}}}function IP_DeInitialize(){if(!(ip_flags&0x08))return ;var _hR,_Tw;if(ItemPage==null)return ;for(var _85M in Pgit1){if(Pgit1[_85M]){clearTimeout(Pgit1[_85M]);Pgit1[_85M]=0;}}for(q=0;q<PgitR.IntComIndexList.length;q++){if(PgitR.IntComIndexList[q]>=0){DHTML_IntComCancel(PgitR.IntComIndexList[q]);PgitR.IntComIndexList[q]=-1;}}PgitR.IntComNumInUse=0;IPCustom_DeInitialize();for(q=0;q<ItemPage.CurImageData.length;q++){ItemPage.CurImageData[q]=null;}ItemPage.CurImageNum=0;for(curname in ItemPage.Popups){IP_DPopupHide(curname);ItemPage.Popups[curname].Pointer=null;ItemPage.Popups[curname].PointerInner=null;}ItemPage.BuyBoxForm=null;ip_zoomobject=null;if(IPSharedData.ZoomIndex!=-1)Zoom_DeInitializeImage(IPSharedData.ZoomIndex);ItemPage=null;ip_flags&=0xF0000000;}function IP_StartupTest(){if(ip_flags&0x20000009)return ;if(PgitR.ExtraValues[4]){setTimeout('IP_DHTMLPageLoad('+PgitR.ExtraValues[4]+', '+PgitR.ExtraValues[5]+', '+'\''+JSClean(PgitR.ExtraValues)+'\');',50);return ;}if(ip_postloaditemid){if(!User.InIE5&&!(ip_flags&0x08&&!(ItemPage.PageFlags&0x10000000))&&!(ItemPageStatic.CookieItemControlFlags&0x02))setTimeout('IP_DHTMLPageLoad('+ip_postloaditemid+', 0, \'\');',10);return ;}}function IP_OnMouseMove(){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return true;if(PgitR.DPopupNumVisible){var _R,_7;for(_7 in ItemPage.Popups){_R=ItemPage.Popups[_7];if(_R.Flags&0x02)IP_DPopupPosition(_R);}}return true;}function IP_ChildDataObject(){this.ID=0;this.ItemID=0;this.StyleID=0;this.Onsite=0;this.Flags=0;this.Quantity=0;this.Price=0;this.PriceOrig=0;this.MSRP=0;this.ParentName='';this.Name='';this.SKU='';this.StyleNumberOverride='';this.AccessoryNum=(ItemPageStatic.ItemsControlFlags&0x080000&&ItemPage.Settings.ACCFlags&0x01)?-1:0;this.AccessoryList=null;this.Description='';this.ImageThumb='';this.ImageThumbWid=0;this.ImageThumbHei=0;}function IP_DPopupObject(_X4e,__,_,_zu,_uV,_9N3){this.Flags=0;this.DisplayFlags=_9N3;this.Wid=0;this.Hei=0;this.OffsetX=_zu;this.OffsetY=_uV;this.X=0;this.Y=0;this.OuterID=_X4e;this.InnerID=__;this.ClassList=_;this.Pointer=null;this.PointerInner=null;}function IP_IndexViews(_,_8w){var _L7,_xG,_q9,_Vxx;for(_L7=_;_L7<=_8w;_L7++){_xG=-1;if(_q9=ItemPage.ImageData[_L7][10]){for(_Vxx=0;_Vxx<ItemPage.ViewNum;_Vxx++){if(ItemPage.ViewData[_Vxx][0]==_q9){_xG=_Vxx;break;}}}ItemPage.ImageData[_L7][10]=_xG;}}function IP_IndexStyleImageTies(_4g,_){var _v,_5qQ,_7O,_UW;for(_v=_4g;_v<=_;_v++){_5qQ=-1;if(_7O=ItemPage.ImageData[_v][11])_5qQ=IP_GetIndexStyle(_7O);ItemPage.ImageData[_v][11]=_5qQ;}}function IP_GetIndexStyle(_){var _3=-1;var _2;for(_2=0;_2<ItemPage.StyleNum;_2++){if(ItemPage.StyleData[_2][0]==_){_3=_2;break;}}return _3;}function IP_GetIndexSpec(_l){var _gK=-1;var _yM;for(_yM=0;_yM<ItemPage.SpecNum;_yM++){if(ItemPage.SpecData[_yM][0]==_l){_gK=_yM;break;}}return _gK;}function IP_GetIndexSpecValue(_sby,_xvw){var _=-1;var _n;if(_sby){for(_n=0;_n<ItemPage.SpecValueNum;_n++){if(ItemPage.SpecValueData[_n][0]==_sby){_=_n;break;}}}else {for(_n=0;_n<ItemPage.SpecValueNum;_n++){if(!ItemPage.SpecValueData[_n][0]&&ItemPage.SpecValueData[_n][1]==_xvw){_=_n;break;}}}return _;}function IP_GetSharedResults(_EM,_X){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;var _kg=[];var _=0;var _w7=_EM.length,_2=0;var _p=_X.length,_oL=0;while(_2<_EM.length&&_oL<_X.length){if(_EM[_2]==_X[_oL]){_kg[_++]=_EM[_2];_2++;_oL++;}else if(_EM[_2]>_X[_oL]){_oL++;}else {_2++;}}return _kg;}function IP_ChildDataGetByID(_){if(!(ip_flags&0x08))return -1;_=Cast(_,CAST_INT);if(!IPSharedData.CachedChildNum)return -1;if(_<=0)return -1;var _K,_M,_7,_vh=-1;if(IPSharedData.CachedChildNum==1){if(IPSharedData.CachedChildData[0].ID==_)_vh=0;}else {_K=0;_M=IPSharedData.CachedChildNum-1;while(_K<=_M){_7=((_M-_K)>>1)+_K;if(IPSharedData.CachedChildData[_7].ID>_){_M=_7-1;}else if(IPSharedData.CachedChildData[_7].ID<_){_K=_7+1;}else {_vh=_7;break;}}}return _vh;}function IP_ChildDataAdd(_8x){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return -1;if(_8x==null||typeof(_8x)!='object')return -1;var _UF5=_8x.ID;var _,_sk,_L,_26h=-1;if(!IPSharedData.CachedChildNum){_L=0;}else if(IPSharedData.CachedChildNum==1){if(IPSharedData.CachedChildData[0].ID>_UF5)_L=0;else if(IPSharedData.CachedChildData[0].ID<_UF5)_L=1;else _26h=0;}else {_=0;_sk=IPSharedData.CachedChildNum-1;while(_<=_sk){_L=((_sk-_)>>1)+_;if(IPSharedData.CachedChildData[_L].ID>_UF5){_sk=_L-1;}else if(IPSharedData.CachedChildData[_L].ID<_UF5){_=++_L;}else {_26h=_L;break;}}}if(_26h>=0){IPSharedData.CachedChildData[_26h]=_8x;}else {if(_L<IPSharedData.CachedChildNum&&IPSharedData.CachedChildNum){for(q=IPSharedData.CachedChildNum;q>_L;q--){IPSharedData.CachedChildData[q]=IPSharedData.CachedChildData[q-1];}}IPSharedData.CachedChildData[_L]=_8x;IPSharedData.CachedChildNum++;_26h=_L;}return _26h;}function IP_ChildTieConvert(_Iih){var _E,_,_12,_KeP,_1,_qN;var _fsx,_e,_uL7;var _n2,_hRF='';var _DH,_q=[],_Z=0;if(_Iih&0x01)ItemPage.PageFlags|=0x04;else ItemPage.PageFlags&=~0x04;for(_E=0;_E<ItemPage.SpecValueNum;_E++){ItemPage.SpecValueData[_E][3]=[];if(ItemPageStatic.StylesControlFlags&0x01)ItemPage.SpecValueData[_E][4]=[];else ItemPage.SpecValueData[_E][4]=null;ItemPage.SpecValueData[_E][5]=[];ItemPage.SpecValueData[_E][6]=0;}if(ItemPageStatic.StylesControlFlags&0x01){for(_E=0;_E<ItemPage.StyleNum;_E++){ItemPage.StyleData[_E][7]=[];ItemPage.StyleData[_E][1]&=~0x02;}}var _8=ItemPage.ChildID;var _j=ItemPage.ChildTieData;for(_E=0;_E<ItemPage.ChildNum;_E++){_fsx=_j[_E];_uL7=2;_DH=_fsx[0];childflags=_fsx[1];if(_Iih&0x01&&!(childflags&0x10))continue;if(ItemPageStatic.StylesControlFlags&0x01)_Z=IP_GetIndexStyle(_fsx[_uL7++]);for(_=0;_<ItemPage.SpecNum;_++){_n2=_fsx[_uL7++];if(!_n2)_hRF=_fsx[_uL7++];else _hRF='';_q[_]=IP_GetIndexSpecValue(_n2,_hRF);}for(_=0;_<ItemPage.SpecNum;_++){_fsx=ItemPage.SpecValueData[_q[_]];_fsx[6]|=0x01;_fsx[5].push(_DH);if(_<ItemPage.SpecNum-1){_1=0;_n2=_q[_+1];_e=_fsx[3];if(!_){for(_12=0;_12<_e.length;_12++){if(_e[_12]==_n2){_1=1;break;}}}else if(_==1){_qN=0;for(_12=0;_12<_e.length;_12++){if(_e[_12][0]==_q[0]){_qN=1;for(_KeP=_;_KeP<_e[_12].length;_KeP++){if(_e[_12][_KeP]==_n2){_1=1;break;}}break;}}}else {_qN=0;for(_12=0;_12<_e.length;_12++){_qN=1;for(_KeP=0;_KeP<_;_KeP++){if(_e[_12][_KeP]!=_q[_KeP]){_qN=0;break;}}if(_qN){for(_KeP=_;_KeP<_e[_12].length;_KeP++){if(_e[_12][_KeP]==_n2){_1=1;break;}}break;}}}if(!_1){if(_){if(_qN){_e[_12].push(_n2);}else {_12=_e.length;_e[_12]=[];for(_KeP=0;_KeP<_;_KeP++){_e[_12][_KeP]=_q[_KeP];}_e[_12][_]=_n2;}}else {_e.push(_n2);}}}if(ItemPageStatic.StylesControlFlags&0x01){_1=0;_n2=_Z;_e=_fsx[4];if(!_){for(_12=0;_12<_e.length;_12++){if(_e[_12]==_n2){_1=1;break;}}}else if(_==1){_qN=0;for(_12=0;_12<_e.length;_12++){if(_e[_12][0]==_q[0]){_qN=1;for(_KeP=_;_KeP<_e[_12].length;_KeP++){if(_e[_12][_KeP]==_n2){_1=1;break;}}break;}}}else {_qN=0;for(_12=0;_12<_e.length;_12++){_qN=1;for(_KeP=0;_KeP<_;_KeP++){if(_e[_12][_KeP]!=_q[_KeP]){_qN=0;break;}}if(_qN){for(_KeP=_;_KeP<_e[_12].length;_KeP++){if(_e[_12][_KeP]==_n2){_1=1;break;}}break;}}}if(!_1){if(_){if(_qN){_e[_12].push(_n2);}else {_12=_e.length;_e[_12]=[];for(_KeP=0;_KeP<_;_KeP++){_e[_12][_KeP]=_q[_KeP];}_e[_12][_]=_n2;}}else {_e.push(_n2);}}}}if(ItemPageStatic.StylesControlFlags&0x01){ItemPage.StyleData[_Z][7].push(_DH);ItemPage.StyleData[_Z][1]|=0x02;}if(_DH==_8){for(_=0;_<ItemPage.SpecNum;_++){ItemPage.PreloadSpecs[_]=_q[_];}ItemPage.StyleID=_j[_E][2];}}for(_E=0;_E<ItemPage.SpecNum;_E++){_1=0;for(_=ItemPage.SpecData[_E][3];_<ItemPage.SpecData[_E][3]+ItemPage.SpecData[_E][4];_++){if(ItemPage.SpecValueData[_][6]&0x01)_1++;}ItemPage.SpecData[_E][5]=_1;}if(ItemPageStatic.StylesControlFlags&0x01){_=0;for(_E=0;_E<ItemPage.StyleNum;_E++){if(ItemPage.StyleData[_E][1]&0x02)_++;}ItemPage.StyleNumAvailable=_;}for(_E=0;_E<ItemPage.SpecValueNum;_E++){_fsx=ItemPage.SpecValueData[_E];_n2=_fsx[2];if(_n2<ItemPage.SpecNum-1){if(!_n2){if(_fsx[3].length>1)QuickSort(_fsx[3],0,_fsx[3].length-1,0);}else {for(_=0;_<_fsx[3].length;_++){if(_fsx[3][_].length>_n2+1)QuickSort(_fsx[3][_],_n2,_fsx[3][_].length-1,0);}}}if(ItemPageStatic.StylesControlFlags&0x01){if(!_n2){if(_fsx[4].length>1)QuickSort(_fsx[4],0,_fsx[4].length-1,0);}else {for(_=0;_<_fsx[4].length;_++){if(_fsx[4][_].length>_n2+1)QuickSort(_fsx[4][_],_n2,_fsx[4][_].length-1,0);}}}}}function IP_SwitchSaleListStatus(_){if(!ItemPage.ChildNumOnSale||ItemPage.ChildNumOnSale==ItemPage.ChildNum)return ;if((ItemPage.PageFlags&0x04)==(_?0x04:0x00))return ;IP_ContentInitialize(_?0x01:0);}function IP_GetSVArrayInner(_,_9,_Y){var _BS=ItemPage.SpecValueData[_9[_]][_Y];var _fG;var _B,_p,_C;if(!_)return _BS;if(_==1){_fG=[];for(_B=0;_B<_BS.length;_B++){if(_BS[_B][0]==_9[0]){for(_p=1;_p<_BS[_B].length;_p++){_fG[_p-1]=_BS[_B][_p];}break;}}}else {_fG=[];for(_B=0;_B<_BS.length;_B++){_C=1;for(_p=0;_p<_;_p++){if(_BS[_B][_p]!=_9[_p]){_C=0;break;}}if(_C){for(_p=_;_p<_BS[_B].length;_p++){_fG[_p-_]=_BS[_B][_p];}break;}}}return _fG;}function IP_GetSpecValueArray(_,_oYW){return IP_GetSVArrayInner(_,_oYW,3);}function IP_GetStyleArray(_K,_N){return IP_GetSVArrayInner(_K,_N,4);}function IP_SetSpecValueDD(_ByR,_){var _F,_dw;for(_F=0;_F<_.length;_F++){_dw=ItemPage.SpecValueData[_[_F]][1];if(_dw=='')_dw=ItemPage.Settings.SpecDefaultValue;_ByR.options[_F+1]=new Option(_dw,_[_F]);}}function IP_SetStyleDD(_0,_){var _R6,_hl5;for(_R6=0;_R6<_.length;_R6++){_hl5=ItemPage.StyleData[_[_R6]][3];if(_hl5=='')_hl5=ItemPage.StyleData[_[_R6]][2];if(_hl5.length>ItemPage.Settings.StyleNameDDMaxLen)_hl5=_hl5.substring(0,ItemPage.Settings.StyleNameDDMaxLen-3)+'...';_0.options[_R6+1]=new Option(_hl5,_[_R6]);}}function IP_PreSelectSetup(){if(ItemPage.ChildID>0)return ;var _,_lVT,_A;if(ItemPage.PreloadSpecList[0]!=null){var _e=[null,null,null,null];var _shl=null;var _L=0;for(_=0;_<ItemPage.SpecNum;_++){if(ItemPage.PreloadSpecList[_]==null)break;for(_lVT=0;_lVT<ItemPage.PreloadSpecList[_].length;_lVT++){_A=IP_GetIndexSpecValue(ItemPage.PreloadSpecList[_][_lVT]);if(_A<0)continue;if(ItemPage.SpecValueData[_A][2]!=_)continue;if(_e[_]==null)_e[_]=[];_e[_].push(_A);}ItemPage.PreloadSpecList[_]=null;if(_e[_]==null)break;_L++;}if(_L==ItemPage.SpecNum&&ItemPage.PreloadStyleIDList!=null){for(_lVT=0;_lVT<ItemPage.PreloadStyleIDList.length;_lVT++){_A=IP_GetIndexStyle(ItemPage.PreloadStyleIDList[_lVT]);if(_A<0)continue;if(!(ItemPage.StyleData[_A][1]&0x01))continue;if(_shl==null)_shl=[];_shl.push(_A);}}if(_L){var _L6;if(_L>1){_L6=[];for(_=0;_<_e[0].length;_++){IP_PreSelectSetupGrabSpecs(_L6,_e,1,[_e[0][_]]);}}else {_L6=[_e[0]];}if(_L==ItemPage.SpecNum&&_shl!=null&&_L6.length){ItemPage.StyleID=0;var _D,_E;var _N;MainLoop:for(_=0;_<_L6.length;_++){_N=ItemPage.SpecValueData[_L6[_][_L-1]][4];for(_lVT=0;_lVT<_N.length;_lVT++){for(_D=0;_D<_shl.length;_D++){if(_N[_lVT]==_shl[_D]){ItemPage.StyleID=ItemPage.StyleData[_shl[_D]][0];for(x=0;x<_L;x++){ItemPage.PreloadSpecs[x]=_L6[_][x];}break MainLoop;}}}}if(ItemPage.StyleID)return ;}if(_L6.length){for(_=0;_<_L;_++){ItemPage.PreloadSpecs[_]=_L6[0][_];}}}}if(!ItemPage.StyleID&&ItemPage.PreloadStyleIDList!=null){for(_lVT=0;_lVT<ItemPage.PreloadStyleIDList.length;_lVT++){_A=IP_GetIndexStyle(ItemPage.PreloadStyleIDList[_lVT]);if(_A<0)continue;if(!(ItemPage.StyleData[_A][1]&0x01))continue;ItemPage.StyleID=ItemPage.PreloadStyleIDList[_lVT];break;}}ItemPage.PreloadStyleIDList=null;}function IP_PreSelectSetupGrabSpecs(_O7,_Jw,_J,_N){if(!_J)return ;if(_Jw[_J]==null)return ;var _OLw,_q4d;var _C3,_v;if(_J==ItemPage.SpecNum-1||_Jw[_J+1]==null){if(_J==1){for(_OLw=0;_OLw<_Jw[_J].length;_OLw++){_v=_Jw[_J][_OLw];_C3=ItemPage.SpecValueData[_N[0]][3];for(_q4d=0;_q4d<_C3.length;_q4d++){if(_C3[_q4d]==_v)_O7.push([_N[0],_v]);}}return ;}if(_J==2){return ;}return ;}if(_J==1){for(_OLw=0;_OLw<_Jw[_J].length;_OLw++){_v=_Jw[_J][_OLw];_C3=ItemPage.SpecValueData[_v][3];for(_q4d=0;_q4d<_C3.length;_q4d++){if(_C3[_q4d][0]==_N[0]){IP_PreSelectSetupGrabSpecs(_O7,_Jw,_J+1,[_N[0],_v]);}}}return ;}var _q;for(_OLw=0;_OLw<_Jw[_J].length;_OLw++){_v=_Jw[_J][_OLw];_C3=ItemPage.SpecValueData[_v][3];for(_q4d=0;_q4d<_C3.length;_q4d++){if(_C3[_q4d][0]==_N[0]){for(_q=1;_q<_C3[_q4d].length;_q++){if(_C3[_q4d][_q][0]==_N[1]){IP_PreSelectSetupGrabSpecs(_O7,_Jw,_J+1,[_N[0],_N[1],_v]);}}}}}}function IP_Error(_rv){if(ip_flags&0x20000000)return ;var _y;var _d,_;switch(_rv){case 0:IP_DisplayErrorMessage('There seems to be a problem with your internet connection.'+' Please refresh the page when this problem has been corrected.');break;case 1:IP_DisplayErrorMessage('Internal server error!');break;case 2:IP_DisplayErrorMessage('Please wait for the page to load.');break;case 80:case 81:_d=0;for(q=0;q<ItemPage.SpecNum;q++){if(ItemPage.SpecValueIndices[q]==-1){_y=PrependAOrAn(ItemPage.SpecData[q][1]);_d=q+2;break;}}if(!_d&&(ItemPageStatic.StylesControlFlags&0x01)){if(ItemPage.CurStyleIndex==-1){_y=PrependAOrAn(ItemPage.Name_Styles);_d=1;}}if(_d){_y='You have not selected '+_y+'.'+' Please pick '+_y+' and try again.';}else {_y='Unknown page error. Please refresh the page before proceeding.';}IP_DisplayErrorMessage(_y);if(_d){_=0;if(_d==1){curfieldname=Pgit8Wo;_=1;}else {curfieldname=PgitOWk+(_d-2);_=1;}if(_)setTimeout('ItemPage.BuyBoxForm.elements[\''+curfieldname+'\'].focus();',10);}break;case 82:IP_DisplayErrorMessage('You have not entered a valid quantity.'+' You must enter a value between 1 and 99 before you can add this item to your cart.');break;case 84:case 85:_y='The currently selected item is not onsite and could not be added to '+((_rv==84)?'your cart':'your wish list')+'.';IP_DisplayErrorMessage(_y);break;case 100:IP_DisplayErrorMessage('This function is not yet supported.');break;case 101:IP_DisplayErrorMessage('The page is currently loading new data. Please wait a moment to proceed.');break;default:_y='';switch(_rv){case -2:_y='IP_Initialize';break;case -3:_y='IP_ReceiveData';break;case -5:_y='IP_SpecDDChange';break;case -6:_y='IP_StyleDDChange';break;}if(_y!='')IP_DisplayErrorMessage('Unknown data error from: '+_y+'. Please refresh the page.');else IP_DisplayErrorMessage('Unknown data error from: '+_y+'. Please refresh the page.');}}function IP_DisplayErrorMessage(_R){if(ip_flags&0x20000000)return ;DHTML_Alert(_R,'Alert!',1,0,{timeout:10000});}function IP_DisplayStyleSet(_W){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(ItemPage.CurDisplayStyleIndex==_W||_W>=ItemPage.StyleNum)return ;var _,_Y,_ADS;PgitR.LastIndices[1]=_W;if(_W>=0){if(!(ItemPage.PageFlags&0x01)&&!(ItemPage.StyleData[_W][1]&0x02))return ;}if(!(ItemPage.Settings.OVFlags&0x02)){ItemPage.CurImageNum=0;if(_W>=0){_Y=ItemPage.StyleData[_W][5];ItemPage.CurImageNum=ItemPage.StyleData[_W][6];for(_=0;_<ItemPage.CurImageNum;_++){ItemPage.CurImageIndexList[_]=_+_Y;ItemPage.CurImageData[_]=ItemPage.ImageData[_+_Y];}}for(_=0;_<ItemPage.ImageNumBase;_++){ItemPage.CurImageIndexList[ItemPage.CurImageNum]=_;ItemPage.CurImageData[ItemPage.CurImageNum++]=ItemPage.ImageData[_];}ItemPage.CurImageIndex=-2;IP_MainImageSet(0);IP_OtherViewsBuild();}else if(_W>=0){_Y=1;if(ItemPage.CurImageIndex!=-1){if(ItemPage.CurImageData[ItemPage.CurImageIndex][11]==_W)_Y=0;}if(_Y){_Y=-1;for(_=0;_<ItemPage.CurImageNum;_++){if(ItemPage.CurImageData[_][11]==_W){_Y=_;break;}}if(_Y>=0)IP_MainImageSet(_Y);}}IP_SwatchSetActive(_W);if(ItemPage.Events.SetDisplayStyle!='')SmartEval(ItemPage.Events.SetDisplayStyle,_W+','+ItemPage.CurDisplayStyleIndex);IP_StyleTextUpdate(0,_W,ItemPage.CurDisplayStyleIndex);ItemPage.CurDisplayStyleIndex=_W;}function IP_StyleTextUpdate(_G6,_H,_){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;var _n;if(ItemPage.Settings.StyleShownList==null)_n=0;else _n=ItemPage.Settings.StyleShownList.length;if(!_n)return ;if(_H>=ItemPage.StyleNum)_H=-1;var _RNt,__Qv,_S3l,_B9x,_6;var _C=_G6<<8;var _fcv;if(_H>=0)_fcv=ItemPage.StyleData[_H];for(_B9x=0;_B9x<_n;_B9x++){_S3l=ItemPage.Settings.StyleShownList[_B9x];if((_S3l[2]&0x0300)==_C){if(_H==-1&&_S3l[2]&0x20&&_S3l[1]!=''){SetVisible(_S3l[1],0);}else {__Qv='';if(_H==-1){if(_G6==2){if(ItemPage.CurImageIndex>=0)__Qv=ItemPage.Settings.StyleShownImageNoColor;else __Qv=ItemPage.Settings.StyleShownOff;}else {__Qv=ItemPage.Settings.StyleShownOff;}}else {_RNt='';if(_S3l[2]&0x01){if(_RNt!='')_RNt+=' ';_RNt+=_fcv[4];}if(_S3l[2]&0x02){if(_RNt!='')_RNt+=' ';if(!(_S3l[2]&0x04)&&_fcv[3]!='')_RNt+=_fcv[3];else _RNt+=_fcv[2];}__Qv=FormFix(_RNt);}SetContent(_S3l[0],__Qv);if(_S3l[2]&0x30&&_S3l[1]!=''){if(_<0)SetVisible(_S3l[1],1,(_S3l[2]>>4)&0x03);else if(_>=0&&_H<0)SetVisible(_S3l[1],0,(_S3l[2]>>4)&0x03);}}}}}function IP_MainImageSet(_EyQ){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(ItemPage.CurImageIndex==_EyQ)return ;var _eIy=-1;var _FQ=ItemPage.CurImageData[_EyQ];var _;var _fKt=ItemPage.CurImageFlags;if(ItemPage.CurImageIndex>=0)_eIy=ItemPage.CurImageData[ItemPage.CurImageIndex][11];ItemPage.CurImageFlags=0;Zoom_DeInitializeImage(IPSharedData.ZoomIndex);_=GP(ItemPage.ID_MainImage);_.src=SiteDotImage;if(!ItemPage.CurImageNum){_.width=ItemPage.DummyImages[0][1];_.height=ItemPage.DummyImages[0][2];_.src=IP_IMAGEROOTDIRECTORY+'images/items/'+ItemPage.DummyImages[0][0];ip_flags&=~0x06;if(ItemPage.Events.SetImage!='')SmartEval(ItemPage.Events.SetImage,'-1 ,'+ItemPage.CurImageIndex+','+ItemPage.CurImageFlags+', 0');ItemPage.CurImageIndex=-1;_=null;IP_StyleTextUpdate(2,-1,_eIy);return ;}var _fD;if(_FQ[1]==''){_.width=ItemPage.DummyImages[0][1];_.height=ItemPage.DummyImages[0][2];_.src=IP_IMAGEROOTDIRECTORY+'images/items/'+ItemPage.DummyImages[0][0];}else {_.width=_FQ[2];_.height=_FQ[3];_.src=ItemPage.Dir_Main+_FQ[1];}_=null;if(_FQ[7]!=''&&_FQ[8]){if(IPSharedData.ZoomIndex!=-1){ip_zoomobject.MainImageWid=_FQ[2];ip_zoomobject.MainImageHei=_FQ[3];ip_zoomobject.ZoomImageURL=ItemPage.Dir_Zoom+_FQ[7];ip_zoomobject.ZoomImageWid=_FQ[8];ip_zoomobject.ZoomImageHei=_FQ[9];_fD=ItemPage.Settings.ZoomViewPortWid;if(ip_zoomobject.ZoomImageWid<_fD&&ItemPage.Settings.ZoomFlags&0x01)_fD=ip_zoomobject.ZoomImageWid;ip_zoomobject.ViewPortWid=_fD;_fD=ItemPage.Settings.ZoomViewPortHei;if(ip_zoomobject.ZoomImageHei<_fD&&ItemPage.Settings.ZoomFlags&0x02)_fD=ip_zoomobject.ZoomImageHei;ip_zoomobject.ViewPortHei=_fD;if(ItemPage.PageFlags&0x10000000){if(ip_wmwindow.Options&0x10)ip_zoomobject.Relative=ip_wmwindow.WindowContentCustom;else ip_zoomobject.Relative=ip_wmwindow.WindowContent;}Zoom_InitializeImage(IPSharedData.ZoomIndex);ItemPage.CurImageFlags|=0x01;ip_flags|=0x02;}}else if(ip_flags&0x02){ItemPage.CurImageFlags&=~0x01;ip_flags&=~0x02;}if(_FQ[5]!=''){ItemPage.CurImageFlags|=0x02;ip_flags|=0x04;}else {ItemPage.CurImageFlags&=~0x02;ip_flags&=~0x04;}if(ItemPage.Settings.NVFlags&0x01){var _Gdh='';if(_EyQ<0){_Gdh=ItemPage.Settings.NVEmptyContent;}else if(ItemPage.Callbacks.NVContent!=''){_Gdh=SmartEval(ItemPage.Callbacks.NVContent,_EyQ);}else if(_FQ[10]>-1){if(ItemPage.Settings.NVImageIndex>=0&&ItemPageStatic.DeptsItemsControlFlags&0x10){_fD=ItemPage.Settings.NVImageIndex*3;_=ItemPage.ViewImageData[_FQ[10]];if(_[_fD]!=''){_Gdh='<img src="';if(ItemPage.Settings.NVFlags&0x20)_Gdh+=PathFormFix(FileExtAppend(_[_fD],'on'));else _Gdh+=PathFormFix(_[_fD]);_Gdh+='"'+' width="'+_[_fD+1]+'"'+' height="'+_[_fD+2]+'"'+' alt="'+FormFix(ItemPage.ViewData[_FQ[10]][1])+'"'+' title="'+FormFix(ItemPage.ViewData[_FQ[10]][1])+'"'+' />';}}if(_Gdh==''){if(ItemPageStatic.DeptsItemsControlFlags&0x10)_Gdh=FormFix(ItemPage.ViewData[_FQ[10]][1]);if(ItemPage.Settings.NVFlags&0x10){if(ItemPageStatic.DeptsItemsControlFlags&0x10)_Gdh+=' in ';if(_FQ[11]>-1){_Gdh+=FormFix(ItemPage.StyleData[_FQ[11]][(ItemPage.StyleData[_FQ[11]][3]!='')?3:2]);}else {_Gdh+=ItemPage.Settings.StyleShownImageNoColor;}}}}else {if(_FQ[12]!='')_Gdh=FormFix(_FQ[12]);else if(_FQ[11]>=0)_Gdh=FormFix(ItemPage.StyleData[_FQ[11]][(ItemPage.StyleData[_FQ[11]][3]!='')?3:2]);}SetContent(Pgita,_Gdh);if((_EyQ<0&&ItemPage.Settings.NVFlags&0x02)||(ItemPage.CurImageNum==1&&ItemPage.Settings.NVFlags&0x08)){_fD=0;}else {_fD=0x80;}if((_fD^ip_flags)&0x80){SetVisible(Pgit9An,_fD?1:0);ip_flags^=0x80;}}IP_StyleTextUpdate(2,_FQ[11],_eIy);if(ItemPage.Settings.OVFlags&0x02)ItemPage.CurDisplayStyleIndex=_FQ[11];if(ItemPage.Events.SetImage!='')SmartEval(ItemPage.Events.SetImage,_EyQ+','+ItemPage.CurImageIndex+','+ItemPage.CurImageFlags+','+_fKt);IP_OtherViewsSetActive(_EyQ);ItemPage.CurImageIndex=_EyQ;}function IP_SetChildID(_){if(!(ip_flags&0x08)||(ip_flags&0x20000000)||(ItemPageStatic.ItemsControlFlags&0x01))return ;if(_==ItemPage.ChildID)return ;var _tN=ItemPage.ChildID;ItemPage.ChildID=_;if(!_)ItemPage.CurChildData=null;if(ItemPageStatic.ItemsControlFlags&0x080000&&ItemPage.Settings.ACCFlags&0x01)IP_AccessoriesListUpdate();if(ItemPage.Settings.DisplayFlags&0x04){var _KcH;if(!_){_KcH=(ItemPage.PageFlags&0x04)?ItemPage.DefaultPriceStringSale:ItemPage.DefaultPriceString;}else if(ItemPage.Callbacks.PriceContent!=''){_KcH=SmartEval(ItemPage.Callbacks.PriceContent,'');}else {_KcH=FormFix(FormatMoney(ItemPage.CurChildData.Price,1));}SetContent('IPItemPricePrice',_KcH);}if(ItemPage.Events.ChildIDChange!='')SmartEval(ItemPage.Events.ChildIDChange,_+', '+_tN);}function IP_RequestChildData(){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;var _nZ,_Y,_z,_W,_aq;PgitR.LastIndices[0]=-1;var _qM9;_W=0;if(ItemPage.SpecNum){for(_Y=0;_Y<ItemPage.SpecNum;_Y++){if(_W){_qM9=IP_GetSharedResults(_qM9,ItemPage.SpecValueData[ItemPage.SpecValueIndices[_Y]][5]);}else {_qM9=ItemPage.SpecValueData[ItemPage.SpecValueIndices[_Y]][5];}_W++;}}if(ItemPageStatic.StylesControlFlags&0x01){if(_W)_qM9=IP_GetSharedResults(_qM9,ItemPage.StyleData[ItemPage.CurStyleIndex][7]);else _qM9=ItemPage.StyleData[ItemPage.CurStyleIndex][7];_W++;}if(!_W)_qM9=[ItemPage.ChildTieData[0][0]];if(_qM9.length==1){var _V=IP_ChildDataGetByID(_qM9[0]);if(_V>=0){ItemPage.CurChildData=IPSharedData.CachedChildData[_V];if(ItemPage.CurChildData.AccessoryNum==-1&&ItemPageStatic.ItemsControlFlags&0x080000&&ItemPage.Settings.ACCFlags&0x01){PgitR.LastIndices[0]=IP_IntComCall(12,'childid='+_qM9[0]+'&flags=4','IP_IntComChildData');}else {IP_SetChildID(_qM9[0]);}return ;}ItemPage.CurChildData=null;_Y=(ItemPageStatic.ItemsControlFlags&0x080000&&ItemPage.Settings.ACCFlags&0x01)?0x07:0x03;PgitR.LastIndices[0]=IP_IntComCall(12,'childid='+_qM9[0]+'&flags='+_Y,'IP_IntComChildData');return ;}DHTML_Alert('An internal data error caused the page to fail! Unable to proceed!','INTERNAL DATA ERROR!',1,0);return ;}function IP_IntComCall(_3to,_,_R){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return -1;DHTML_IntComRequest(IP_INTCOMROOTDIRECTORY+IP_INTCOM_SCRIPT,_3to,PgitR.SharedIntCom+'&'+_,_R,{flags:0x01,timeoutval:Pgit76,ondataerror:'IP_IntComError'});IP_IntComToggle(DHTML_IntComLastIndex,true);return DHTML_IntComLastIndex;}function IP_IntComToggle(_C,_XP_){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;var _M,_5a;if(_XP_){if(!PgitR.IntComNumInUse&&ItemPage.Events.IntComStart=='')SmartEval(ItemPage.Events.IntComStart,'');_5a=PgitR.IntComIndexList.length;if(PgitR.IntComNumInUse){for(_M=0;_M<PgitR.IntComIndexList.length;_M++){if(PgitR.IntComIndexList[_M]<0){_5a=_M;break;}}}PgitR.IntComIndexList[_5a]=_C;PgitR.IntComNumInUse++;ip_flags|=0x10;return ;}if(!PgitR.IntComNumInUse)return ;for(_M=0;_M<PgitR.IntComIndexList.length;_M++){if(PgitR.IntComIndexList[_M]==_C){PgitR.IntComIndexList[_M]=-1;PgitR.IntComNumInUse--;break;}}if(!PgitR.IntComNumInUse){ip_flags&=~0x10;if(ItemPage.Events.IntComEnd=='')SmartEval(ItemPage.Events.IntComEnd,'');}}function IP_IntComError(_PN7){IP_IntComToggle(_PN7,false);if(!(ip_flags&0x08)||(ip_flags&0x20000000))return false;return true;}function IP_IntComAddToCart(_R){IP_IntComToggle(_R,false);if(ItemPage.PageFlags&0x02||!(ip_flags&0x08)||(ip_flags&0x20000000))return ;var _1=DHTML_IntComData[_R].ResponseData;if(_1[0]!='1'){if(_1[0]=='0'){DHTML_Alert('Adding to the cart failed because:<br />'+_1[1],'Failed to Add to Cart!',1,0,{timeout:5000});}else {DHTML_Alert('Adding to the cart failed because of an unknown error!','Failed to Add to Cart!',1,0,{timeout:5000});}return ;}if(!(ItemPage.PageFlags&0x40)){DCart_ParseFullList(_1[4]);}else {DHTML_Alert(_1[4],'Added to the Cart!',0,0,{timeout:5000});}if(ItemPage.Events.AddToCartComplete!='')SmartEval(ItemPage.Events.AddToCartComplete,'');}function IP_IntComAddToWishlist(_rb){IP_IntComToggle(_rb,false);if(ItemPage.PageFlags&0x02||!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(_rb!=PgitR.LastIndices[7])return ;PgitR.LastIndices[7]=-1;var _jQx=DHTML_IntComData[_rb];var _Gy1=(_jQx.ResponseData[0]=='1');var _4='';var _7p1='';if(_Gy1){_7p1='Item added to Wish List...';_4+='<div class="IPIARCWLSuccess">'+'<div class="IPIARCWLSuccessTitle">'+'<span>... has been added to your Wish List.</span>'+'</div>'+'</div>';}else {_7p1='Oops! Item not added to Wish List...';_4+='<div class="IPIARCWLError">'+'<div class="IPIARCWLErrorTitle">'+'<span>... was not added to your Wish List!</span>'+'</div>'+'<div class="IPIARCWLErrorInner">'+_jQx.ResponseData[1]+'</div>'+'</div>';}IP_ItemAddedRelay(PgitR.ExtraValues[7],_Gy1?0:0x01,_7p1,_4,SiteRootDirectory+'wishlist'+SiteScriptingExt,'GoToWishList','Go to Your Wish List');}function IP_IntComGetRegistryList(_V){IP_IntComToggle(_V,false);if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;var _aAS=DHTML_IntComData[_V].ResponseData;var _=Cast(_aAS[1],CAST_INT);IPSharedData.RegistryNum=Cast(_aAS[3],CAST_INT);if(IPSharedData.RegistryNum){var _Jv,_9a=4,_G;IPSharedData.RegistryList=[];for(_Jv=0;_Jv<IPSharedData.RegistryNum;_Jv++){_G=_aAS[_9a++].split(DHTMLINTCOM_SEPARATOR1);IPSharedData.RegistryList[_Jv]=[Cast(_G[0],CAST_INT),_G[1],0];}}IP_AddToRegistryInner(_);}function IP_IntComAddToRegistry(_){IP_IntComToggle(_,false);if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;var _a2f=DHTML_IntComData[_].ResponseData;var _A9B=Cast(_a2f[1],CAST_INT),_537=Cast(_a2f[3],CAST_INT);var _NXu,_m9m='',_P5='',_QR='',_S='',_KyU='';if(_537<=0){_NXu=false;_P5+='<div class="IPIARCRegUnknownError">'+'<div class="IPIARCRegUnknownErrorTitle">'+'<span>... had an unknown error occur from the Registry.</span>'+'</div>'+'<div class="IPIARCRegUnknownErrorInner">'+'Please try reloading the page and trying again.'+' If this does not solve the problem, please submit a website glitch report.'+'</div>'+'</div>';}else {var _1='',_O='',_N=0,_s=0;var _QE,_U,_gh=_a2f[4].split(DHTMLINTCOM_SEPARATOR1),curpnt;for(_QE=0;_QE<_537;_QE++){_U=Cast(_gh[_QE],CAST_INT);if(_U==3)continue;curpnt=IPSharedData.RegistryList[_QE];if(_U){_O+='<li'+(_s?'':' class="First"')+'>'+FormFix(curpnt[1])+' (Qty: '+curpnt[2]+')'+'<div class="IPIARCREIExtraText">'+'To go to '+FormFix(curpnt[1])+' and change the quantity of this item,'+' <a href="'+FormFix(SiteRootDirectory+'registry'+SiteScriptingExt+'?function=8&registryid='+curpnt[0])+'">please click here</a>'+'.'+'</div>'+'</li>';_s++;}else {_1+='<li'+(_N?'':' class="First"')+'>'+FormFix(curpnt[1])+' (Qty: '+curpnt[2]+')'+'</li>';_N++;}}if(!_s){_m9m='Success!';}else if(!_N){_m9m='Item already in '+((_s==1)?'Registry':'Registries')+'!';}else {if(_N==1)_m9m='Item added to one Registry...';else _m9m='Item added to some Registries...';}if(_N){if(_N==1){_P5+='<div class="IPIARCRegSuccess">'+'<div class="IPIARCRegSuccessTitle">'+'<span>... has been added to this Registry:</span>'+'</div>'+'<div class="IPIARCRegSuccessInner">';}else {_P5+='<div class="IPIARCRegsSuccess">'+'<div class="IPIARCRegsSuccessTitle">'+'<span>... has been added to these Registries:</span>'+'</div>'+'<div class="IPIARCRegsSuccessInner">';}_P5+='<ul>'+_1+'</ul>'+'</div></div>';if(_s){_P5+='<div class="IPIARCRegSuccessFailSeparator">'+'<img src="'+SiteDotImage+'" width="1" height="1" alt="" />'+'</div>';}}if(_s){if(_s==1){_P5+='<div class="IPIARCRegError">'+'<div class="IPIARCRegErrorTitle">'+'<span>... is already in this Registry:</span>'+'</div>'+'<div class="IPIARCRegErrorInner">';}else {_P5+='<div class="IPIARCRegsError">'+'<div class="IPIARCRegsErrorTitle">'+'<span>... is already in these Registries:</span>'+'</div>'+'<div class="IPIARCRegsErrorInner">';}_P5+='<ul>'+_O+'</ul>'+'</div></div>';}if(_537==1){_QR=SiteRootDirectory+'registry'+SiteScriptingExt+'?function=8&registryid='+IPSharedData.RegistryList[0][0];_S='GoToReg';_KyU='Go to your registry';}else {_QR=SiteRootDirectory+'registry'+SiteScriptingExt+'?function=1';_S='GoToRegs';_KyU='Go to your registries';}_NXu=_N?true:false;}IP_ItemAddedRelay(_A9B,_NXu?0:0x01,_m9m,_P5,_QR,_S,_KyU);}function IP_IntComChildData(_b){IP_IntComToggle(_b,false);if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;var _SUT=DHTML_IntComData[_b].ResponseData;var _4j=Cast(_SUT[1],CAST_INT);var _=Cast(_SUT[2],CAST_INT);var _Uzk=Cast(_SUT[3],CAST_INT);var _u=Cast(_SUT[4],CAST_INT);var _O8S=5;var _eB,_h;var _j='';_eB=IP_ChildDataGetByID(_4j);if(_eB>=0){_h=IPSharedData.CachedChildData[_eB];}else {_h=new IP_ChildDataObject();_h.ID=_4j;_h.ItemID=_Uzk;_h.StyleID=_u;}if(_&0x01){_h.ParentName=Cast(_SUT[_O8S++],CAST_STRING);_h.SKU=Cast(_SUT[_O8S++],CAST_STRING);_h.Onsite=Cast(_SUT[_O8S++],CAST_INT);_h.Flags=Cast(_SUT[_O8S++],CAST_INT);_h.Price=Cast(_SUT[_O8S++],CAST_INT);_h.PriceOrig=Cast(_SUT[_O8S++],CAST_INT);_h.MSRP=Cast(_SUT[_O8S++],CAST_INT);_h.Quantity=Cast(_SUT[_O8S++],CAST_INT);_h.Name=Cast(_SUT[_O8S++],CAST_STRING);_h.StyleNumberOverride=Cast(_SUT[_O8S++],CAST_STRING);_h.Description=Cast(_SUT[_O8S++],CAST_STRING);}if(_&0x02){_h.ImageThumb=Cast(_SUT[_O8S++],CAST_STRING);_h.ImageThumbWid=Cast(_SUT[_O8S++],CAST_INT);_h.ImageThumbHei=Cast(_SUT[_O8S++],CAST_INT);}if(_&0x04){if(_b==PgitR.LastIndices[0]&&_Uzk==ItemPage.ItemID&&ItemPageStatic.ItemsControlFlags&0x080000&&ItemPage.Settings.ACCFlags&0x01){_j=_SUT[_O8S];}_O8S++;}if(_eB<0)_eB=IP_ChildDataAdd(_h);if(_b==PgitR.LastIndices[0]){PgitR.LastIndices[0]=-1;ItemPage.CurChildData=_h;if(_&0x04&&ItemPageStatic.ItemsControlFlags&0x080000&&ItemPage.Settings.ACCFlags&0x01)IP_AccessoryListImport(_j);IP_SetChildID(_4j);}else if(_b==PgitR.LastIndices[5]){PgitR.LastIndices[5]=-1;IP_ItemAddedDisplay(_eB,PgitR.ExtraValues[8],PgitR.ExtraValues[9],PgitR.ExtraValues[10],PgitR.ExtraValues[11],PgitR.ExtraValues[12],PgitR.ExtraValues[13]);}else if(_b==PgitR.LastIndices[6]){PgitR.LastIndices[6]=-1;IP_AddToRegistryInner(_4j);}}function IP_IntComTechnologyData(_F){IP_IntComToggle(_F,false);if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(_F!=PgitR.LastIndices[4])return ;PgitR.LastIndices[4]=-1;var _=DHTML_IntComData[_F].ResponseData;var _Fj=IPSharedData.TechNum;IPSharedData.TechData[_Fj]=[Cast(_[1],CAST_INT),_[2],_[3],-1,0];IPSharedData.TechNum++;var _lZ=Cast(_[4],CAST_INT);if(_lZ){var _Rj4=IPSharedData.TechData[_Fj];var _V,_2U,_FGw;_Rj4[3]=IPSharedData.TechImageNum;_Rj4[4]=_lZ;_FGw=_[5].split('&');for(_V=0,_2U=0;_V<_lZ;_V++,_2U+=4){IPSharedData.TechImageData[IPSharedData.TechImageNum++]=[unescape(_FGw[_2U]),Cast(_FGw[_2U+1],CAST_INT),Cast(_FGw[_2U+2],CAST_INT),unescape(_FGw[_2U+3])];}}IP_TechnologyDisplay(_Fj);}function IP_AccessoryListImport(_to2){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(!ItemPage.AccessoryNum){ItemPage.CurChildData.AccessoryNum=0;return ;}if(ItemPage.CurChildData==null)return ;if(_to2==''||!(ItemPageStatic.ItemsControlFlags&0x080000)||!(ItemPage.Settings.ACCFlags&0x01)){ItemPage.CurChildData.AccessoryNum=0;return ;}var _7,_,_my,_SDN,_t,_xm;ItemPage.CurChildData.AccessoryNum=0;ItemPage.CurChildData.AccessoryList=[];if(_to2!=''){_to2=','+_to2+',';}for(_my=0;_my<ItemPage.AccessoryNum;_my++){_SDN=0;if(!(ItemPage.AccessoryData[_my][1]&0x01)){_SDN=0;}else if(_to2!=''){if(_to2.indexOf(','+ItemPage.AccessoryData[_my][0]+',')>-1)_SDN=1;}if(_SDN)ItemPage.CurChildData.AccessoryList[ItemPage.CurChildData.AccessoryNum++]=_my;}}function IP_AccessoriesListUpdate(){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(!(ItemPageStatic.ItemsControlFlags&0x080000)||!(ItemPage.Settings.ACCFlags&0x01))return ;if(!ItemPage.AccessoryNum)return ;var _;if(ItemPage.Settings.ACCFlags&0x0100)IP_AccessoriesPopupHide();if(!(ItemPage.Settings.ACCFlags&0x10000000)){var _H,_7Gk;if(ItemPage.Settings.ACCShowExtraIDs!=''){_H=ItemPage.Settings.ACCShowExtraIDs.split(',');for(_=0;_<_H.length;_++){ItemPage.Settings.ACCShowList[_]=_H[_];}}if(ItemPage.Settings.ACCHideExtraIDs!=''){_H=ItemPage.Settings.ACCHideExtraIDs.split(',');for(_=0;_<_H.length;_++){ItemPage.Settings.ACCHideList[_]=_H[_];}}if(ItemPage.Settings.ACCFlags&0x10){if(ItemPage.Settings.ACCFlags&0x20)ItemPage.Settings.ACCColumnFormat=[0,1];else ItemPage.Settings.ACCColumnFormat=[1,0];}else {ItemPage.Settings.ACCColumnFormat=[0];}ItemPage.Settings.ACCFlags|=0x10000000;}_=1;if(ItemPage.ChildID&&ItemPage.CurChildData!=null){if((ItemPage.CurChildData.AccessoryList==null||!ItemPage.CurChildData.AccessoryNum)&&!(PgitR.Flags&0x01))_=0;}else {_=0;}if(!_){if(ip_flags&0x20)IP_AccessoriesSetVisible(0);return ;}var _f3X='',_Ai=0;_f3X='<input type="hidden" name="numaccessories" value="'+ItemPage.CurChildData.AccessoryNum+'" />';_f3X+='<table width="'+ItemPage.Settings.ACCTableWid+'">';for(_=0;_<ItemPage.CurChildData.AccessoryNum;_++){_f3X+=IP_ALU_AddAccessory(ItemPage.CurChildData.AccessoryList[_],_Ai);_Ai++;}if(PgitR.Flags&0x01){for(_=0;_<ItemPage.AccessoryNum;_++){if(!(ItemPage.AccessoryData[_][1]&0x01)){_f3X+=IP_ALU_AddAccessory(_,_Ai);_Ai++;}}}_f3X+='</table>';SetContent(PgitIse,_f3X);IP_AccessoriesSetVisible(1);if(ItemPage.Settings.ACCFlags&0x08&&ItemPage.Settings.ACCScrollerID>=0){if(ItemPage.Settings.ACCInnerMaxHei){var _fv=GetHei(PgitIse);if(_fv>ItemPage.Settings.ACCInnerMaxHei)_fv=ItemPage.Settings.ACCInnerMaxHei;SetHei(PgitGsO,_fv);}Scroller_ReInitialize(ItemPage.Settings.ACCScrollerID);}if(ItemPage.Events.AccessoriesReDraw!='')SmartEval(ItemPage.Events.AccessoriesReDraw,'');}function IP_ALU_AddAccessory(_3,_SNa){var _yux,_L,_D;var _,_p,_lhQ;var _4Mv='';curpnt=ItemPage.AccessoryData[_3];if(_SNa&&ItemPage.Settings.ACCFlags&0x04){_4Mv+='<tr>'+'<td colspan="'+ItemPage.Settings.ACCColumnFormat.length+'" class="IPIACSeparator">'+'<div class="IPIACSInner"><img src="'+SiteDotImage+'" width="1" height="1" alt="" /></div>'+'</td>'+'</tr>';}_4Mv+='<tr id="'+Pgitb1L+_SNa+'" class="IPIACRow'+(_SNa&0x01)+'"'+' onmouseover="SmartMouse(event, this, \'IP_AccessoriesRowMO('+_SNa+', '+_3+', 1);\', 1);"'+' onmouseout="SmartMouse(event, this, \'IP_AccessoriesRowMO('+_SNa+', '+_3+', 0);\', 0);"'+' onclick="IP_AccessoriesRowClick('+_SNa+', '+_3+');"'+' valign="top">';for(_L=0;_L<ItemPage.Settings.ACCColumnFormat.length;_L++){switch(ItemPage.Settings.ACCColumnFormat[_L]){case 0:_4Mv+='<td class="IPIACContentCell" width="100%">'+'<input type="hidden" name="'+Pgituia+_SNa+'" value="'+curpnt[0]+'" />';_4Mv+='<div class="IPIACName">'+'<a href="javascript: IP_AccessoriesNameClick('+_SNa+', '+_3+');">';if(ItemPage.Callbacks.ACCItemName!=''){_4Mv+=SmartEval(ItemPage.Callbacks.ACCItemName,_3);}else {_4Mv+=FormFix(curpnt[8]);if(curpnt[10]!='')_4Mv+=' <span class="IPIACNameList">('+FormFix(curpnt[10])+')</span>';}_4Mv+='</a></div>';_4Mv+='<div class="IPIACExtras">';if(ItemPage.Callbacks.ACCItemExtra!='')_4Mv+=SmartEval(ItemPage.Callbacks.ACCItemExtra,_3);else _4Mv+='- '+FormatMoney(curpnt[5],1);_4Mv+='</div>';_4Mv+='<div class="IPIACLinks">';_4Mv+='<div class="IPIACDD">'+'<select name="'+PgitUA+_SNa+'">';for(_D=0;_D<=20;_D++){_4Mv+='<option value="'+_D+'"';if(!_D)_4Mv+=' selected="selected"';_4Mv+='>'+_D+'</option>';}_4Mv+='</select>'+'</div>';if(!(ItemPage.PageFlags&0x02)){_4Mv+='<div class="IPIACAddToCart">'+'<a'+' href="javascript: IP_AccessoriesATCClick('+_SNa+', '+_3+');"'+' onmouseover="SmartMouse(event, this, \'IP_AccessoriesATCMO('+_SNa+', '+_3+', 1);\', 1);"'+' onmouseout="SmartMouse(event, this, \'IP_AccessoriesATCMO('+_SNa+', '+_3+', 0);\', 0);"'+'>';if(ItemPage.Settings.ACCATCImage!=''){_4Mv+='<img src="'+PathFormFix(ItemPage.Settings.ACCATCImage)+'"'+' width="'+ItemPage.Settings.ACCATCImageWid+'" height="'+ItemPage.Settings.ACCATCImageHei+'"'+' id="IPItemAccessoriesATC'+_SNa+'" alt="" />';}else {_4Mv+=ItemPage.Settings.ACCATCContent;}_4Mv+='</a>'+'</div>';}if(ItemPage.Settings.ACCFlags&0x02&&!(ItemPage.PageFlags&0x02)){_4Mv+='<div class="IPIACAddToWishList">'+ItemPage.Settings.ACCWLSeparator;if(ItemPage.Settings.ACCWLImage!=''){_4Mv+=GetImageHTML('javascript: IP_AccessoriesWLClick('+_SNa+', '+_3+');',ItemPage.Settings.ACCWLImage,ItemPage.Settings.ACCWLImageWid,ItemPage.Settings.ACCWLImageHei,'','',0x02);}else {_4Mv+='<a'+' href="javascript: IP_AccessoriesWLClick('+_SNa+', '+_3+');"'+'>'+ItemPage.Settings.ACCWLContent+'</a>';}_4Mv+='</div>';}if(ItemPage.Settings.ACCFlags&0x80&&!(ItemPage.PageFlags&0x02)){_4Mv+='<div class="IPIACAddToRegistry">'+ItemPage.Settings.ACCRegSeparator;if(ItemPage.Settings.ACCRegImage!=''){_4Mv+=GetImageHTML('javascript: IP_AccessoriesRegClick('+_SNa+', '+_3+');',ItemPage.Settings.ACCRegImage,ItemPage.Settings.ACCRegImageWid,ItemPage.Settings.ACCRegImageHei,'','',0x02);}else {_4Mv+='<a'+' href="javascript: IP_AccessoriesRegClick('+_SNa+', '+_3+');"'+'>'+ItemPage.Settings.ACCRegContent+'</a>';}_4Mv+='</div>';}_4Mv+='</div>';_4Mv+='</td>';break;case 1:_4Mv+='<td class="IPIACMiniThumbCell"';if(!(ItemPage.Settings.ACCFlags&0x0200)){_4Mv+=' onmouseover="SmartMouse(event, this, \'IP_AccessoriesMTMO('+_SNa+', '+_3+', 1);\', 1);"'+' onmouseout="SmartMouse(event, this, \'IP_AccessoriesMTMO('+_SNa+', '+_3+', 0);\', 0);"'+' onclick="IP_AccessoriesMTClick('+_SNa+', '+_3+');"';}_4Mv+='>';_=curpnt[Pgitrdl];if(_!=''){_p=curpnt[Pgitrdl+1];_lhQ=curpnt[Pgitrdl+2];}else {_=IP_IMAGEROOTDIRECTORY+'images/items/'+ItemPage.DummyImages[10][0];_p=ItemPage.DummyImages[10][1];_lhQ=ItemPage.DummyImages[10][2];}_4Mv+='<div id="IPItemAccessoriesMT'+_SNa+'" class="IPIACMiniThumb"';if(ItemPage.Settings.ACCFlags&0x0200){_4Mv+=' onmouseover="SmartMouse(event, this, \'IP_AccessoriesMTMO('+_SNa+', '+_3+', 1);\', 1);"'+' onmouseout="SmartMouse(event, this, \'IP_AccessoriesMTMO('+_SNa+', '+_3+', 0);\', 0);"'+' onclick="IP_AccessoriesMTClick('+_SNa+', '+_3+');"';}_4Mv+='>'+'<img src="'+PathFormFix(_)+'" width="'+_p+'" height="'+_lhQ+'" alt="" />'+'</div>';_4Mv+='</td>';break;}}_4Mv+='</tr>';return _4Mv;}function IP_AccessoriesSetVisible(_otX){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(_otX==((ip_flags&0x20)?1:0))return ;if(!ItemPage.AccessoryNum)return ;var _=_otX,_P=_otX?0:1,_ox;SetVisible(Pgitu,_);for(_ox=0;_ox<ItemPage.Settings.ACCShowList.length;_ox++){SetVisible(ItemPage.Settings.ACCShowList[_ox],_);}for(_ox=0;_ox<ItemPage.Settings.ACCHideList.length;_ox++){SetVisible(ItemPage.Settings.ACCHideList[_ox],_P);}if(ItemPage.Events.AccessoriesToggle!='')SmartEval(ItemPage.Events.AccessoriesToggle,_otX);if(_otX)ip_flags|=0x20;else ip_flags&=~0x20;}function IP_AccessoriesRowMO(_l,_74B,_wn){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(ItemPage.CurChildData==null)return ;if(_wn){SetClass(Pgitb1L+_l,'IPIACRow'+(_l&0x01)+' IPIACRowMO');if(_74B!=-1&&(ItemPage.Settings.ACCFlags&0x0300)==0x0100)IP_AccessoriesPopupShow(_l,_74B);}else {SetClass(Pgitb1L+_l,'IPIACRow'+(_l&0x01));if(_74B!=-1&&(ItemPage.Settings.ACCFlags&0x0300)==0x0100)IP_AccessoriesPopupHide();}if(ItemPage.Events.AccessoriesRowMO!='')SmartEval(ItemPage.Events.AccessoriesRowMO,_l+', '+_74B+', '+_wn);}function IP_AccessoriesRowClick(_,_0_){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(ItemPage.CurChildData==null)return ;}function IP_AccessoriesMTMO(_,_Y0k,_r){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(ItemPage.CurChildData==null)return ;if(_r){SetClass('IPItemAccessoriesMT'+_,'IPIACMiniThumbMO');if(_Y0k!=-1&&(ItemPage.Settings.ACCFlags&0x0300)==0x0300)IP_AccessoriesPopupShow(_,_Y0k);}else {SetClass('IPItemAccessoriesMT'+_,'IPIACMiniThumb');if(_Y0k!=-1&&(ItemPage.Settings.ACCFlags&0x0300)==0x0300)IP_AccessoriesPopupHide();}if(ItemPage.Events.AccessoriesThumbMO!='')SmartEval(ItemPage.Events.AccessoriesThumbMO,_+', '+_Y0k+', '+_r);}function IP_AccessoriesMTClick(_PK,_){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(ItemPage.CurChildData==null)return ;IP_ItemQuickDetails(ItemPage.AccessoryData[_][0]);}function IP_AccessoriesNameClick(_,_N){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(ItemPage.CurChildData==null)return ;IP_ItemQuickDetails(ItemPage.AccessoryData[_N][0]);}function IP_AccessoriesATCMO(__x,_y3,_){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(ItemPage.CurChildData==null)return ;if(ItemPage.Settings.ACCATCImage=='')return ;if(_)GP('IPItemAccessoriesATC'+__x).src=FileExtAppend(ItemPage.Settings.ACCATCImage,'mo');else GP('IPItemAccessoriesATC'+__x).src=ItemPage.Settings.ACCATCImage;}function IP_AccessoriesATCClick(_8,_zN,_cbs){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(ip_flags&0x10){IP_Error(101);return ;}if(ItemPage.PageFlags&0x10)return ;var _N=ItemPage.BuyBoxForm.elements[PgitUA+_8].selectedIndex;if(!_N)return ;if(ItemPage.CurChildData==null)return ;var _I4u;_I4u='numitems=1&item0_childid='+ItemPage.AccessoryData[_zN][0]+'&item0_extraid=0&item0_quantity='+_N;if(!(ItemPage.PageFlags&0x40))_I4u+='&flags=1';ItemPage.BuyBoxForm.elements[PgitUA+_8].selectedIndex=0;DHTML_IntComRequest(IP_INTCOMROOTDIRECTORY+'intcom/mcart'+SiteScriptingExt,16,_I4u,'IP_IntComAddToCart',{timeout:PgitX,flags:0x01,ondataerror:'IP_IntComError'});IP_IntComToggle(DHTML_IntComLastIndex,true);}function IP_AccessoriesWLClick(_e5,_AK,_){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(ItemPage.CurChildData==null)return ;IP_AddToWishlistInner(ItemPage.AccessoryData[_AK][0]);}function IP_AccessoriesRegClick(_6Q,_,_77P){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(ItemPage.CurChildData==null)return ;IP_AddToRegistryInner(ItemPage.AccessoryData[_][0]);}function IP_AccessoriesPopupShow(_2rp,_Wa){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(!(ItemPage.Settings.ACCFlags&0x0100))return ;var _='';var _L,_7x3,_QSK;_L=ItemPage.AccessoryData[_Wa][Pgitrdl+3];if(_L!=''){_7x3=ItemPage.AccessoryData[_Wa][Pgitrdl+4];_QSK=ItemPage.AccessoryData[_Wa][Pgitrdl+5];}else {_L=IP_IMAGEROOTDIRECTORY+'images/items/'+ItemPage.DummyImages[11][0];_7x3=ItemPage.DummyImages[11][1];_QSK=ItemPage.DummyImages[11][2];}_+='<div class="IPIAPImage">'+'<img src="'+PathFormFix(_L)+'" width="'+_7x3+'" height="'+_QSK+'" alt="" />'+'</div>';if(ItemPage.Callbacks.ACCPopup!=''){_+='<div class="IPIAPContent">'+SmartEval(ItemPage.Callbacks.ACCPopup,_Wa)+'</div>';}IP_DPopupShow('Accessory',_);}function IP_AccessoriesPopupHide(){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;IP_DPopupHide('Accessory');}function IP_CrossSellBuild(){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;var _Bv='',_Z6,_ZAW,_S;var _,_Svm,_VQh;if(!ItemPage.CrossSellNum)return ;if(!(ItemPage.Settings.CSFlags&0x01))return ;for(_Z6=0;_Z6<ItemPage.CrossSellNum;_Z6++){_S=ItemPage.CrossSellData[_Z6];_Bv+='<div class="IPItemCrossSellItem'+(!_Z6?' First':'')+'"'+' onclick="IP_CrossSellClick('+_Z6+');"'+' onmouseover="IP_CrossSellMO('+_Z6+', 1);"'+' onmouseout="IP_CrossSellMO('+_Z6+', 0);"'+'>';_=_S[5];if(_!=''){_Svm=_S[6];_VQh=_S[7];}else {_=IP_IMAGEROOTDIRECTORY+'images/items/'+ItemPage.DummyImages[6][0];_Svm=ItemPage.DummyImages[6][1];_VQh=ItemPage.DummyImages[6][2];}_Bv+='<div class="IPICrossSellItemImage">'+'<img src="'+PathFormFix(_)+'" width="'+_Svm+'" height="'+_VQh+'" alt="" />'+'</div>';if(ItemPage.Callbacks.CSItem!=''){_Bv+=SmartEval(ItemPage.Callbacks.CSItem,_Z6);}else {if(ItemPage.Settings.CSFlags&0x02)_Bv+='<div class="IPICrossSellItemName">'+FormFix(_S[4])+'</div>';if(ItemPage.Settings.CSFlags&0x04&&_S[1]==2){_Bv+='<div class="IPICrossSellItemPrice">';if(_S[17]&0x04){_Bv+='click to see price';}else {_Bv+=FormatMoney(_S[11],1);if(_S[12]>_S[11])_Bv+=' to '+FormatMoney(_S[12],1);}_Bv+='</div>';}}_Bv+='</div>';}SetContent(PgitKnv,_Bv);SetVisible(PgitmM,1);}function IP_CrossSellMO(_qw,_){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(_qw<0||_qw>=ItemPage.CrossSellNum)return ;var _e=ItemPage.CrossSellData[_qw];if(_){if(ItemPage.Settings.CSFlags&0x0100){var _4eM='';var _zfX,_Ko,_k4K;if(ItemPage.Settings.CSFlags&0x0200){_zfX=_e[8];if(_zfX!=''){_Ko=_e[9];_k4K=_e[0];}else {_zfX=IP_IMAGEROOTDIRECTORY+'images/items/'+ItemPage.DummyImages[7][0];_Ko=ItemPage.DummyImages[7][1];_k4K=ItemPage.DummyImages[7][2];}_4eM+='<div class="IPICrossSellImage">'+'<img src="'+PathFormFix(_zfX)+'" width="'+_Ko+'" height="'+_k4K+'" alt="" />'+'</div>';}_4eM+='<div class="IPICrossSellText">';if(ItemPage.Callbacks.CSPopup!=''){_4eM=SmartEval(ItemPage.Callbacks.CSPopup,_qw);}else {_4eM+=FormFix(_e[4]);}_4eM+='</div>';IP_DPopupShow('CrossSell',_4eM);}}else {if(ItemPage.Settings.CSFlags&0x0100)IP_DPopupHide('CrossSell');}if(ItemPage.Events.CrossSellMO!='')SmartEval(ItemPage.Events.CrossSellMO,_qw+', '+_);}function IP_CrossSellClick(_L6){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(_L6<0||_L6>=ItemPage.CrossSellNum)return ;var _b=ItemPage.CrossSellData[_L6];if(ItemPage.PageFlags&0x10000000&&_b[1]==2)IP_DHTMLPageLoad(_b[18],0,'');else Redirect(_b[3]);}function IP_OtherViewsBuild(){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(!(ItemPage.Settings.OVFlags&0x01))return ;if(Pgit1.OVImageWait){clearTimeout(Pgit1.OVImageWait);Pgit1.OVImageWait=0;}ip_flags&=~0x1000;PgitR.OVLoadIteration=0;if(ItemPage.Settings.OVFlags&0x0100)IP_DPopupHide('OtherView');if(!ItemPage.CurImageNum||(ItemPage.CurImageNum==1&&ItemPage.Settings.OVFlags&0x30)){if(ip_flags&0x40){if(ItemPage.Settings.OVFlags&0x0C000000&&ItemPage.Settings.OVScrollerID>=0)Scroller_DeInitialize(ItemPage.Settings.OVScrollerID);SetVisible(PgitAQ,0);ip_flags&=~0x40;}return ;}ItemPage.CurOtherViewIndexMouse=-1;var _WS,_6m;var _D,_NXx,_,_p,_V,_tan,_VZ,_t,_5;var _aaG=0,_O8=0;var _lxb,_g,_n;_5=ItemPage.CurImageNum;if(ItemPage.Settings.OVFlags&0x10)_5--;if(!(ItemPage.Settings.OVFlags&0x04)){if(ItemPage.Settings.OVMaxCols){_aaG=ItemPage.Settings.OVMaxCols;if(_aaG>_5)_aaG=_5;_O8=Math.ceil(_5/_aaG);if((ItemPage.Settings.OVFlags&0x0C000000)==0x08000000&&ItemPage.Settings.OVMaxRows>0&&_O8>ItemPage.Settings.OVMaxRows){_O8=ItemPage.Settings.OVMaxRows;_aaG=Math.ceil(_5/_O8);}}else {_aaG=_5;_O8=1;}}_WS='';if(!(ItemPage.Settings.OVFlags&0x04)){if(ItemPage.Settings.OVFlags&0x800000)_WS+='<table width="100%"><tr><td align="'+((ItemPage.Settings.OVFlags&0x400000)?'right':'center')+'">';if(ItemPage.Settings.OVFlags&0xC00000)_WS+='<table>';}_D=0;for(_NXx=0;_NXx<ItemPage.CurImageNum;_NXx++){_VZ=ItemPage.CurImageData[_NXx];if(!(ItemPage.Settings.OVFlags&0x10)||_NXx!=ItemPage.CurImageIndex){if(!(ItemPage.Settings.OVFlags&0x04)){_tan=_D%_aaG;_V=Math.floor(_D/_aaG);if(!_tan){if(_V){if(ItemPage.Settings.OVFlags&0xC00000){_WS+='</tr>';}else {if(ItemPage.Settings.OVFlags&0x02000000)_WS+='<div class="ClearFloats"><img src="'+SiteDotImage+'" width="1" height="1" alt="" /></div>';_WS+='</div>';}}if(ItemPage.Settings.OVFlags&0xC00000)_WS+='<tr valign="top"';else _WS+='<div';_WS+=' class="IPOVLRow';if(!_V)_WS+=' First';_WS+='">';}if(ItemPage.Settings.OVFlags&0xC00000)_WS+='<td';else _WS+='<div';_WS+=' class="IPOVLCell';if(!_tan)_WS+=' First';_WS+='">';_WS+='<div id="'+PgitDQ+_NXx+'"'+' class="'+((_NXx==ItemPage.CurImageIndex)?Pgitm:Pgitsv0)+'"'+' onmouseover="SmartMouse(event, this, \'IP_OtherViewsMO('+_NXx+', 1);\', 1);"'+' onmouseout="SmartMouse(event, this, \'IP_OtherViewsMO('+_NXx+', 0);\', 0);"'+' onclick="IP_OtherViewsClick('+_NXx+');"'+'>';_WS+='<div class="IPOVLIImage">'+'<img'+' src="';if(ItemPage.CurImageIndexList[_NXx]<ItemPage.ImageNumBase)_WS+=PathFormFix(ItemPage.Dir_Auto+ItemPage.Settings.OVMainImageAuto+_VZ[0]+'.jpg');else _WS+=PathFormFix(ItemPage.Dir_Auto+ItemPage.Settings.OVMainStyleImageAuto+_VZ[0]+'.jpg');_WS+='"';if(!(ItemPage.Settings.OVFlags&0x100000))_WS+=' width="'+ItemPage.Settings.OVImageMaxWid+'"';if(!(ItemPage.Settings.OVFlags&0x200000))_WS+=' height="'+ItemPage.Settings.OVImageMaxHei+'"';_WS+=' id="'+PgitI+_NXx+'"'+' alt="" />'+'</div>';if(ItemPage.Settings.OVFlags&0x010000){_WS+='<div class="IPOVLISubImage">';_=1;if(ItemPage.Settings.OVViewImageIndex!=-1&&_VZ[10]>-1){_t=ItemPage.Settings.OVViewImageIndex*3;if(ItemPage.ViewImageData[_VZ[10]][_t]!=''){_=0;_WS+='<img src="';if(ItemPage.Settings.OVFlags&0x080000&&_NXx==ItemPage.CurImageIndex)_WS+=PathFormFix(FileExtAppend(ItemPage.ViewImageData[_VZ[10]][_t],'on'));else _WS+=PathFormFix(ItemPage.ViewImageData[_VZ[10]][_t]);_WS+='"'+' width="'+ItemPage.ViewImageData[_VZ[10]][_t+1]+'"'+' height="'+ItemPage.ViewImageData[_VZ[10]][_t+2]+'"'+' id="'+PgitCFi+_NXx+'"'+' alt="" />';}}if(_){if(ItemPage.Callbacks.OVItem!=''){_WS+=SmartEval(ItemPage.Callbacks.OVItem,_NXx);}else if(_VZ[10]>-1){_WS+=FormFix(ItemPage.ViewData[_VZ[10]][1]);if(ItemPage.Settings.OVFlags&0x010000&&_VZ[11]>-1){_WS+=' in ';_WS+=FormFix(ItemPage.StyleData[_VZ[11]][(ItemPage.StyleData[_VZ[11]][3]!='')?3:2]);}}else {if(_VZ[12]!='')_WS+=FormFix(_VZ[12]);else if(_VZ[11]>=0)_WS+=FormFix(ItemPage.StyleData[_VZ[11]][(ItemPage.StyleData[_VZ[11]][3]!='')?3:2]);}}_WS+='</div>';}_WS+='</div>';if(ItemPage.Settings.OVFlags&0xC00000)_WS+='</td>';else _WS+='</div>';}else {if(_D&&ItemPage.Settings.OVListSeparator!='')_WS+='<div class="IPOVLSeparator">'+ItemPage.Settings.OVListSeparator+'</div>';_WS+='<div id="'+PgitDQ+_NXx+'"'+' class="'+((_NXx==ItemPage.CurImageIndex)?Pgitm:Pgitsv0)+'"'+' onmouseover="SmartMouse(event, this, \'IP_OtherViewsMO('+_NXx+', 1);\', 1);"'+' onmouseout="SmartMouse(event, this, \'IP_OtherViewsMO('+_NXx+', 0);\', 0);"'+' onclick="IP_OtherViewsClick('+_NXx+');"'+'>';_=1;if(ItemPage.Settings.OVViewImageIndex!=-1&&_VZ[10]>-1){_t=ItemPage.Settings.OVViewImageIndex*3;if(ItemPage.ViewImageData[_VZ[10]][_t]!=''){_=0;_WS+='<img src="';if(ItemPage.Settings.OVFlags&0x080000&&_NXx==ItemPage.CurImageIndex)_WS+=PathFormFix(FileExtAppend(ItemPage.ViewImageData[_VZ[10]][_t],'on'));else _WS+=PathFormFix(ItemPage.ViewImageData[_VZ[10]][_t]);_WS+='"'+' width="'+ItemPage.ViewImageData[_VZ[10]][_t+1]+'"'+' height="'+ItemPage.ViewImageData[_VZ[10]][_t+2]+'"'+' id="'+PgitCFi+_NXx+'"'+' alt="" />';}}if(_){if(ItemPage.Callbacks.OVItem!=''){_WS+=SmartEval(ItemPage.Callbacks.OVItem,_NXx);}else if(_VZ[10]>-1){_WS+=FormFix(ItemPage.ViewData[_VZ[10]][1]);if(ItemPage.Settings.OVFlags&0x010000&&_VZ[11]>-1){_WS+=' in ';_WS+=FormFix(ItemPage.StyleData[_VZ[11]][(ItemPage.StyleData[_VZ[11]][3]!='')?3:2]);}}else {if(_VZ[12]!='')_WS+=FormFix(_VZ[12]);else if(_VZ[11]>=0)_WS+=FormFix(ItemPage.StyleData[_VZ[11]][(ItemPage.StyleData[_VZ[11]][3]!='')?3:2]);}}_WS+='</div>';}_D++;}}if(!(ItemPage.Settings.OVFlags&0x04)){if(ItemPage.Settings.OVFlags&0xC00000){_WS+='</tr>';}else {if(ItemPage.Settings.OVFlags&0x02000000)_WS+='<div class="ClearFloats"><img src="'+SiteDotImage+'" width="1" height="1" alt="" /></div>';_WS+='</div>';}}if(!(ItemPage.Settings.OVFlags&0x04)){if(ItemPage.Settings.OVFlags&0xC00000)_WS+='</table>';if(ItemPage.Settings.OVFlags&0x800000)_WS+='</td></tr></table>';}if(!(ItemPage.Settings.OVFlags&0x04)&&ItemPage.Settings.OVFlags&0x01000000){_WS+='<div id="'+Pgit2V+'" style="display: none;"'+' onmouseover="SmartMouse(event, this, \'IP_OtherViewsMO(ItemPage.CurImageIndex, 1);\', 1);"'+' onmouseout="SmartMouse(event, this, \'IP_OtherViewsMO(ItemPage.CurImageIndex, 0);\', 0);"'+' onclick="IP_OtherViewsClick(ItemPage.CurImageIndex, 1);"'+'>';_6m='</div>';if(ItemPage.Settings.OVOverlayClass!=''){_p=ItemPage.Settings.OVOverlayClass.split(',');for(_NXx=0;_NXx<_p.length;_NXx++){_WS+='<div class="'+_p[_NXx]+'">';_6m+='</div>';}}_WS+='<img src="'+SiteDotImage+'" width="1" height="1" id="'+Pgit8ih+'" alt="" />';_WS+=_6m;}SetContent(Pgit36,_WS);SetVisible(PgitAQ,1);ip_flags|=0x40;if(!(ItemPage.Settings.OVFlags&0x04)){IP_OtherViewsImageTest();}if(!(ItemPage.Settings.OVFlags&0x04)&&ItemPage.Settings.OVFlags&0x01000000)IP_OtherViewsOverlayUpdate(ItemPage.CurImageIndex);if(ItemPage.Events.OtherViewBuild!='')SmartEval(ItemPage.Events.OtherViewBuild,'');}function IP_OtherViewsMO(_,_nzx){var _Ig,_SQR=ItemPage.CurImageData[_];if(_nzx){if(_!=ItemPage.CurImageIndex){SetClass(PgitDQ+_,Pgit_);if(ItemPage.Settings.OVViewImageIndex>-1&&ItemPage.Settings.OVFlags&0x040000&&_SQR[10]>-1&&(!(ItemPage.Settings.OVFlags&0x04)||ItemPage.Settings.OVFlags&0x010000)){_Ig=ItemPage.Settings.OVViewImageIndex*3;if(ItemPage.ViewImageData[_SQR[10]][_Ig]!='')GP(PgitCFi+_).src=FileExtAppend(ItemPage.ViewImageData[_SQR[10]][_Ig],'mo');}}ItemPage.CurOtherViewIndexMouse=_;if(ItemPage.Settings.OVFlags&0x0100){var _Lv0='',_mE1;if(ItemPage.Settings.OVFlags&0x0200){_Lv0+='<div id="IPIOVPopupImage">'+'<img';if(ItemPage.CurImageIndexList[_]<ItemPage.ImageNumBase)_Lv0+=' src="'+PathFormFix(ItemPage.Dir_Auto+ItemPage.Settings.OVPopupImageAuto+_SQR[0]+'.jpg')+'"';else _Lv0+=' src="'+PathFormFix(ItemPage.Dir_Auto+ItemPage.Settings.OVPopupStyleImageAuto+_SQR[0]+'.jpg')+'"';if(ItemPage.Settings.OVPopupImageWid)_Lv0+=' width="'+ItemPage.Settings.OVPopupImageWid+'"';if(ItemPage.Settings.OVPopupImageHei)_Lv0+=' height="'+ItemPage.Settings.OVPopupImageHei+'"';_Lv0+=' alt="" />'+'</div>';}_Lv0+='<div id="IPIOVPopupContent">';_mE1=1;if(ItemPage.Settings.OVPopupViewImageIndex>-1&&_SQR[10]>-1){_Ig=ItemPage.Settings.OVPopupViewImageIndex*3;if(ItemPage.ViewImageData[_SQR[10]][_Ig]!=''){_mE1=0;}}if(_mE1){if(ItemPage.Callbacks.OVPopup!=''){_Lv0+=SmartEval(ItemPage.Callbacks.OVPopup,q);}else {if(_==ItemPage.CurImageIndex)_Lv0+='Now Viewing - ';if(_SQR[10]>-1){_Lv0+=FormFix(ItemPage.ViewData[_SQR[10]][1]);if(ItemPage.Settings.OVFlags&0x0400&&_SQR[11]>-1){_Lv0+=' in ';_Lv0+=FormFix(ItemPage.StyleData[_SQR[11]][(ItemPage.StyleData[_SQR[11]][3]!='')?3:2]);}}else {if(_SQR[12]!='')_Lv0+=FormFix(_SQR[12]);else if(_SQR[11]>=0)_Lv0+=FormFix(ItemPage.StyleData[_SQR[11]][(ItemPage.StyleData[_SQR[11]][3]!='')?3:2]);}}}_Lv0+='</div>';IP_DPopupShow('OtherView',_Lv0);}}else {if(_!=ItemPage.CurImageIndex){SetClass(PgitDQ+_,Pgitsv0);if(ItemPage.Settings.OVViewImageIndex>-1&&ItemPage.Settings.OVFlags&0x040000&&_SQR[10]>-1&&(!(ItemPage.Settings.OVFlags&0x04)||ItemPage.Settings.OVFlags&0x010000)){_Ig=ItemPage.Settings.OVViewImageIndex*3;if(ItemPage.ViewImageData[_SQR[10]][_Ig]!='')GP(PgitCFi+_).src=ItemPage.ViewImageData[_SQR[10]][_Ig];}}ItemPage.CurOtherViewIndexMouse=-1;if(ItemPage.Settings.OVFlags&0x0100)IP_DPopupHide('OtherView');}if(ItemPage.Events.OtherViewMO!='')SmartEval(ItemPage.Events.OtherViewMO,_+', '+_nzx);}function IP_OtherViewsClick(_8){IP_MainImageSet(_8);}function IP_OtherViewsSetActive(_xd){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(!(ItemPage.Settings.OVFlags&0x01))return ;if(Pgit1.OVOverlayLoadWait){clearTimeout(Pgit1.OVOverlayLoadWait);Pgit1.OVOverlayLoadWait=0;}if(ItemPage.CurImageIndex==-2)return ;if(ItemPage.Settings.OVFlags&0x10){var _jZv=ItemPage.CurImageIndex;ItemPage.CurImageIndex=_xd;IP_OtherViewsBuild();ItemPage.CurImageIndex=_jZv;return ;}var _TeU,_;if(ItemPage.CurImageIndex>=0){SetClass(PgitDQ+ItemPage.CurImageIndex,Pgitsv0);_=ItemPage.CurImageData[ItemPage.CurImageIndex];if(ItemPage.Settings.OVViewImageIndex>-1&&ItemPage.Settings.OVFlags&0x040000&&_[10]>-1&&(!(ItemPage.Settings.OVFlags&0x04)||ItemPage.Settings.OVFlags&0x010000)){_TeU=ItemPage.Settings.OVViewImageIndex*3;if(ItemPage.ViewImageData[_[10]][_TeU]!='')GP(PgitCFi+ItemPage.CurImageIndex).src=ItemPage.ViewImageData[_[10]][_TeU];}}if(_xd>=0){SetClass(PgitDQ+_xd,Pgitm);_=ItemPage.CurImageData[_xd];if(ItemPage.Settings.OVViewImageIndex>-1&&ItemPage.Settings.OVFlags&0x040000&&_[10]>-1&&(!(ItemPage.Settings.OVFlags&0x04)||ItemPage.Settings.OVFlags&0x010000)){_TeU=ItemPage.Settings.OVViewImageIndex*3;if(ItemPage.ViewImageData[_[10]][_TeU]!='')GP(PgitCFi+_xd).src=FileExtAppend(ItemPage.ViewImageData[_[10]][_TeU],'on');}}if(ItemPage.Settings.OVFlags&0x01000000)IP_OtherViewsOverlayUpdate(_xd);}function IP_OtherViewsOverlayUpdate(_DbY){if(Pgit1.OVOverlayLoadWait){clearTimeout(Pgit1.OVOverlayLoadWait);Pgit1.OVOverlayLoadWait=0;}if(ItemPage.CurImageIndex<0){if(GP(Pgit2V))SetVisible(Pgit2V,0);return ;}var _e,_;if(ItemPage.Settings.OVFlags&0x300000){if(!(ip_flags&0x1000)){SetVisible(Pgit2V,0);if(!GP(PgitI+_DbY))return ;if(PgitR.OVLoadIteration==Pgit66)return ;Pgit1.OVOverlayLoadWait=setTimeout('IP_OtherViewsOverlayUpdate('+_DbY+');',10);return ;}_e=GetWid(PgitI+_DbY,0);_=GetHei(PgitI+_DbY,0);}else {_e=ItemPage.Settings.OVImageMaxWid;_=ItemPage.Settings.OVImageMaxHei;}var _cI,_p;_cI=GetLeft(PgitDQ+_DbY,0)-GetLeft(Pgit36,0);_p=GetTop(PgitDQ+_DbY,0)-GetTop(Pgit36,0);Move(Pgit2V,_cI+ItemPage.Settings.OVOverlayModX,_p+ItemPage.Settings.OVOverlayModY);GP(Pgit8ih).width=_e+ItemPage.Settings.OVOverlayModWid;GP(Pgit8ih).height=_+ItemPage.Settings.OVOverlayModHei;SetVisible(Pgit2V,1);}function IP_OtherViewsImageTest(){var _HQ,_jz;var _PR;if(Pgit1.OVImageWait){clearTimeout(Pgit1.OVImageWait);Pgit1.OVImageWait=0;}_jz=1;for(_HQ=0;_HQ<ItemPage.CurImageNum;_HQ++){_PR=ItemPage.CurImageData[_HQ];if(!(ItemPage.Settings.OVFlags&0x10)||_HQ!=ItemPage.CurImageIndex){if(!GP(PgitI+_HQ).complete){_jz=0;break;}}}if(_jz){ip_flags|=0x1000;if(ItemPage.Settings.OVFlags&0x0C000000&&ItemPage.Settings.OVScrollerID>=0){SetVisible(PgitAQ,1);SetVisible(Pgit36,1);if((ItemPage.Settings.OVFlags&0x0C000000)==0x04000000){_jz=GetHei(Pgit36);if(_jz>ItemPage.Settings.OVRegionHei)_jz=ItemPage.Settings.OVRegionHei;SetHei(ItemPage.Settings.OVOuterID,_jz);}else {_jz=GetWid(Pgit36);if(_jz>ItemPage.Settings.OVRegionWid)_jz=ItemPage.Settings.OVRegionWid;SetWid(ItemPage.Settings.OVOuterID,_jz);}Scroller_ReInitialize(ItemPage.Settings.OVScrollerID);}if(ItemPage.Events.OtherViewImagesDone!='')SmartEval(ItemPage.Events.OtherViewImagesDone,'');return ;}PgitR.OVLoadIteration++;if(PgitR.OVLoadIteration==Pgit66){if(ItemPage.Events.OtherViewImagesAbort!='')SmartEval(ItemPage.Events.OtherViewImagesAbort,'');return ;}Pgit1.OVImageWait=setTimeout('IP_OtherViewsImageTest();',10);}function IP_SwatchBuild(_Om8){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(!(ItemPage.Settings.SwatchFlags&0x01))return ;var _bD,_b,_bWt;var _g,_n,_,_nI;if(Pgit1.SwatchSwitch){clearTimeout(Pgit1.SwatchSwitch);Pgit1.SwatchSwitch=0;}IP_SwatchPopupHide();if(_Om8!=null||ItemPage.StyleNum!=ItemPage.StyleNumAvailable){PgitR.SwatchLimitSet=[];if(_Om8==null)_b=0;else _b=_Om8.length;_nI=0;for(_g=0;_g<ItemPage.StyleNum;_g++){_=0;if(ItemPage.StyleData[_g][1]&0x02){if(_b){for(_n=0;_n<_b;_n++){if(_Om8[_n]==_g){_=1;break;}}}else {_=1;}}if(_)PgitR.SwatchLimitSet[_nI++]=_g;}_b=_nI;}else {PgitR.SwatchLimitSet=null;}ItemPage.CurSwatchIndex=-1;ItemPage.CurSwatchIndexMouse=-1;var _Tk='';var _m=0,_mW=0;var _bM3,_nQ,_Ta,_RgG;if(PgitR.SwatchLimitSet==null)_b=ItemPage.StyleNumAvailable;else _b=PgitR.SwatchLimitSet.length;if(!_b||(_b==1&&ItemPage.Settings.SwatchFlags&0x20)){if(ip_flags&0x0400){SetVisible(PgitRF,0);ip_flags&=~0x0400;}return ;}_m=ItemPage.Settings.SwatchMaxCols;if(_m>_b)_m=_b;_mW=Math.ceil(_b/_m);if(ItemPage.Settings.SwatchFlags&0x40&&_mW>ItemPage.Settings.SwatchMaxRows){_m=Math.ceil(_b/ItemPage.Settings.SwatchMaxRows);_mW=ItemPage.Settings.SwatchMaxRows;}ItemPage.CurSwatchNumCols=_m;ItemPage.CurSwatchNumRows=_mW;var _R2V;for(_g=0;_g<_b;_g++){if(!(_g%_m)){if(_g){if(ItemPage.Settings.SwatchFlags&0x08)_Tk+='<div class="ClearFloats"><img src="'+SiteDotImage+'" width="1" height="1" alt="" /></div>';_Tk+='</div>';}_Tk+='<div class="IPICSListRow'+(_g?'':' First')+'">';}if(PgitR.SwatchLimitSet==null)_R2V=_g;else _R2V=PgitR.SwatchLimitSet[_g];_nQ='';if(ItemPage.Settings.SwatchMainImageED>=0){_nQ=ItemPage.StyleImageData[_R2V][ItemPage.Settings.SwatchMainImageED];_Ta=ItemPage.StyleImageData[_R2V][ItemPage.Settings.SwatchMainImageED+1];_RgG=ItemPage.StyleImageData[_R2V][ItemPage.Settings.SwatchMainImageED+2];}if(_nQ==''&&ItemPage.Settings.SwatchMainImageAuto!=''&&ItemPage.StyleData[_R2V][6]){_nQ=ItemPage.Dir_Auto+ItemPage.Settings.SwatchMainImageAuto+ItemPage.StyleData[_R2V][0]+'.jpg';_Ta=ItemPage.Settings.SwatchMainImageWid;_RgG=ItemPage.Settings.SwatchMainImageHei;}if(_nQ==''){_nQ=IP_IMAGEROOTDIRECTORY+'images/items/'+ItemPage.DummyImages[4][0];_Ta=ItemPage.DummyImages[4][1];_RgG=ItemPage.DummyImages[4][2];}_Tk+='<div'+' class="IPICSListItem'+((_g%_m)?'':' First')+'"'+' onmouseover="SmartMouse(event, this, \'IP_SwatchItemMO('+_g+', 1);\', 1);"'+' onmouseout="SmartMouse(event, this, \'IP_SwatchItemMO('+_g+', 0);\', 0);"'+' onclick="IP_SwatchItemClick('+_g+', 1);"'+'>'+'<div id="'+PgitEr+_g+'" class="IPICSLI">';_Tk+='<div class="IPICSLIImage">'+'<img src="'+PathFormFix(_nQ)+'" width="'+_Ta+'" height="'+_RgG+'" alt="" />'+'</div>';if(ItemPage.Settings.SwatchFlags&0x04){_Tk+='<div class="IPICSLIText">';if(ItemPage.Callbacks.SwatchText!=''){_Tk+=SmartEval(ItemPage.Callbacks.SwatchText,_g+','+_R2V);}else {if(!(ItemPage.Settings.SwatchFlags&0x0400)&&ItemPage.StyleData[_R2V][3]!='')_bM3=ItemPage.StyleData[_R2V][3];else _bM3=ItemPage.StyleData[_R2V][2];_Tk+=FormFix(_bM3);}_Tk+='</div>';}_Tk+='</div></div>';}if(ItemPage.Settings.SwatchFlags&0x08)_Tk+='<div class="ClearFloats"><img src="'+SiteDotImage+'" width="1" height="1" alt="" /></div>';_Tk+='</div>';if(ItemPage.Settings.SwatchFlags&0x10){_Tk+='<div id="IPICSOverlay" style="display: none;"'+' onmouseover="SmartMouse(event, this, \'IP_SwatchItemMO(ItemPage.CurSwatchIndex, 1);\', 1);"'+' onmouseout="SmartMouse(event, this, \'IP_SwatchItemMO(ItemPage.CurSwatchIndex, 0);\', 0);"'+' onclick="IP_SwatchItemClick(ItemPage.CurSwatchIndex, 1);"'+'>'+'<img src="'+SiteDotImage+'" width="1" height="1" alt="" />'+'</div>';}if(ItemPage.Settings.SwatchFlags&0x40)SetWid('IPICSList',ItemPage.Settings.SwatchColWid*_m-ItemPage.Settings.SwatchColWidSub);if(ItemPage.Settings.SwatchFlags&0x80){if(_mW<ItemPage.Settings.SwatchMaxRows)_g=ItemPage.Settings.SwatchRowHei*_mW;else _g=ItemPage.Settings.SwatchRegionHei;SetHei('IPICSList',_g);if(ItemPage.Settings.SwatchFlags&0x40&&ItemPage.Settings.SwatchOuterID!='')SetHei(ItemPage.Settings.SwatchOuterID,_g);}SetContent('IPICSList',_Tk);SetVisible(PgitRF,1);ip_flags|=0x0400;if(ItemPage.Settings.SwatchFlags&0x40&&ItemPage.Settings.SwatchScrollerID>=0)Scroller_ReInitialize(ItemPage.Settings.SwatchScrollerID);if(ItemPage.Events.SwatchBuild!='')SmartEval(ItemPage.Events.SwatchBuild,'');if(_Om8!=null)ip_flags|=0x0800;else ip_flags&=~0x0800;if(ItemPage.CurDisplayStyleIndex>=0)IP_SwatchSetActive(ItemPage.CurDisplayStyleIndex);}function IP_SwatchSetActive(_gLt){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(!(ItemPage.Settings.SwatchFlags&0x01))return ;if(Pgit1.SwatchSwitch){clearTimeout(Pgit1.SwatchSwitch);Pgit1.SwatchSwitch=0;}if(!(ip_flags&0x0400))return ;var _=IP_SwatchGetFromStyleIndex(_gLt);if(ItemPage.CurSwatchIndex==_)return ;if(ItemPage.CurSwatchIndex!=-1)SetClass(PgitEr+ItemPage.CurSwatchIndex,Pgit0L);ItemPage.CurSwatchIndex=_;if(_==-1){if(ItemPage.Settings.SwatchFlags&0x10)SetVisible('IPICSOverlay',0);return ;}SetClass(PgitEr+ItemPage.CurSwatchIndex,PgitGc);if(ItemPage.Settings.SwatchFlags&0x10){Move('IPICSOverlay',(_%ItemPage.CurSwatchNumCols)*ItemPage.Settings.SwatchColWid,Math.floor(_/ItemPage.CurSwatchNumCols)*ItemPage.Settings.SwatchRowHei);SetVisible('IPICSOverlay',1);}}function IP_SwatchGetFromStyleIndex(_Ea6){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(PgitR.SwatchLimitSet==null&&ItemPage.StyleNum==ItemPage.StyleNumAvailable)return _Ea6;var _Fw=-1,_,_OU=PgitR.SwatchLimitSet.length-1;if(_OU>_Ea6)_OU=_Ea6;for(_=0;_<=_OU;_++){if(PgitR.SwatchLimitSet[_]==_Ea6){_Fw=_;break;}}return _Fw;}function IP_SwatchItemMO(_,_8){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;var _Ev=_;if(PgitR.SwatchLimitSet!=null)_Ev=PgitR.SwatchLimitSet[_];if(Pgit1.SwatchSwitch){clearTimeout(Pgit1.SwatchSwitch);Pgit1.SwatchSwitch=0;}if(_8){if(ItemPage.CurSwatchIndexMouse==_)return ;ItemPage.CurSwatchIndexMouse=_;if(ItemPage.CurSwatchIndex!=_)SetClass(PgitEr+_,Pgit8);if(ItemPage.Settings.SwatchFlags&0x0100)IP_SwatchPopupShow();if(ItemPage.Settings.SwatchFlags&0x02){if(ItemPage.Settings.SwatchSwapTimeout)Pgit1.SwatchSwitch=setTimeout('IP_SwatchItemClick('+_+', 0);',ItemPage.Settings.SwatchSwapTimeout);else IP_DisplayStyleSet(_Ev);}}else {if(ItemPage.CurSwatchIndexMouse!=_)return ;if(ItemPage.CurSwatchIndex!=_)SetClass(PgitEr+_,Pgit0L);if(ItemPage.Settings.SwatchFlags&0x0100)IP_SwatchPopupHide();ItemPage.CurSwatchIndexMouse=-1;}if(ItemPage.Events.SwatchItemMO!='')SmartEval(ItemPage.Events.SwatchItemMO,_+', '+_Ev+', '+_8);}function IP_SwatchItemClick(_gL,_xP){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(Pgit1.SwatchSwitch){clearTimeout(Pgit1.SwatchSwitch);Pgit1.SwatchSwitch=0;}if(ItemPage.CurSwatchIndex==_gL)return ;var _p=_gL;if(PgitR.SwatchLimitSet!=null)_p=PgitR.SwatchLimitSet[_gL];IP_DisplayStyleSet(_p);if(ItemPage.Events.SwatchItemClick!='')SmartEval(ItemPage.Events.SwatchItemClick,_gL+','+_p+','+_xP);}function IP_SwatchPopupShow(){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;var _H=ItemPage.CurSwatchIndexMouse;var _rSC=_H;if(PgitR.SwatchLimitSet!=null)_rSC=PgitR.SwatchLimitSet[_H];if(ItemPage.CurSwatchPopupStyle!=_rSC){var _M9='',_Y;ItemPage.CurSwatchPopupStyle=_rSC;if(ItemPage.Settings.SwatchFlags&0x0200){var _KSw='',_,_Kzf;if(ItemPage.Settings.SwatchPopupImageED!=-1){_KSw=ItemPage.StyleImageData[_rSC][ItemPage.Settings.SwatchPopupImageED];_=ItemPage.StyleImageData[_rSC][ItemPage.Settings.SwatchPopupImageED+1];_Kzf=ItemPage.StyleImageData[_rSC][ItemPage.Settings.SwatchPopupImageED+2];}if(_KSw==''&&ItemPage.Settings.SwatchPopupImageAuto!=''){_KSw=ItemPage.Dir_Auto+ItemPage.Settings.SwatchPopupImageAuto+ItemPage.StyleData[_rSC][0]+'.jpg';_=ItemPage.Settings.SwatchPopupImageWid;_Kzf=ItemPage.Settings.SwatchPopupImageHei;}if(_KSw==''){_KSw=IP_IMAGEROOTDIRECTORY+'images/items/'+DummyImages[5][0];_=DummyImages[5][1];_Kzf=DummyImages[5][2];}_M9+='<div class="IPICrossSellImage">'+'<img src="'+PathFormFix(_KSw)+'" width="'+_+'" height="'+_Kzf+'" alt="" />'+'</div>';}_M9+='<div class="IPICrossSellText">';if(ItemPage.Callbacks.SwatchPopup!=''){_M9+=SmartEval(ItemPage.Callbacks.SwatchPopup,_H+','+_rSC);}else {_Y=ItemPage.StyleData[_rSC][2];if(!(ItemPage.Settings.SwatchFlags&0x0400)&&ItemPage.StyleData[_rSC][3]!='')_Y=ItemPage.StyleData[_rSC][3];_M9+=FormFix(_Y);}_M9+='</div>';IP_DPopupShow('ColorSwatch',_M9);}else {IP_DPopupShow('ColorSwatch');}}function IP_SwatchPopupHide(){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;IP_DPopupHide('ColorSwatch');}function IP_SwatchLimiterBuild(){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(!(ItemPage.Settings.SLFlags&0x01))return ;var _,_3KS,__k,_c,_ly,_r;_3KS=0;if(ItemPage.StyleNumAvailable>1&&ItemPage.SpecNum){for(_=0;_<ItemPage.SpecNum;_++){if(ItemPage.SpecData[_][5]>1){_3KS=1;break;}}}if(!_3KS){if(ItemPage.Settings.SLFlags&0x10){SetVisible(ItemPage.Settings.SLOuterID,0);}else {SetContent(ItemPage.Settings.SLInnerID,ItemPage.Settings.SLDefaultContent);}return ;}_3KS=1;_ly='';for(_=0;_<ItemPage.SpecNum;_++){__k=ItemPage.SpecData[_];if(!(ItemPage.Settings.DisplayFlags&0x02)){SetContent(Pgitp+_,FormFix(__k[1])+':');}_c='';if(__k[5]>1){ItemPage.SpecValueIndices[_]=-1;_c+='<div class="'+ItemPage.Settings.SLDDClass+'">'+'<select name="'+PgitOWk+_+'" onchange="IP_SwatchLimiterUpdate('+_+');">'+'<option value="-1" selected="selected">'+'every '+FormFix(__k[1].toLowerCase())+'</option>';if(_3KS){for(p=__k[3];p<__k[3]+__k[4];p++){if(ItemPage.SpecValueData[p][6]&0x01){_r=ItemPage.SpecValueData[p][1];if(_r=='')_r=ItemPage.Settings.SpecDefaultValue;_c+='<option value="'+p+'">'+FormFix(_r)+'</option>';}}_3KS=0;}_c+='</select>'+'</div>';}else if(__k[5]==1){_r=ItemPage.SpecValueData[__k[3]][1];if(_r=='')_r=ItemPage.Settings.SpecDefaultValue;_c+='<div class="'+ItemPage.Settings.SLTextClass+'">'+FormFix(_r)+'</div>';}if(_c!=''){if(_ly!='')_ly+=ItemPage.Settings.SLSeparator;_ly+=_c;}}if(!(ItemPage.Settings.SLFlags&0x02)){_ly='<form action="#" method="get" onsubmit="return false;" id="'+ItemPage.Settings.SLFormName+'">'+_ly+'</form>';}SetContent(ItemPage.Settings.SLInnerID,_ly);}function IP_SwatchLimiterUpdate(_){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;var _wy=GP(ItemPage.Settings.SLFormName);var _SfN=_wy.elements[PgitOWk+_].selectedIndex;var _0xl,_ROq;var _d=-1;var _4g;if(_<ItemPage.SpecNum-1){for(_0xl=_+1;_0xl<ItemPage.SpecNum;_0xl++){if(ItemPage.SpecData[_0xl][5]>1){_4g=_wy.elements[PgitOWk+_0xl];while(_4g.options.length>1){_4g.options[_4g.options.length-1]=null;}_4g.selectedIndex=0;}}}_ROq=1;if(!_SfN){if(_){for(_0xl=0;_0xl<_;_0xl++){if(ItemPage.SpecData[_0xl][5]>1){if(_wy.elements[PgitOWk+_0xl].selectedIndex){_ROq=0;break;}}}}if(_ROq){IP_SwatchBuild();return ;}}if(_SfN)_d=Cast(_wy.elements[PgitOWk+_].options[_SfN].value,CAST_INT);if(ItemPage.Settings.SLFlags&0x20){if(_){for(_0xl=0;_0xl<_;_0xl++){if(ItemPage.SpecData[_0xl][5]>1){ItemPage.BuyBoxForm.elements[PgitOWk+_0xl].selectedIndex=_wy.elements[PgitOWk+_0xl].selectedIndex;IP_SpecDDChange(_0xl);}}}ItemPage.BuyBoxForm.elements[PgitOWk+_].selectedIndex=_SfN;if(IP_SpecDDChange(_)){PgitR.IntComExtras[0]=3;return ;}}if(_d>=0){PgitR.LastIndices[0]=-1;}IP_SwatchLimiterUpdate2(_,_d);}function IP_SwatchLimiterUpdate2(_C7r,_){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;var _n,_P,_e,_eO=0;var _kWm=GP(ItemPage.Settings.SLFormName);if(_<0){_e=1;if(_C7r){for(_n=_C7r-1;_n>=0;_n--){if(ItemPage.SpecData[_n][5]>1){if(!_kWm.elements[PgitOWk+_n].selectedIndex){IP_SwatchBuild();break;}_C7r=_n;_eO=1;_e=0;break;}}}if(_e){IP_SwatchBuild();return ;}}var _HUd,_QO,_Z,_W35,_M;var _q=0;if(_C7r<ItemPage.SpecNum-1){for(_n=_C7r+1;_n<ItemPage.SpecNum;_n++){if(ItemPage.SpecData[_n][5]>1){_q=_n;break;}}}if(_q>=0){_QO=[];for(_n=0;_n<=_C7r;_n++){if(ItemPage.SpecData[_n][5]>1){_M=Cast(_kWm.elements[PgitOWk+_n].options[_kWm.elements[PgitOWk+_n].selectedIndex].value,CAST_INT);}else if(ItemPage.SpecData[_n][5]==1){for(_P=ItemPage.SpecData[_n][3];_P<ItemPage.SpecData[_n][3]+ItemPage.SpecData[_n][4];_P++){if(ItemPage.SpecValueData[_P][6]&0x01){_M=_P;break;}}}else {_M=-1;}_QO[_n]=_M;}if(!_eO&&_q){_HUd=IP_GetSpecValueArray(_C7r,_QO);IP_SetSpecValueDD(_kWm.elements[PgitOWk+_q],_HUd);}_HUd=IP_GetStyleArray(_C7r,_QO);IP_SwatchBuild(_HUd);}}function IP_SwatchLimiterReset(){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;var _5;if(ItemPage.SpecNum){for(_5=0;_5<ItemPage.SpecNum;_5++){if(ItemPage.SpecData[_5][5]>1){if(GP(ItemPage.Settings.SLFormName).elements[PgitOWk+_5].selectedIndex){GP(ItemPage.Settings.SLFormName).elements[PgitOWk+_5].selectedIndex=0;IP_SwatchLimiterUpdate(_5);}return ;}}}}function IP_BrowseOtherBuild(){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(!(ItemPage.Settings.BOFlags&0x01))return ;var _d4,_R;var _GT8,_MP;var _=0,_mLT=0,_P=-1,_q;var _9='';var __KV=0,_7=0;var _1XC,_zNZ,_j;_d4=ItemPage.BrowseOtherNum;if(!(ItemPage.Settings.BOFlags&0x02))_d4--;if(_d4<=0)return ;__KV=ItemPage.Settings.BOMaxCols;if(__KV>_d4)__KV=_d4;_7=Math.ceil(_d4/__KV);if(ItemPage.Settings.BOFlags&0x40&&_7>ItemPage.Settings.BOMaxRows){__KV=Math.ceil(_d4/ItemPage.Settings.BOMaxRows);_7=ItemPage.Settings.BOMaxRows;}var _3Y=[],_Oei=0,_s3=0;if(ItemPage.Settings.BOFlags&0x40){_GT8=0;for(_Oei=0;_Oei<__KV;_Oei++){for(_s3=0;_s3<_7;_s3++){_MP=-1;if(_GT8<ItemPage.BrowseOtherNum){if(ItemPage.BrowseOtherData[_GT8][0]!=ItemPage.ItemID||ItemPage.Settings.BOFlags&0x02)_MP=_GT8++;}_3Y[_Oei+_s3*__KV]=_MP;}}}else {_MP=0;for(_GT8=0;_GT8<ItemPage.BrowseOtherNum;_GT8++){if(ItemPage.BrowseOtherData[_GT8][0]!=ItemPage.ItemID||ItemPage.Settings.BOFlags&0x02)_3Y[_MP++]=_GT8;}}for(_GT8=0;_GT8<_3Y.length;_GT8++){_Oei=_GT8%__KV;if(!_Oei){if(_GT8)_9+='</div>';_9+='<div class="IPIBOListRow'+(_GT8?'':' First')+'">';}curval=_3Y[_GT8];if(curval>=0){_R=ItemPage.BrowseOtherData[curval];_q=(_R[0]==ItemPage.ItemID)?1:0;if(_q){_P=curval;_=ItemPage.Settings.BOColWid*(_GT8%__KV);_mLT=ItemPage.Settings.BORowHei*Math.floor(_GT8/__KV);}_9+='<div'+' class="IPIBOListItem'+(_Oei?'':' First')+'"'+' onmouseover="SmartMouse(event, this, \'IP_BrowseOtherMO('+curval+', 1);\', 1);"'+' onmouseout="SmartMouse(event, this, \'IP_BrowseOtherMO('+curval+', 0);\', 0);"';if(!_q)_9+=' onclick="IP_BrowseOtherClick('+curval+', 1);"';_9+='>'+'<div id="'+PgitP+curval+'" class="IPIBOLI'+(_q?'On':'')+'">';_1XC=_R[Pgit5G];if(_1XC!=''){_zNZ=_R[Pgit5G+1];_j=_R[Pgit5G+2];}else {_1XC=IP_IMAGEROOTDIRECTORY+'images/items/'+ItemPage.DummyImages[8][0];_zNZ=ItemPage.DummyImages[8][1];_j=ItemPage.DummyImages[8][2];}_9+='<div class="IPIBOLIImage">'+'<img src="'+PathFormFix(_1XC)+'" width="'+_zNZ+'" height="'+_j+'" alt="" />'+'</div>';if(ItemPage.Settings.BOFlags&0x04){_9+='<div clas="IPIBOLIText">';if(ItemPage.Callbacks.BOItem!='')_9+=SmartEval(ItemPage.Callbacks.BOItem,curval);else _9+=FormFix(_R[1]);_9+='</div>';}_9+='</div></div>';}else {_9+='<div class="IPIBOListItemEmpty'+(_Oei?'':' First')+'">'+'<div class="IPIBOLIEmpty"><img src="'+SiteDotImage+'" width="1" height="1" alt="" /></div>'+'</div>';}}_9+='</div>';if(ItemPage.Settings.BOFlags&0x02){_9+='<div id="IPIBOLIOverlay" style="left: '+_+'px; top: '+_mLT+'px;"'+' onmouseover="SmartMouse(event, this, \'IP_BrowseOtherMO('+_P+', 1);\', 1);"'+' onmouseout="SmartMouse(event, this, \'IP_BrowseOtherMO('+_P+', 0);\', 0);"'+' onclick="IP_BrowseOtherClick('+_P+', 1);"'+'>'+'<img src="'+SiteDotImage+'" width="1" height="1" alt="" />'+'</div>';}if(ItemPage.Settings.BOFlags&0x40)SetWid('IPIBOList',ItemPage.Settings.BOColWid*__KV-ItemPage.Settings.BOColWidSub);if(ItemPage.Settings.BOFlags&0x80){if(_7<ItemPage.Settings.BOMaxRows)_GT8=ItemPage.Settings.BORowHei*_7;else _GT8=ItemPage.Settings.BORegionHei;SetHei('IPIBOList',_GT8);if(ItemPage.Settings.BOFlags&0x40&&ItemPage.Settings.BOOuterID!='')SetHei(ItemPage.Settings.BOOuterID,_GT8);}SetContent('IPIBOList',_9);if(ItemPage.Settings.BOFlags&0x40&&ItemPage.Settings.BOScrollerID>=0)Scroller_ReInitialize(ItemPage.Settings.BOScrollerID);}function IP_BrowseOtherMO(_Z,_Erx){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(_Z<0||_Z>=ItemPage.BrowseOtherNum)return ;var _09=ItemPage.BrowseOtherData[_Z];if(_Erx){if(_09[0]!=ItemPage.ItemID)SetClass(PgitP+_Z,'IPIBOLIMO');if(ItemPage.Settings.BOFlags&0x0100){var _Ek='';var _Arm,_F,_;if(ItemPage.Settings.BOFlags&0x0200){_Arm=_09[Pgit5G+3];if(_Arm!=''){_F=_09[Pgit5G+4];_=_09[Pgit5G+5];}else {_Arm=IP_IMAGEROOTDIRECTORY+'images/items/'+ItemPage.DummyImages[9][0];_F=ItemPage.DummyImages[9][1];_=ItemPage.DummyImages[9][2];}_Ek+='<div class="IPIBOPImage">'+'<img src="'+PathFormFix(_Arm)+'" width="'+_F+'" height="'+_+'" alt="" />'+'</div>';}_Ek+='<div class="IPIBOPText">';if(ItemPage.Callbacks.BOPopup!=''){_Ek+=SmartEval(ItemPage.Callbacks.BOPopup,_Z);}else {if(_09[0]==ItemPage.ItemID){_Ek+='<div class="IPIBOPNowViewing"><span>Now Viewing</span></div>';}else {if(ItemPage.Settings.BOFlags&0x0400){_Ek+='<div class="IPIBOPName">'+FormFix(_09[1])+'</div>';}if(ItemPage.Settings.BOFlags&0x0800){_Ek+='<div class="IPIBOPPrice">';if(_09[2]&0x04)_Ek+='click to see price';else if(_09[6]<_09[7])_Ek+='from '+FormatMoney(_09[6],1);else _Ek+=FormatMoney(_09[6],1);_Ek+='</div>';}if(ItemPage.Settings.BOFlags&0x1000){_Ek+='<div class="IPIBOPDescription">'+_09[5]+'</div>';}}}_Ek+='</div>';IP_DPopupShow('BrowseOther',_Ek);}}else {if(_09[0]!=ItemPage.ItemID)SetClass(PgitP+_Z,'IPIBOLI');if(ItemPage.Settings.BOFlags&0x0100)IP_DPopupHide('BrowseOther');}if(ItemPage.Events.BrowseOtherMO!='')SmartEval(ItemPage.Events.BrowseOtherMO,_Z+', '+_Erx);}function IP_BrowseOtherClick(_nty){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(_nty<0||_nty>=ItemPage.BrowseOtherNum)return ;var _OvI=ItemPage.BrowseOtherData[_nty];if(ItemPage.PageFlags&0x10000000)IP_DHTMLPageLoad(_OvI[0],ItemPage.DeptID,'');else Redirect(IP_SCRIPTROOTDIRECTORY+'items'+SiteScriptingExt+'?itemid='+_OvI[0]);}function IP_DPopupInitialize(_){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(_.Flags&0x01)return ;_.Pointer=GP(_.OuterID);if(!_.Pointer)_.Pointer=Create(_.OuterID);if(_.InnerID!=''||_.ClassList!=''){var _EI=(_.InnerID!='')?_.InnerID:_.OuterID+'Inner';var _0y,_e,_N;var _qg='',_R5='';if(_.ClassList!=''){_0y=_.ClassList.split(',');_N=_0y.length;for(_e=0;_e<_N;_e++){_qg+='<div class="'+_0y[_e]+'"';if(_e==_N-1)_qg+=' id="'+_EI+'">';_R5+='</div>';}_qg+=_R5;}else {_qg='<div id="'+_EI+'"></div>';}SetContent(_.Pointer,_qg);_.PointerInner=GP(_EI);}else {_.PointerInner=_.Pointer;}_.Flags|=0x01;}function IP_DPopupPosition(_dvp){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;var _26o=EventData.Mouse.X+_dvp.OffsetX;var _4W=EventData.Mouse.Y+_dvp.OffsetY;var _;_=_dvp.DisplayFlags&0x03;if(_==0x01)_26o-=_dvp.Wid>>1;else if(_==0x02)_26o-=_dvp.Wid;_=_dvp.DisplayFlags&0x0C;if(_==0x04)_4W-=_dvp.Hei>>1;else if(_==0x08)_4W-=_dvp.Hei;if(_26o!=_dvp.X||_4W!=_dvp.Y){_dvp.X=_26o;_dvp.Y=_4W;Move(_dvp.Pointer,_26o,_4W);}}function IP_DPopupShow(_Hvl,_tpK){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(typeof(ItemPage.Popups[_Hvl])=='undefined')return ;var _=ItemPage.Popups[_Hvl];if(!(_.Flags&0x01))IP_DPopupInitialize(_);if(_tpK==null)_tpK='';if(_tpK!='')SetContent(_.PointerInner,_tpK);SetVisible(_.Pointer,1);_.Wid=GetWid(_.Pointer,2);_.Hei=GetHei(_.Pointer,2);IP_DPopupPosition(_);_.Flags|=0x02;PgitR.DPopupNumVisible++;}function IP_DPopupHide(_n){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(typeof(ItemPage.Popups[_n])=='undefined')return ;var _h=ItemPage.Popups[_n];if(!(_h.Flags&0x01))return ;if(!(_h.Flags&0x02))return ;SetVisible(_h.Pointer,0);_h.Flags&=~0x02;PgitR.DPopupNumVisible--;}function IP_SpecDDChange(_){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return 0;PgitR.LastIndices[2]=-1;var __HZ=ItemPage.BuyBoxForm.elements[PgitOWk+_].selectedIndex;var _M2=Cast(ItemPage.BuyBoxForm.elements[PgitOWk+_].options[__HZ].value,CAST_INT);var _McV=ItemPage.SpecValueIndices[_];var _qxZ,_E6,_SqT,_v8u;ItemPage.SpecValueIndices[_]=_M2;if(ItemPage.Events.SpecDDChange!='')SmartEval(ItemPage.Events.SpecDDChange,_+', '+_M2+', '+_McV);SetClass(Pgith1+_,(_M2!=-1)?Pgit3:Pgit7);_E6=(_M2==-1)?0:1;if(_<ItemPage.SpecNum-1){for(_qxZ=_+1;_qxZ<ItemPage.SpecNum;_qxZ++){if(ItemPage.SpecData[_qxZ][5]>1){_SqT=ItemPage.BuyBoxForm.elements[PgitOWk+_qxZ];while(_SqT.options.length>1){_SqT.options[_SqT.options.length-1]=null;}_SqT.selectedIndex=0;ItemPage.SpecValueIndices[_qxZ]=-1;if(_E6){SetClass(Pgith1+_qxZ,Pgit7);_E6=0;}else {SetClass(Pgith1+_qxZ,Pgitf);}}}}if(ItemPageStatic.StylesControlFlags&0x01){if(ItemPage.StyleNumAvailable>1){_SqT=ItemPage.BuyBoxForm.elements[Pgit8Wo];while(_SqT.options.length>1){_SqT.options[_SqT.options.length-1]=null;}_SqT.selectedIndex=0;if(ItemPage.CurStyleIndex!=-1){IP_StyleTextUpdate(1,-1,ItemPage.CurStyleIndex);ItemPage.CurStyleIndex=-1;}if(_E6){SetClass(Pgit5UQ,Pgit7);_E6=0;}else {SetClass(Pgit5UQ,Pgitf);}}}if(_M2>=0){_E6=0;if(_<ItemPage.SpecNum){for(_qxZ=_+1;_qxZ<ItemPage.SpecNum;_qxZ++){if(ItemPage.SpecData[_qxZ][5]>1)_E6++;}}if(_E6==0&&ItemPageStatic.StylesControlFlags&0x01){if(ItemPage.StyleNumAvailable>1)_E6++;}PgitR.LastIndices[0]=-1;if(!_E6){IP_RequestChildData();}else {IP_SetChildID(0);}}else {IP_SetChildID(0);}IP_SpecDDChange2(_,_M2);return 0;}function IP_SpecDDChange2(_,_T0t){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(_T0t<0)return ;var _Whe,_y,_F0Q,_H;var _xx,_Hp;var _k=-1;if(_<ItemPage.SpecNum-1){for(_xx=_+1;_xx<ItemPage.SpecNum;_xx++){if(ItemPage.SpecData[_xx][5]>1){_k=_xx;break;}}}if(_k==-1&&ItemPageStatic.StylesControlFlags&0x01){if(ItemPage.StyleNumAvailable>1)_k=0;}if(_k>=0){if(!_k){_Whe=IP_GetStyleArray(_,ItemPage.SpecValueIndices);IP_SetStyleDD(ItemPage.BuyBoxForm.elements[Pgit8Wo],_Whe);}else {_Whe=IP_GetSpecValueArray(_,ItemPage.SpecValueIndices);IP_SetSpecValueDD(ItemPage.BuyBoxForm.elements[PgitOWk+_k],_Whe);}}}function IP_StyleDDChange(){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;PgitR.LastIndices[3]=-1;var _5=ItemPage.BuyBoxForm.elements[Pgit8Wo].selectedIndex;var _OdZ=Cast(ItemPage.BuyBoxForm.elements[Pgit8Wo].options[_5].value,CAST_INT);var _QKr=ItemPage.CurStyleIndex;ItemPage.CurStyleIndex=_OdZ;if(ItemPage.Events.StyleDDChange!='')SmartEval(ItemPage.Events.StyleDDChange,_OdZ+', '+_QKr);SetClass(Pgit5UQ,(_OdZ!=-1)?Pgit3:Pgit7);IP_StyleTextUpdate(1,_OdZ,_QKr);PgitR.LastIndices[0]=-1;if(_OdZ>=0){IP_RequestChildData();}else {IP_SetChildID(0);}IP_StyleDDChange2(_OdZ);}function IP_StyleDDChange2(_xZ){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(_xZ>=0)IP_DisplayStyleSet(_xZ);}function IP_CurrencyConverter(){DHTML_Alert('A currency converter popup would have appeared, if one was configured.');}function IP_BackToTop(){if(ItemPage.PageFlags&0x10000000){if(ip_wmwindow.Options&0x10)ip_wmwindow.WindowContentCustom.scrollTop=0;else ip_wmwindow.WindowContent.scrollTop=0;}else {window.location.hash='pagetop';}}function IP_ItemQuickDetails(_PR){DHTML_LoadContent(SiteRootDirectory+'intcom/items'+SiteScriptingExt,258,'childid='+_PR);}function IP_ClickToEnlarge(){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(ItemPage.CurImageIndex<0)return ;if(!(ItemPage.CurImageFlags&0x02))return ;var _ih=ItemPage.CurImageData[ItemPage.CurImageIndex];DHTML_LoadImage(ItemPage.Dir_Full+_ih[4],_ih[5],_ih[6],'Enlarged View');}function IP_TechnologyClick(_w9){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;var _;if(IPSharedData.TechNum){for(_=0;_<IPSharedData.TechNum;_++){if(IPSharedData.TechData[_][0]==_w9){IP_TechnologyDisplay(_);return ;}}}PgitR.LastIndices[4]=IP_IntComCall(32,'techid='+_w9,'IP_IntComTechnologyData');}function IP_TechnologyDisplay(_jO){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(_jO<0||_jO>=IPSharedData.TechNum)return ;var _='';if(ItemPage.Callbacks.TechPopup!=''){_=SmartEval(ItemPage.Callbacks.TechPopup,_jO);}else {_=IPSharedData.TechData[_jO][2];}DHTML_Alert(_,FormFix(IPSharedData.TechData[_jO][1]),0,0x01);}function IP_AddToWishlist(){if(!(ip_flags&0x08)||(ip_flags&0x20000000)||ItemPage.PageFlags&0x02)return ;if(ip_flags&0x10){IP_Error(101);return ;}if(!ItemPage.ChildID||ItemPage.CurChildData==null){IP_Error(81);return ;}if(ItemPage.CurChildData.Onsite!=1){IP_Error(85);return ;}IP_AddToWishlistInner(ItemPage.ChildID);}function IP_AddToWishlistInner(_){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(_<=0)return ;if(ItemPage.PageFlags&0x10000000||!(ItemPage.PageFlags&0x20)){if(ip_flags&0x40000000){PgitR.ExtraValues[7]=_;DHTML_IntComRequest(IP_INTCOMROOTDIRECTORY+'intcom/wishlist'+SiteScriptingExt,0,'childid='+_,'IP_IntComAddToWishlist',{timeout:PgitX,flags:0x01,ondataerror:'IP_IntComError'});PgitR.LastIndices[7]=DHTML_IntComLastIndex;IP_IntComToggle(DHTML_IntComLastIndex,true);}else {IP_Login('itempage','IP_AddToWishlistInner('+_+');','wishlist',IP_SCRIPTROOTDIRECTORY+'wishlist'+SiteScriptingExt+'?function=64&childid='+_);}}else {Redirect(IP_SCRIPTROOTDIRECTORY+'wishlist'+SiteScriptingExt+'?function=64&childid='+_);}}function IP_AddToRegistry(){if(!(ip_flags&0x08)||(ip_flags&0x20000000)||ItemPage.PageFlags&0x02)return ;if(ip_flags&0x10){IP_Error(101);return ;}if(!ItemPage.ChildID||ItemPage.CurChildData==null){IP_Error(81);return ;}if(ItemPage.CurChildData.Onsite!=1){IP_Error(85);return ;}IP_AddToRegistryInner(ItemPage.ChildID);}function IP_AddToCart(){if(!(ip_flags&0x08)||(ip_flags&0x20000000)||ItemPage.PageFlags&0x02)return ;if(ip_flags&0x10){IP_Error(101);return ;}if(!ItemPage.ChildID||ItemPage.CurChildData==null){IP_Error(80);return ;}if(ItemPage.CurChildData.Onsite!=1){IP_Error(84);return ;}var _120,_B=ItemPage.BuyBoxForm.quantity,_;if(_B.type=='select-one')_120=Cast(_B.options[_B.selectedIndex].value,CAST_INT);else _120=Cast(_B.quantity.value,CAST_INT);if(_120<=0||_120>99){IP_Error(82);setTimeout('ItemPage.BuyBoxForm.quantity.focus();',10);return ;}if(ItemPage.Events.AddToCart!=''){if(!SmartEval(ItemPage.Events.AddToCart,''))return ;}if(ItemPage.PageFlags&0x10000000||!(ItemPage.PageFlags&0x10)){var _7,_urn=1;_7='item0_childid='+ItemPage.ChildID+'&item0_quantity='+_120;if(!(ItemPage.PageFlags&0x40))_7+='&flags=1';if(ItemPageStatic.ItemsControlFlags&0x080000&&ItemPage.Settings.ACCFlags&0x01&&ItemPage.AccessoryNum){var _p=0,_5b;if(ItemPage.BuyBoxForm.numaccessories)_p=Cast(ItemPage.BuyBoxForm.numaccessories.value,CAST_INT);if(_p){for(_=0;_<_p;_++){_5b=ItemPage.BuyBoxForm.elements[PgitUA+_].selectedIndex;if(_5b){_7+='&item'+_urn+'_childid='+ItemPage.AccessoryData[ItemPage.CurChildData.AccessoryList[_]][0]+'&item'+_urn+'_quantity='+_5b+'&item'+_urn+'_flags=48';ItemPage.BuyBoxForm.elements[PgitUA+_].selectedIndex=0;_urn++;}}}}_7+='&numitems='+_urn;DHTML_IntComRequest(IP_INTCOMROOTDIRECTORY+'intcom/mcart'+SiteScriptingExt,16,_7,'IP_IntComAddToCart',{timeout:PgitX,flags:0x01,ondataerror:'IP_IntComError'});IP_IntComToggle(DHTML_IntComLastIndex,true);}else {ItemPage.BuyBoxForm.childid.value=Cast(ItemPage.ChildID,CAST_STRING);ItemPage.BuyBoxForm.submit();}}function IP_TellAFriend(){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;DForm_FormRequest(IP_INTCOMROOTDIRECTORY+'intcom/items-dform'+SiteScriptingExt,'function=0&deptid='+ItemPage.DeptID+'&itemid='+ItemPage.ItemID);}function IP_AskAQuestion(){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;DForm_FormRequest(IP_INTCOMROOTDIRECTORY+'intcom/items-dform'+SiteScriptingExt,'function=1&deptid='+ItemPage.DeptID+'&itemid='+ItemPage.ItemID);}function IP_ItemCompare(){DHTML_LoadContent(SiteRootDirectory+'intcom/items'+SiteScriptingExt,256,'deptid='+ItemPage.DeptID+'&itemid='+ItemPage.ItemID);}function IP_BeginCheckout(){if(ip_flags&0x20000000)return ;Redirect(IP_SCRIPTROOTDIRECTORY+'mcart-checkout-addresses'+SiteScriptingExt);}function IP_Login(_l,_9R,_Q,_){if(ip_flags&0x20000000)return ;if(ip_flags&0x40000000)return ;PgitR.LoginCallback=_9R;var _x=_;if(ip_returnurl!='')_x+=((_x.indexOf('?')==-1)?'?':'&')+'returnurl='+escape(ip_returnurl+ItemPage.ItemID);var _Ww='',_j='';if(ItemPage.Callbacks.LoginContent!=''){var _zF=SmartEval(ItemPage.Callbacks.LoginContent,'\''+JSClean(_Q)+'\'');if(_zF!=null&&typeof(_zF)=='object'){if(typeof(_zF.Content)!='undefined')_Ww=_zF.Content;if(typeof(_zF.Title)!='undefined')_j=_zF.Title;}}if(_j=='')_j='Log In Required';if(_Ww==''){switch(_Q){case 'wishlist':_Ww='<p>'+'<b>You must log in to add items to your Wish List.</b>'+'</p>'+'<p>&nbsp;</p>'+'<p>'+'You will now be taken to the Login page.'+' After you log in, this item will automatically be added to your Wish List,'+' and then you will be automatically returned to this page.'+'</p>';break;case 'registry':_Ww='<p>'+'<b>You must log in to add items to your Registry.</b>'+'</p>'+'<p>&nbsp;</p>'+'<p>'+'You will now be taken to the Login page.'+' After you log in, you will be automatically returned to this page,'+' and you can add this item to your Registry at that time!'+'</p>';break;default:_Ww='You must log in to use this feature. You will be returned to this page once you log in.';}}DHTML_Confirm(_Ww,_j,'Redirect(\''+JSClean(_x)+'\');','');}function IP_LoginSuccessful(){if(ip_flags&0x20000000)return ;if(!(ip_flags&0x0200)||ip_flags&0x40000000)return ;ip_flags&=~0x0200;ip_flags|=0x40000000;if(PgitR.LoginCallback!=''){setTimeout(PgitR.LoginCallback,10);PgitR.LoginCallback='';}}function IP_AddToRegistryInner(_){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(ip_flags&0x10)return ;if(_<=0)return ;if(ip_flags&0x40000000){var _Nl=IP_ChildDataGetByID(_);if(_Nl<0){PgitR.LastIndices[6]=IP_IntComCall(12,'childid='+_+'&flags=3','IP_IntComChildData');return ;}if(IPSharedData.RegistryNum<0){DHTML_IntComRequest(IP_INTCOMROOTDIRECTORY+'intcom/registry'+SiteScriptingExt,128,'childid='+_,'IP_IntComGetRegistryList',{timeout:PgitX,flags:0x01,ondataerror:'IP_IntComError'});IP_IntComToggle(DHTML_IntComLastIndex,true);return ;}IP_AddToRegistryPopup(_Nl);}else {IP_Login('itempage','IP_AddToRegistryInner('+_+');','registry',IP_SCRIPTROOTDIRECTORY+'registry'+SiteScriptingExt+'?function=64&childid='+_);}}function IP_AddToRegistryPopup(_PRy){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;var _7,_3,_p;var _=IPSharedData.CachedChildData[_PRy];var _0=_.ID;if(!IPSharedData.RegistryNum){_7='<div class="IPAddToRegistryNone">';if(ItemPage.Callbacks.RegistryNone!='')_p=SmartEval(ItemPage.Callbacks.RegistryNone);else _p='';if(_p=='')_p='Before you can add this item to a registry, you need to create one first.';_7+='<div class="IPATRCContent0"><div class="IPATRCContent1">'+_p+'</div></div>';_7+='<div class="IPDPopupButtonRegion0"><div class="IPDPopupButtonRegion1">';_7+='<div class="IPDPBRButtons"><div class="IPDPBRBButton First">';if(IPSharedData.Buttons.CreateReg!=''){_7+=GetImageHTML(SiteRootDirectory+'registry'+SiteScriptingExt+'?function=4&childid='+_0,IPSharedData.Buttons.CreateReg,IPSharedData.Buttons.CreateRegWid,IPSharedData.Buttons.CreateRegHei,'','',0x02);}else {_7+='<a href="'+FormFix(SiteRootDirectory+'registry'+SiteScriptingExt+'?function=4&childid='+_0)+'">'+'Create a registry now'+'</a>';}_7+='</div></div>';_7+='<div class="IPDPBRCloseLink">'+'or <a href="#" onclick="DHTML_WMHide(0); return PreventDefault(event);">close window without creating a registry</a>'+'</div>';_7+='</div></div>';_7+='</div>';DHTML_Alert(_7,'You haven\'t created a registry yet...');return ;}_7='<div class="IPAddToRegistry'+((IPSharedData.RegistryNum==1)?'Single':'Many')+'">';_p='';if(IPSharedData.RegistryNum==1){if(ItemPage.Callbacks.RegistrySingle!='')_p=SmartEval(ItemPage.Callbacks.RegistrySingle,_PRy);if(_p==''){_p='Please select the '+'<span class="IPATRCCQuantity">quantity</span>'+' of '+'<span class="IPATRCCItemName">"'+_.ParentName+'"</span>'+' you wish to add to add to your registry:';}}else {if(ItemPage.Callbacks.RegistryMany!='')_p=SmartEval(ItemPage.Callbacks.RegistryMany,_PRy);if(_p==''){_p='Please select which registry(s) you wish to add '+'<span class="IPATRCCItemName">"'+_.ParentName+'"</span>'+' to (you can add it to more than one) and then select the desired'+' <span class="IPATRCCQuantity">quantity</span>'+':';}}_7+='<div class="IPATRCContent0"><div class="IPATRCContent1">'+_p+'</div></div>';_7+='<div class="IPATRError0" id="IPATRError"><div class="IPATRError1">&nbsp;</div></div>';_7+='<div class="IPATRList0"><div class="IPATRList1">'+'<form action="#" method="get" id="'+PgitwO+'">'+'<ul class="IPATRListInner">';var _oD,_I5Y;for(_oD=0;_oD<IPSharedData.RegistryNum;_oD++){_7+='<li id="IPATRListItem'+_oD+'"';if(IPSharedData.RegistryNum==1)_7+=' class="Active"';_7+='>';if(IPSharedData.RegistryNum>1){_7+='<div class="IPATRLICheckBox">'+'<input type="checkbox" name="active'+_oD+'" value="1"'+' onclick="IP_AddToRegistryCheckbox('+_oD+');" onchange="IP_AddToRegistryCheckbox('+_oD+');" />'+'</div>';}_7+='<div class="IPATRLIText">'+FormFix(IPSharedData.RegistryList[_oD][1])+'</div>';_7+='<div class="IPATRLIDropDown">'+'qty: '+'<select name="quantity'+_oD+'">';for(_I5Y=1;_I5Y<=20;_I5Y++){_7+='<option value="'+_I5Y+'">'+_I5Y+'</option>';}_7+='</select>'+'</div>';_7+='<div class="ClearFloats"><img src="'+SiteDotImage+'" width="1" height="1" alt="" /></div>'+'</li>';}_7+='</ul>'+'</form>'+'</div></div>';_7+='<div class="IPDPopupButtonRegion0"><div class="IPDPopupButtonRegion1">';_7+='<div class="IPDPBRButtons"><div class="IPDPBRBButton First">';if(IPSharedData.RegistryNum==1){if(IPSharedData.Buttons.AddToReg!=''){_7+=GetImageHTML('javascript: IP_AddToRegistrySubmit('+_0+');',IPSharedData.Buttons.AddToReg,IPSharedData.Buttons.AddToRegWid,IPSharedData.Buttons.AddToRegHei,'','',0x02);}else {_7+='<a href="javascript: IP_AddToRegistrySubmit('+_0+');">'+'Add to registry'+'</a>';}}else {if(IPSharedData.Buttons.AddToRegs!=''){_7+=GetImageHTML('javascript: IP_AddToRegistrySubmit('+_0+');',IPSharedData.Buttons.AddToRegs,IPSharedData.Buttons.AddToRegsWid,IPSharedData.Buttons.AddToRegsHei,'','',0x02);}else {_7+='<a href="javascript: IP_AddToRegistrySubmit('+_0+');">'+'Add to registries'+'</a>';}}_7+='</div></div>';_7+='<div class="IPDPBRCloseLink">'+'or <a href="#" onclick="DHTML_WMHide(0); return PreventDefault(event);">close window without adding to a registry</a>'+'</div>';_7+='</div></div>';_7+='</div>';DHTML_Alert(_7,(IPSharedData.RegistryNum==1)?'Select Quantity...':'Select Registry(s) and Quantity...');}function IP_AddToRegistryCheckbox(_x){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;var _=GP(PgitwO).elements['active'+_x].checked;SetClass('IPATRListItem'+_x,_?'Active':'');}function IP_AddToRegistryError(_){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;SetContent('IPATRError',_);SetVisible('IPATRError',1);WM_Window_ReDraw(DHTML_WMWindows[0].WindowID);}function IP_AddToRegistrySubmit(_utV){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;var _,_izP;var _uf=IP_ChildDataGetByID(_utV);if(_uf<0)return ;var _X=IPSharedData.CachedChildData[_uf];var _Nr=GP(PgitwO);_izP='childid='+_utV+'&extraid=0&description='+escape(_X.Description)+'&numregs='+IPSharedData.RegistryNum;if(IPSharedData.RegistryNum==1){IPSharedData.RegistryList[0][2]=(_Nr.quantity0.selectedIndex+1);_izP+='&registry0_id='+IPSharedData.RegistryList[0][0]+'&registry0_quantity='+IPSharedData.RegistryList[0][2];}else {var _ZLp=0,_,_02;for(_=0;_<IPSharedData.RegistryNum;_++){_izP+='&registry'+_+'_id='+IPSharedData.RegistryList[_][0]+'&registry'+_+'_quantity=';if(_Nr.elements['active'+_].checked){_02=_Nr.elements['quantity'+_].selectedIndex+1;_ZLp++;}else {_02=0;}_izP+=_02;IPSharedData.RegistryList[_][2]=_02;}if(!_ZLp){IP_AddToRegistryError('You have not selected a registry to add the item to.'+' Please check all registries to which you wish to add the item,'+' select the correct quantity, and try again.');return ;}}DHTML_WMHide(0);DHTML_IntComRequest(IP_INTCOMROOTDIRECTORY+'intcom/registry'+SiteScriptingExt,129,_izP,'IP_IntComAddToRegistry',{timeout:PgitX,flags:0x01,ondataerror:'IP_IntComError'});IP_IntComToggle(DHTML_IntComLastIndex,true);}function IP_ItemAddedDisplay(_,_zmK,_O,_g,_Xpj,_0K6,_0x3){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;if(typeof(_O)=='undefined'||_O==null)_O='';if(typeof(_g)=='undefined'||_g==null)_g='';if(typeof(_Xpj)=='undefined'||_Xpj==null)_Xpj='';if(typeof(_0K6)=='undefined'||_0K6==null)_0K6='';if(typeof(_0x3)=='undefined'||_0x3==null)_0x3='';var _W=IPSharedData.CachedChildData[_];var _N='',_Dgf;_N='<div class="IPItemAddedRegion">';_N+='<div class="IPIARContent0"><div class="IPIARContent1">';if(_zmK&0x01){_N+='<div class="IPIARCBad0"><div class="IPIARCBad1">'+'<span>Oops! This item...</span>'+'</div></div>';}else {_N+='<div class="IPIARCGood0"><div class="IPIARCGood1">'+'<span>This item...</span>'+'</div></div>';}_N+='<div class="IPIARCItemData0"><div class="IPIARCItemData1">';_N+='<div class="IPIARCIDImage">'+'<img src="'+PathFormFix(_W.ImageThumb)+'"'+' width="'+_W.ImageThumbWid+'" height="'+_W.ImageThumbHei+'" alt="" />'+'</div>';_N+='<div class="IPIARCIDContent">'+'<div class="IPIARCIDCItemName">'+FormFix(_W.ParentName)+'</div>'+'<div class="IPIARCIDCDescription">'+_W.Description+'</div>'+'<div class="IPIARCIDCPrice">'+FormFix(FormatMoney(_W.Price,0x01))+'</div>'+'</div>';_N+='<div class="ClearFloats"><img src="'+SiteDotImage+'" width="1" height="1" alt="" /></div>'+'</div></div>';if(_g!=''){_N+='<div class="IPIARCBottom0"><div class="IPIARCBottom1">'+_g+'<div class="ClearFloats"><img src="'+SiteDotImage+'" width="1" height="1" alt="" /></div>'+'</div></div>';}_N+='<div class="ClearFloats"><img src="'+SiteDotImage+'" width="1" height="1" alt="" /></div>'+'</div></div>';_N+='<div class="IPDPopupButtonRegion0"><div class="IPDPopupButtonRegion1">';_N+='<div class="IPDPBRButtons">';_N+='<div class="IPDPBRBButton First">';if(IPSharedData.Buttons.ContinueShopping!=''){_N+=GetImageHTML('#',IPSharedData.Buttons.ContinueShopping,IPSharedData.Buttons.ContinueShoppingWid,IPSharedData.Buttons.ContinueShoppingHei,'','',0x02,'','','DHTML_WMHide(0); return PreventDefault(event);');}else {_N+='<a href="javascript: DHTML_WMHide(0);">'+'Continue Shopping'+'</a>';}_N+='</div>';if(_Xpj!=''){_Dgf=false;_N+='<div class="IPDPBRBButton">';if(_0K6!=''){if(IPSharedData.Buttons[_0K6]!=''){_Dgf=true;_N+=GetImageHTML(_Xpj,IPSharedData.Buttons[_0K6],IPSharedData.Buttons[_0K6+'Wid'],IPSharedData.Buttons[_0K6+'Hei'],'','',0x02);}}if(!_Dgf){_N+='<a href="'+FormFix(_Xpj)+'">'+_0x3+'</a>';}_N+='</div>';}_N+='</div>';_N+='<div class="IPDPBRCountDown">'+'This window will close in <span id="IPDPBRCountDownInner">10 seconds</span>'+'</div>';_N+='</div></div>';_N+='</div>';if(_O=='')_O=(_zmK&0x01)?'Oops! Item not added...':'Success!';DHTML_Alert(_N,_O,0,0,{countdowntimer:10,countdownregion:'IPDPBRCountDownInner'});}function IP_ItemAddedRelay(_0cQ,_vWu,_FoI,_2K,_,_xD,_s){if(!(ip_flags&0x08)||(ip_flags&0x20000000))return ;var _sx=IP_ChildDataGetByID(_0cQ);if(_sx>=0){IP_ItemAddedDisplay(_sx,_vWu,_FoI,_2K,_,_xD,_s);return ;}PgitR.ExtraValues[8]=_vWu;PgitR.ExtraValues[9]=_FoI;PgitR.ExtraValues[10]=_2K;PgitR.ExtraValues[11]=_;PgitR.ExtraValues[12]=_xD;PgitR.ExtraValues[13]=_s;PgitR.LastIndices[5]=IP_IntComCall(12,'childid='+_0cQ+'&flags=3','IP_IntComChildData');}function IP_DHTMLPageLoad(_A,_,_r,_Svx){if(typeof(_)=='undefined'||_==null)_=0;if(typeof(_r)=='undefined'||_r==null)_r='';if(typeof(_Svx)=='undefined'||_Svx==null)_Svx='';if(_Svx==''){PgitR.ExtraValues[2]=IP_SCRIPTROOTDIRECTORY+IP_INTCOM_ITEMPAGE+'?itemid='+_A;}else {PgitR.ExtraValues[2]=_Svx;}if(_){if(PgitR.ExtraValues[2].indexOf('?')==-1)PgitR.ExtraValues[2]+='?';else PgitR.ExtraValues[2]+='&';PgitR.ExtraValues[2]+='deptid='+_;}if(_r!=''){if(PgitR.ExtraValues[2].indexOf('?')==-1)PgitR.ExtraValues[2]+='?';else PgitR.ExtraValues[2]+='&';PgitR.ExtraValues[2]+=_r;}if(User.InIE5||(ip_flags&0x08&&!(ItemPage.PageFlags&0x10000000))||(ItemPageStatic.CookieItemControlFlags&0x02)){Redirect(PgitR.ExtraValues[2]);return ;}if(!PageLoaded){PgitR.ExtraValues[4]=_A;PgitR.ExtraValues[5]=_;PgitR.ExtraValues[6]=_r;return ;}if(ItemPage!=null){if(ItemPage.ItemID==_A)return ;}if(ip_wmwindow==null){ip_wmwindow=WM_Window_GetPointer(WM_Window_Create());if(ip_wmwindow==null){Redirect(PgitR.ExtraValues[2]);return ;}var _F4;ip_wmwindow.Wid=0;ip_wmwindow.Hei=0;ip_wmwindow.WidMin=600;ip_wmwindow.HeiMin=150;ip_wmwindow.WidMax=750;_F4=GetWinHei()-150;if(_F4<300)_F4=300;ip_wmwindow.HeiMax=_F4;ip_wmwindow.TitleBarFlags=0x31;ip_wmwindow.Options|=0xC1;ip_wmwindow.Title='Loading...';ip_wmwindow.ButtonFlags=0x0101;ip_wmwindow.OnButtonClose='IP_DHTMLPageClose();';ip_wmwindow.OnClose='IP_DHTMLPageClose();';IPCustom_DHTMLWMConfigure();}PgitR.ExtraValues[1]='dyn=1&ver='+escape(INCLUDES.page_items)+'&itemid='+_A;if(_)PgitR.ExtraValues[1]+='&deptid='+_;if(_r!='')PgitR.ExtraValues[1]+='&'+_r;IP_DHTMLPageReload();}function IP_DHTMLPageReload(){if(PgitR.ExtraValues[0]>=0){DHTML_IntComCancel(PgitR.ExtraValues[0]);PgitR.ExtraValues[0]=-1;}if(ip_flags&0x08){IP_DeInitialize();ip_flags|=0x20000008;}IPInternalDHTMLLoadedData=null;DHTML_IntComRequest(IP_INTCOMROOTDIRECTORY+IP_INTCOM_ITEMPAGE,0,PgitR.ExtraValues[1],'IP_IntComDHTMLPage',{timeout:PgitX,flags:0x02,ondataerror:'IP_IntComDHTMLPageError'});IP_IntComToggle(DHTML_IntComLastIndex,true);PgitR.ExtraValues[0]=DHTML_IntComLastIndex;if(ip_flags&0x20000000&&!(ip_flags&0x08))return ;if(ip_flags&0x08){ip_flags&=~0x08;IPCustom_DHTMLSwitch(0x01);if(ip_flags&0x20000000){setTimeout('IP_DHTMLPageRetry();',Pgit);return ;}}else {IPCustom_DHTMLSwitch(0x00);}}function IP_DHTMLPageRetry(){if(ip_flags&0x20000000){setTimeout('IP_DHTMLPageRetry();',Pgit);return ;}if(IPInternalDHTMLLoadedData!=null)IP_DHTMLPageLoadFinal();}function IP_DHTMLPageLoadFinal(){if(IPInternalDHTMLLoadedData==null)return ;IP_PageRestart();if(IPInternalDHTMLLoadedData[0]!='')eval(IPInternalDHTMLLoadedData[0]);if(IPInternalDHTMLLoadedData[1]=='')return ;if(IPInternalDHTMLLoadedData[2]!='')eval(IPInternalDHTMLLoadedData[2]);curval=GetWinHei()-150;if(curval<300)curval=300;ip_wmwindow.HeiMax=curval;IPCustom_DHTMLSwitch(0x0D);IPCustom_DHTMLWMConfigure();IP_DHTMLUpdatePopup(IPInternalDHTMLLoadedData[1],FormFix(ItemPage.ItemData.Name));IPInternalDHTMLLoadedData=null;IPCustom_DHTMLSwitch(0x0E);setTimeout('IP_DHTMLPageLoadFinal2();',10);}function IP_DHTMLUpdatePopup(__E2,_){ip_wmwindow.Title=_;SetContent((ip_wmwindow.Options&0x10)?ip_wmwindow.WindowContentCustom:ip_wmwindow.WindowContentInner,__E2);WM_Window_ReDraw(ip_wmwindow.WindowID);WM_Window_SetVisible(ip_wmwindow.WindowID,1);}function IP_DHTMLPageLoadFinal2(){IP_PreInitialize();IPCustom_DHTMLSwitch(0x0F);}function IP_DHTMLPageClose(){if(!(ip_flags&0x08)||(ip_flags&0x20000000)||!(ItemPage.PageFlags&0x10000000)){if(ip_wmwindow!=null)WM_Window_SetVisible(ip_wmwindow.WindowID,0);return false;}IP_DeInitialize();DHTML_WMHideAll();ip_flags|=0x20000000;IPCustom_DHTMLSwitch(0x10);return false;}function IP_DHTMLToggle(_k01){if(PgitR.ExtraValues[0]!=-1)return ;if(_k01==0||_k01==1)_k01=(ItemPage.PageFlags&0x10000000)?1:0;PgitR.ExtraValues[3]=_k01;DHTML_IntComRequest(IP_INTCOMROOTDIRECTORY+IP_INTCOM_SCRIPT,128,'newstatus='+((ItemPageStatic.CookieItemControlFlags&0x02)?0:1)+'&flagbit=1','IP_IntComDHTMLToggle',{timeout:5000,flags:0x02,ondataerror:'IP_IntComDHTMLToggleError'});PgitR.ExtraValues[0]=DHTML_IntComLastIndex;IP_IntComToggle(DHTML_IntComLastIndex,true);}function IP_IntComDHTMLPage(_){IP_IntComToggle(_,false);if(PgitR.ExtraValues[0]!=_)return ;PgitR.ExtraValues[0]=-1;var _89Q=DHTML_IntComData[_].FullResponse.charAt(0);if(_89Q!='1'){if(_89Q!='0'){DHTML_Alert('<b>The server has returned an unexpected error message:</b><br />'+DHTML_IntComData[_].FullResponse,'Unknown Error',0,0,{timeout:8000});}else {DHTML_Alert('<b>The server was unable to load the page because:</b><br />'+DHTML_IntComData[_].FullResponse.substring(1),'Unable to Load Item Page',0,0,{timeout:8000});}return ;}var _J=DHTML_IntComData[_].FullResponse.split(Pgitef),z=1;if(_J.length<5){z=0;}else {if(_J[4]!=Pgit_3){z=0;}else {IPInternalDHTMLLoadedData=[];IPInternalDHTMLLoadedData[0]=_J[1];IPInternalDHTMLLoadedData[1]=_J[2];IPInternalDHTMLLoadedData[2]=_J[3];}}if(!z){DHTML_Alert('<b>The data for the item page was not fully returned.'+' This is likely due to a disruption in internet connectivity.'+' Please check your internet connection and try again.</b>','Unable to Display Item Page',0,0,{timeout:8000});return ;}if(!(ip_flags&0x20000000))IP_DHTMLPageLoadFinal();}function IP_IntComDHTMLPageError(_){IP_IntComToggle(_,false);if(PgitR.ExtraValues[0]!=_)return ;PgitR.ExtraValues[0]=-1;if(DHTML_IntComData[_].FullResponse==''){IPCustom_DHTMLNoData('IP_DHTMLPageReload();',PgitR.ExtraValues[2]);return ;}var _n=DHTML_IntComData[_].FullResponse.charAt(0);var _kl;if(_n=='0')_kl='The item page could not be loaded because: '+DHTML_IntComData[_].FullResponse.substring(1);else _kl='The response returned was not recognizable.';DHTML_Alert(_kl,'Unable to Load Item Page');}function IP_IntComDHTMLToggle(_I){IP_IntComToggle(_I,false);if(PgitR.ExtraValues[0]!=_I)return ;PgitR.ExtraValues[0]=-1;if(DHTML_IntComData[_I].FullResponse.substr(0,1)!='1'){IP_IntComDHTMLToggleError();return ;}var _Kt;_Kt=Cast(DHTML_IntComData[_I].FullResponse.substr(1,1),CAST_INT);if(_Kt)ItemPageStatic.CookieItemControlFlags|=0x02;else ItemPageStatic.CookieItemControlFlags&=~0x02;var _mWV;_mWV=IPCustom_DHTMLToggle(_Kt?0:1,PgitR.ExtraValues[3]);if(typeof(_mWV)!='undefined'&&!_mWV)return ;if((PgitR.ExtraValues[3]==1||PgitR.ExtraValues[3]==2)&&ip_flags&0x08)IP_DHTMLPageClose();switch(PgitR.ExtraValues[3]){case 0:if(!_Kt){POL_SetVisible(1);Redirect(IP_SCRIPTROOTDIRECTORY+'depts'+SiteScriptingExt+'?deptid='+ItemPage.DeptID+'&itemid='+ItemPage.ItemID);return ;}break;case 1:break;case 2:break;}}function IP_IntComDHTMLToggleError(_){IP_IntComToggle(_,false);if(PgitR.ExtraValues[0]!=_)return ;PgitR.ExtraValues[0]=-1;DHTML_Alert('An error occurred communicating with our server. Please check your internet connection and try again.','',0x01);}