var Log={out:function(A){if(typeof (console)!="undefined"&&console.log){console.log(A)}},warn:function(A){if(console&&console.warn){console.warn(A)}else{Log.out("WARNING: "+A)}},error:function(A){if(console&&console.error){error(A)}else{Log.out("ERROR: "+A)}},dump:function(A){try{Log.warn("PROPERTY DUMP: "+A.nodeName+" : "+A);for(var E in A){var D=null;var B=null;var C=null;try{D=A[E];B=typeof (D);C="   type : "+B;if(B!="function"){C+="\n   value : "+D}}catch(F){C=""}Log.out(E+"\n"+C)}}catch(F){Log.out("could not dump properties for object: "+F)}},printStack:function(){if(console&&console.trace){console.trace()}}};Object.extend(String.prototype,{contentForTagName:function(C){var B="<"+C+">";var A="</"+C+">";var D=new RegExp(B,"i");var E=new RegExp(A,"i");return this.substring(this.search(D)+B.length,this.search(E))}});var STIConfirmDialogBox=Class.create({callBackOptions:null,initialize:function(C){Object.extend(this,new DialogBox(Object.extend(arguments[1]||{},{center:true,draggable:false,overlay:true,resizable:false,showTitleBar:true})));this.callBackOptions=C;this.showOverlay();this.options.overlay=true;var J=$("dialogBoxContent");Element.makeEmpty(J);Element.classNames("dialogBox").set("ModalWindow");Element.classNames("dialogBoxTitleBar").set("ModalTop");Element.classNames("dialogBoxContent").set("ModalContent");Element.classNames("dialogBoxFooter").set("ModalBottom");J.appendChild(document.createElement("br"));var D=document.createElement("div");Element.setStyle(D,{textAlign:"center"});var F=document.createElement("h2");F.appendChild(document.createTextNode(C.get("alertTitle")));D.appendChild(F);D.appendChild(document.createTextNode(C.get("alertText")));var A=document.createElement("div");Element.setStyle(A,{margin:"10px auto 0px auto",width:"178px"});var B=document.createElement("div");Element.classNames(B).set("BtnOk");Element.setStyle(B,{cssFloat:"left"});var E=document.createElement("a");E.setAttribute("href","#");E.onclick=this.okEventListener.bindAsEventListener(this);B.appendChild(E);A.appendChild(B);var G=document.createElement("div");Element.classNames(G).set("BtnCancel");Element.setStyle(G,{cssFloat:"right"});var I=document.createElement("a");I.setAttribute("href","#");I.onclick=this.declineEventListener.bindAsEventListener(this);G.appendChild(I);A.appendChild(G);var H=document.createElement("div");Element.setStyle(H,{clear:"both"});A.appendChild(H);D.appendChild(A);J.appendChild(D);this.openDialogBox("ModalDialogBox")},okEventListener:function(){window.location.href=this.callBackOptions.get("callBackHref")},declineEventListener:function(){DialogBox.prototype.closeDialogBox()}});var STIAlertDialogBox=Class.create({callbackOptions:null,initialize:function(){Object.extend(this,new DialogBox(Object.extend(arguments[2]||{},{center:true,draggable:false,overlay:true,resizable:false,showTitleBar:true,width:300,height:150})))}});var ClipboardDialogBox=Class.create({initialize:function(A){Object.extend(this,new DialogBox(Object.extend(arguments[1]||{},{center:false,draggable:true,overlay:false,resizable:false,showTitleBar:true})));var D=new Array();for(var B in A){var C=A[B];D.push('<div class="ClipboardContentRow">');D.push('<div class="ClipboardRemove">');D.push('<a href="#" onclick="document.comparisonClipboard().removeClipboardItem(\''+B+"', event); return false;\">");D.push('<img src="/ss/i/img_clipboard_remove.gif" alt="X" class="Remove" />');D.push("</a>");D.push("</div>");D.push('<div class="ClipboardDescription">');D.push('<img src="'+C.imageURL+'" width="'+C.imageWidth+'" height="'+C.imageHeight+'" alt="" class="Photo" />');D.push('<p class="Title"><a href="'+C.productURL+'">'+C.productName+"</a></p>");D.push('<p class="RedPrice">');if(C.minPrice==C.maxPrice){D.push(C.minPrice)}else{D.push(C.minPrice+" to "+C.maxPrice)}D.push("</p>");D.push("</div>");D.push('<div class="clear"></div>');D.push("</div>")}Element.classNames("dialogBox").set("ComparisonClipboard");Element.classNames("dialogBoxTitleBar").set("ClipboardHeader");Element.classNames("dialogBoxContent").set("ClipboardContent");Element.classNames("dialogBoxFooter").set("ClipboardFooter");Element.update("dialogBoxContent",D.join(""));Element.update("dialogBoxTitleBar",'<div class="ClipboardClose"><a href="#" onclick="document.comparisonClipboard().closeDialogBox(Effect.Shrink, {}); return false;"><img src="/ss/i/img_clipboard_close.gif" alt="Close Clipboard" /></a></div>');Element.update("dialogBoxFooter",'<div class="ClipboardButtons"><div class="ClipboardClearAll"><a href="#" onclick="document.comparisonClipboard().clearAll(); return false;"></a></div><div class="ClipboardButton"><a href="#" onclick="document.comparisonClipboard().submitClipboardForm(); return false;"></a></div></div>');this.openDialogBox("clipboardDialogBox",Effect.Appear)}});var WishListDialogBox=Class.create({woActionName:"ajax",woActionTypes:{showWishList:"actionWishList",addItem:"actionWishList",removeItem:"actionWishListRemove",createMessage:"actionWishListCreateMessage",saveItem:"actionWishListSaveWishListProduct",previewMessage:"actionWishListPreviewMessage",editMessage:"actionWishListCreateMessage",sendMessage:"actionWishListSend",quickSendMessage:"actionWishListQuickSend",createNewWishList:"actionWishListCreateWishList",showWishListLogin:"actionShowWishListLogin",loginWishList:"actionWishListLogin",lostPassword:"actionLostPasswordForWishList",resetPassword:"actionResetPasswordForWishList",saveNewWishList:"actionWishListSaveNewWishList",changeActiveWishList:"actionWishListChangeWishList",savePassword:"actionSavePasswordForLogin",mergingOptions:"actionWishListMergingOptions",saveNewWishListMergeOption:"actionSaveNewWishListMergeOption",saveExistingWishListMergeOption:"actionSaveExistingWishListMergeOption",cancelMergingOption:"actionCancelMergeOption",changeActiveFamilyMember:"actionWishListChangeFamilyMember"},lastClickedItem:null,activeItems:null,pageNumber:1,expandFirstRow:false,initialize:function(){Object.extend(this,new DialogBox(Object.extend(arguments[2]||{},{center:false,draggable:true,overlay:false,resizable:false,showTitleBar:true})))},_request:function(B,A){A=A||$H({});A.set("action",B);var E=A.toQueryString();var C=document.pageProperties.isDeveloperMode?SSUrl.prototype.DEVELOPER_CONSTANTS:SSUrl.prototype.PRODUCTION_CONSTANTS;if(!document.pageProperties.isDeveloperMode&&E!=null){E=E.replace(/_/g,"$^$");E=E.replace(/=/g,C.EQUALS);E=E.replace(/$^$/g,C.EQUALS);E=E.replace(/&/g,C.AMPERSAND)}E=C.QUESTION_MARK+E;var D="/"+document.pageProperties.stiBaseURL+"/"+this.woActionName;D+=E;new Ajax.Request(D,{method:"get",onComplete:this.ajaxResponseCallback.bind(this)})},showWishListFromHyperLink:function(A,B){this.pageNumber=1;this._request(this.woActionTypes.showWishList)},cancelAction:function(){this.options.reposition=false;this._request(this.woActionTypes.showWishList)},cancelMergeOptionAction:function(){this.options.reposition=false;this._request(this.woActionTypes.cancelMergingOption)},hideWishListItemDetails:function(A){Effect.BlindUp(A)},addItem:function(B){this.expandFirstRow=true;var A=$H({productId:(B.itemId.split("_"))[1]});this.lastClickedItem=B;this._request(this.woActionTypes.addItem,A)},removeItem:function(B){this.options.reposition=false;var A=$H({productId:(B.itemId.split("_"))[1]});this.lastClickedItem=B;this._request(this.woActionTypes.removeItem,A)},removeItemById:function(D,C,A){this.options.reposition=false;var B=$H({wishListProductId:D,productId:C,page:A});this.lastClickedItem=null;this._request(this.woActionTypes.removeItem,B)},saveWishListItem:function(E,C,G,D,F,A,H){this.expandFirstRow=false;this.options.reposition=false;if(G==""){G=" "}if(H==""){H=" "}var B=$H({wishListProductId:E,wishListId:C,priority:D,qty:F,page:A,merchantId:G,wishListProductComment:H});this.lastClickedItem=null;this._request(this.woActionTypes.saveItem,B)},editWishListItem:function(A){Effect.BlindDown(A)},previewMessage:function(D,C,B){if(D==""){D=" "}if(C==""){C=" "}if(B==""){B=" "}var A=$H({from:D,to:C,message:B});this.options.reposition=false;this.expandFirstRow=false;this.lastClickedItem=null;this._request(this.woActionTypes.previewMessage,A)},editMessage:function(E,D,C,B){if(E==""){E=" "}if(D==""){D=" "}if(C==""){C=" "}var A=$H({from:E,to:D,message:C,wishListId:B});this.options.reposition=false;this.expandFirstRow=false;this.lastClickedItem=null;this._request(this.woActionTypes.editMessage,A)},sendMessage:function(E,D,C,B){if(E==""){E=" "}if(D==""){D=" "}if(C==""){C=" "}var A=$H({from:E,to:D,message:C,wishListId:B});this.options.reposition=false;this.expandFirstRow=false;this.lastClickedItem=null;this._request(this.woActionTypes.sendMessage,A)},quickSendMessage:function(E,D,C,B){if(E==""){E=" "}if(D==""){D=" "}if(C==""){C=" "}var A=$H({from:E,to:D,message:C,wishListId:B});this.options.reposition=false;this.expandFirstRow=false;this.lastClickedItem=null;this._request(this.woActionTypes.quickSendMessage,A)},createNewWishList:function(){this.options.reposition=false;this.expandFirstRow=false;this.lastClickedItem=null;this._request(this.woActionTypes.createNewWishList)},showWishListLogin:function(){this.options.reposition=false;this.expandFirstRow=false;this.lastClickedItem=null;this._request(this.woActionTypes.showWishListLogin)},saveNewWishList:function(D,C,B){if(D==""){D=" "}if(C==""){C=" "}var A=$H({newWishListName:D,isPrivate:B,newWishListDescription:C});this.options.reposition=false;this.expandFirstRow=false;this.lastClickedItem=null;this._request(this.woActionTypes.saveNewWishList,A)},saveNewWishListMergeOption:function(E,D,C,B){if(D==""){D=" "}if(C==""){C=" "}var A=$H({contactId:E,newWishListName:D,isPrivate:B,newWishListDescription:C});this.options.reposition=false;this.expandFirstRow=false;this.lastClickedItem=null;this._request(this.woActionTypes.saveNewWishListMergeOption,A)},saveExistingWishListMergeOption:function(B){var A=$H({wishListId:B});this.options.reposition=false;this.expandFirstRow=false;this.lastClickedItem=null;this._request(this.woActionTypes.saveExistingWishListMergeOption,A)},loginWishList:function(C,B){if(C==""){C=" "}if(B==""){B=" "}var A=$H({userName:C,password:B});this.options.reposition=false;this.expandFirstRow=false;this.lastClickedItem=null;this._request(this.woActionTypes.loginWishList,A)},lostPassword:function(B){if(B==""){B=" "}var A=$H({userName:B});this.options.reposition=false;this.expandFirstRow=false;this.lastClickedItem=null;this._request(this.woActionTypes.lostPassword,A)},resetPassword:function(D,B,C){if(D==""){D=" "}if(B==""){B=" "}if(C==""){C=" "}var A=$H({birthMonth:D,birthDay:B,questionAnswer:C});this.options.reposition=false;this.expandFirstRow=false;this.lastClickedItem=null;this._request(this.woActionTypes.resetPassword,A)},savePassword:function(C,B){if(C==""){C=" "}if(B==""){B=" "}var A=$H({password:C,confirmPassword:B});this.options.reposition=false;this.expandFirstRow=false;this.lastClickedItem=null;this._request(this.woActionTypes.savePassword,A)},mergingOptions:function(B){var A=$H({isNewWishList:B});this.options.reposition=false;this.expandFirstRow=false;this.lastClickedItem=null;this._request(this.woActionTypes.mergingOptions,A)},changeActiveWishList:function(B){var A=$H({wishListId:B});this.options.reposition=false;this.expandFirstRow=false;this.lastClickedItem=null;this._request(this.woActionTypes.changeActiveWishList,A)},changeActiveFamilyMember:function(B){var A=$H({contactId:B});this.options.reposition=false;this.expandFirstRow=false;this.lastClickedItem=null;this._request(this.woActionTypes.changeActiveFamilyMember,A)},updateStatusArea:function(A){Element.update("wishListStatusArea",A)},ajaxResponseCallback:function(A){this.openWishListDialogBox(A.responseText);if(this.lastClickedItem!=null){Effect.Pulsate(($(this.lastClickedItem.itemId)).firstChild,{duration:0})}document.wishList().updateView()},openWishListDialogBox:function(contentHTML){Element.update("dialogBoxTitleBar",contentHTML.contentForTagName("dialogboxtitlebar"));Element.update("dialogBoxContent",contentHTML.contentForTagName("dialogboxcontent"));Element.update("dialogBoxFooter",contentHTML.contentForTagName("dialogboxfooter"));Element.classNames("dialogBox").set("WishList");Element.classNames("dialogBoxTitleBar").set("WishListHeader");Element.classNames("dialogBoxContent").set("WishListContent");Element.classNames("dialogBoxFooter").set("WishListFooter");var itemRowExists=Element.exists("options_0");if(itemRowExists&&this.expandFirstRow){Effect.Appear("options_0")}this.openDialogBox("wishListDialogBox");if(itemRowExists&&this.expandFirstRow){Effect.BlindDown("options_0")}this.options.reposition=true;eval(contentHTML.contentForTagName("dialogboxupdate"))},setWishListBusy:function(){Log.out("TODO: set wish list to busy state with animated image on the wish list popup")},createMessage:function(B){this.options.reposition=false;this.setWishListBusy();var A=$H({wishListId:B});this._request(this.woActionTypes.createMessage,A)},jumpToPage:function(A){var B=$H({page:A});this.options.reposition=false;this.expandFirstRow=false;this.lastClickedItem=null;this._request(this.woActionTypes.showWishList,B)}});var AttributeValuesDialogBox=Class.create({woActionNames:{showAttributeValues:"showAttributeValues",selectAttributeValues:"selectAttributeValues"},attributeIds:null,initialize:function(){Object.extend(this,new DialogBox(Object.extend(arguments[0]||{},{center:false,draggable:true,overlay:false,resizable:false,showTitleBar:true,verticalAlign:"middle"})))},showAttributeValues:function(B){Effect.Pulsate(B.sourceElementId);var A=$H(B);var E=document.pageURL();var F=E.formValues;var G=$H(F);G.unset("catId");G.unset("attributeId");G.unset("refinedTerm");G.unset("nkw");G.unset("maxPrice");G.unset("minPrice");G.unset("currCode");A=A.merge(G);var H=A.toQueryString();var C=document.pageProperties.isDeveloperMode?SSUrl.prototype.DEVELOPER_CONSTANTS:SSUrl.prototype.PRODUCTION_CONSTANTS;if(!document.pageProperties.isDeveloperMode&&H!=null){H=H.replace(/_/g,"$^$");H=H.replace(/=/g,C.EQUALS);H=H.replace(/$^$/g,C.EQUALS);H=H.replace(/&/g,C.AMPERSAND)}H=C.QUESTION_MARK+H;var D="/"+document.pageProperties.stiBaseURL+"/"+this.woActionNames.showAttributeValues;D+=H;new Ajax.Request(D,{method:"get",onComplete:this.showAttributeValuesCallback.bind(this)})},showAttributeValuesCallback:function(A){var C=A.responseText;Element.update("dialogBoxTitleBar",C.contentForTagName("dialogboxtitlebar"));Element.update("dialogBoxContent",C.contentForTagName("dialogboxcontent"));Element.update("dialogBoxFooter",C.contentForTagName("dialogboxfooter"));Element.classNames("dialogBox").set("FeatureFilter");Element.classNames("dialogBoxTitleBar").set("FeatureFilterArrow");Element.classNames("dialogBoxContent").set("FilterValues");Element.classNames("dialogBoxFooter").set("FilterDescription");this.renderDialogBox("attributeValuesDialogBox");var B=51;var E=parseInt(Element.getStyle("dialogBox","top"));var G=Position.lastClickY;var F=G-E-(B/2);if(F<0){F=0}var D=Element.getDimensions("dialogBox");if(D.height<F+B){F=D.height-B}Element.setStyle("dialogBoxTitleBar",{paddingTop:F+"px"});this.showDialogBox(Effect.Appear)}});var SpecialOffersDialogBox=Class.create({woActionNames:{showSpecialOffers:"showSpecialOffers"},initialize:function(){Object.extend(this,new DialogBox(Object.extend(arguments[0]||{},{center:false,draggable:true,overlay:false,resizable:false,showTitleBar:true,verticalAlign:"middle"})))},showSpecialOffers:function(B){var A=$H(B);var E=$H(document.pageURL().developerModeQueryString().toQueryParams());A=A.merge(E);var F=A.toQueryString();var C=document.pageProperties.isDeveloperMode?SSUrl.prototype.DEVELOPER_CONSTANTS:SSUrl.prototype.PRODUCTION_CONSTANTS;if(!document.pageProperties.isDeveloperMode&&F!=null){F=F.replace(/_/g,"$^$");F=F.replace(/=/g,C.EQUALS);F=F.replace(/$^$/g,C.EQUALS);F=F.replace(/&/g,C.AMPERSAND)}F=C.QUESTION_MARK+F;var D="/"+document.pageProperties.stiBaseURL+"/"+this.woActionNames.showSpecialOffers;D+=F;new Ajax.Request(D,{method:"get",onComplete:this.showSpecialOffersCallback.bind(this)})},showSpecialOffersCallback:function(A){var C=A.responseText;Element.update("dialogBoxTitleBar",C.contentForTagName("dialogboxtitlebar"));Element.update("dialogBoxContent",C.contentForTagName("dialogboxcontent"));Element.update("dialogBoxFooter",C.contentForTagName("dialogboxfooter"));Element.classNames("dialogBox").set("SpecialOffers");Element.classNames("dialogBoxTitleBar").set("FeatureFilterArrow");Element.classNames("dialogBoxContent").set("FilterValues");Element.classNames("dialogBoxFooter").set("SpecialOffersDescription");this.renderDialogBox("specialOffersDialogBox");var B=51;var E=parseInt(Element.getStyle("dialogBox","top"));var G=Position.lastClickY;var F=G-E-(B/2);if(F<0){F=0}var D=Element.getDimensions("dialogBox");if(D.height<F+B){F=D.height-B}Element.setStyle("dialogBoxTitleBar",{paddingTop:F+"px"});this.showDialogBox(Effect.Appear)}});var Clipboard=Class.create({options:{},clipboardNonPageItems:null,clipboardActiveItems:null,clipboardPageItems:null,clipboardCookieDays:0,clipboardCookieAttrDelim:"<!",clipboardCookieItemDelim:"<@",clipboardCookieKeyValueDelim:"<#",clipboardCookieName:"ShopShopClipboard",dialogBox:null,initialize:function(){this.clipboardNonPageItems=new Object();this.clipboardActiveItems=new Object();this.clipboardPageItems=new Object();this.options=Object.extend({clipboardFormName:null,clipboardType:null},arguments[0]||{})},updateInternalState:function(){var K=Cookie.read(this.clipboardCookieName);if(K){K=unescape(K);var N=K.split(this.clipboardCookieItemDelim);var F=0;var G=0;var L=0;for(F;F<N.length;F++){var E=N[F].split(this.clipboardCookieAttrDelim);var M=new Object();var J=0;for(J;J<E.length;J++){var D=(E[J]).split(this.clipboardCookieKeyValueDelim);M[D[0]]=D[1]}if(M.clipboardType==this.options.clipboardType){this.clipboardActiveItems[M.itemId]=M;if($(M.itemId)!=null){this.clipboardPageItems[L++]=M}else{if(this.options.clipboardFormName!=null){var A=document.forms[this.options.clipboardFormName];if(A){var I=M.itemId.split("_");var C=I[1];var H=I[0];this.clipboardNonPageItems[G++]=M;var B=document.createElement("input");B.setAttribute("type","hidden");B.value=C;B.id=M.itemId;if(H==this.options.clipboardType){B.setAttribute("name",this.options.clipboardType)}A.insertBefore(B,A.firstChild)}}}}}}},updateClipboardCookie:function(){var E=0;var J;var A="";var D=true;var F=Object.extend(new Object(),this.clipboardActiveItems);var I=Cookie.read(this.clipboardCookieName);if(I){I=unescape(I);var K=I.split(this.clipboardCookieItemDelim);for(E;E<K.length;E++){var C=K[E].split(this.clipboardCookieAttrDelim);J=new Object();var G=0;for(G;G<C.length;G++){var B=(C[G]).split(this.clipboardCookieKeyValueDelim);J[B[0]]=B[1]}if(J.clipboardType!=this.options.clipboardType){F[J.itemId]=J}}}for(var H in F){J=F[H];if(D){D=!D;A+=this.createClipboardCookieValue(J)}else{A+=this.clipboardCookieItemDelim+this.createClipboardCookieValue(J)}}Cookie.write({name:this.clipboardCookieName,expires:"",path:"/",value:escape(A)})},createClipboardCookieValue:function(B){var C="";var A=true;if(!B.clipboardType||B.clipboardType==null){B.clipboardType=this.options.clipboardType}for(property in B){if(typeof (B[property])!="undefined"){if(A){A=!A}else{C+=this.clipboardCookieAttrDelim}C+=property+this.clipboardCookieKeyValueDelim+B[property]}}return C},removeActiveItemById:function(A){delete this.clipboardActiveItems[A];this.updateClipboardCookie()},removeAllItems:function(){var B;for(B in this.clipboardActiveItems){delete this.clipboardActiveItems[B]}for(B in this.clipboardNonPageItems){var A=this.clipboardNonPageItems[B];$(A.itemId).remove();delete this.clipboardNonPageItems[B]}this.updateClipboardCookie()},removeActiveItem:function(A){this.removeActiveItemById(A.itemId)},addActiveItem:function(A){this.clipboardActiveItems[A.itemId]=A;this.updateClipboardCookie()},closeDialogBox:function(B,A){if(this.dialogBox!=null){this.dialogBox.closeDialogBox(B,A)}}});var ComparisonClipboard=Class.create({clipboardLastAddedItemId:undefined,clipboardHighlightRow:false,clipboardPageNumber:1,localizedText:null,selectedClipboardItemsOnPage:null,initialize:function(){Object.extend(this,new Clipboard({clipboardType:"comparison",clipboardFormName:"clipboardForm"}))},updateView:function(){var C;var K;if(this.options.clipboardFormName!=null&&document.forms[this.options.clipboardFormName]){var F=document.forms[this.options.clipboardFormName].elements[this.options.clipboardType];if(!F){var J;if(this.selectedClipboardItemsOnPage==null){for(J in this.clipboardPageItems){K=this.clipboardPageItems[J];C=$(K.itemId);if(C){if(this.clipboardActiveItems[K.itemId]){this.turnLinkOff(C,K)}else{this.turnLinkOn(C,K)}}}}else{for(J in this.clipboardPageItems){var G=this.clipboardPageItems[J];var B=G.itemId;C=$(B);var E=false;for(var D=0;D<this.selectedClipboardItemsOnPage.length;D++){var H=this.selectedClipboardItemsOnPage[D];if(H==B){E=true}}if(E){this.turnLinkOff(C,G)}else{this.turnLinkOn(C,G)}}}}else{if(!F.length){var A=new Array();A.push(F);F=A}for(var I=0;I<F.length;I++){F[I].checked=false;for(J in this.clipboardActiveItems){K=this.clipboardActiveItems[J];if(F[I].id==K.itemId){F[I].checked=true}}}}}},checkClipboardItem:function(B){var E=Event.element(B);var D=this.clipboardPageItems[E.id];this.closeDialogBox();if(E.checked==null){var A=$(D.itemId);if(this.selectedClipboardItemsOnPage==null){this.selectedClipboardItemsOnPage=new Array()}this.selectedClipboardItemsOnPage=this.selectedClipboardItemsOnPage.without(D.itemId);if(E.firstChild){Effect.Pulsate(E.firstChild,{duration:6})}var C=this.isSelected(E.id,D);if(C){this.turnLinkOff(A,D);this.addActiveItem(D);this.clipboardLastAddedItemId=D.itemId;this.clipboardHighlightRow=true;this.selectedClipboardItemsOnPage.push(D.itemId)}else{this.turnLinkOn(A,D);this.removeActiveItem(D);this.clipboardLastAddedItemId=undefined}this.dialogBox=new ClipboardDialogBox(this.clipboardActiveItems);if(E.firstChild){Event.stop(B)}}else{if(E.checked){this.addActiveItem(D);this.clipboardLastAddedItemId=D.itemId;this.clipboardHighlightRow=true}else{this.removeActiveItem(D);this.clipboardLastAddedItemId=undefined}this.dialogBox=new ClipboardDialogBox(this.clipboardActiveItems);return true}},isSelected:function(D,B){var C=true;var A=$(D);if(A){if(A.lastChild&&A.lastChild.nodeValue==B.selectedText){C=false}else{if(A.checked==true){C=false}}}return C},removeClipboardItem:function(B){if(Element.exists(B)){$(B).value=""}if(this.selectedClipboardItemsOnPage!=null){this.selectedClipboardItemsOnPage=this.selectedClipboardItemsOnPage.without(B)}this.removeActiveItemById(B);this.updateView();var A=false;var C;for(C in this.clipboardActiveItems){A=true;break}if(A){this.dialogBox=new ClipboardDialogBox(this.clipboardActiveItems,{reposition:false})}else{this.dialogBox.closeDialogBox()}},clearAll:function(){this.removeAllItems();this.selectedClipboardItemsOnPage=null;this.updateView();var A=false;var B;for(B in this.clipboardActiveItems){A=true;break}if(A){this.dialogBox=new ClipboardDialogBox(this.clipboardActiveItems,{reposition:false})}else{this.dialogBox.closeDialogBox()}},renderComparisonCheckBox:function(B){var A=itemIdParts[1];this.clipboardPageItems[B.itemId]=B;document.write('<input type="checkbox" id="'+B.itemId+'" name="'+this.options.clipboardType+'" value="'+A+'" onclick="document.comparisonClipboard().checkClipboardItem(event);" />')},turnLinkOn:function(A,B){if(A.firstChild){A.firstChild.src=B.unselectedImageURL;A.firstChild.setAttribute("alt",B.unselectedText);A.lastChild.nodeValue=B.unselectedText}else{A.checked=false}},turnLinkOff:function(A,B){if(A.firstChild){A.firstChild.src=B.selectedImageURL;A.firstChild.setAttribute("alt",B.selectedText);A.lastChild.nodeValue=B.selectedText}else{A.checked=true}},renderComparisonLink:function(A){this.clipboardPageItems[A.itemId]=A;document.write('<a href="#" rel = "nofollow" id="'+A.itemId+'"><img src="'+A.unselectedImageURL+'" alt="'+A.unselectedText+'" class="ProductToolsIcon" />'+A.unselectedText+"</a>");Event.observe(A.itemId,"click",this.checkClipboardItem.bind(this))},setLocalizedText:function(A){this.localizedText=A},submitClipboardForm:function(){var G=new SSUrl("compare");var D=Object.keys(this.clipboardActiveItems);for(var C=0;C<D.length;C++){var H=D[C];if(!Util.isEmpty(H)){var F=H.split("_");var B=F[0];var E=F[1];G.addFormValue(B,E)}}var A=G.relativeURL();window.location.href=A},showClipboardFromHyperlink:function(){this.dialogBox=new ClipboardDialogBox(this.clipboardActiveItems)},addItemFromHyperLink:function(A){this.removeClipboardItem(A.itemId);this.clipboardPageItems[A.itemId]=A;this.closeDialogBox();this.addActiveItem(A);this.clipboardLastAddedItemId=A.itemId;this.clipboardHighlightRow=true;this.dialogBox=new ClipboardDialogBox(this.clipboardActiveItems);return false}});var WishList=Class.create({selectedImageURL:null,unselectedImageURL:null,selectedText:null,unselectedText:null,dialogBox:null,currentPageNumber:1,wishListPageItems:null,initialize:function(){Object.extend(this,new Clipboard({clipboardType:"wishList"}));this.dialogBox=new WishListDialogBox()},updateView:function(){var C;var B;if(this.wishListPageItems==null){for(B in this.clipboardPageItems){var H=this.clipboardPageItems[B];C=$(H.itemId);if(C&&H.wishListId==this.activeWishListId){if(this.clipboardActiveItems[H.itemId]){this.turnLinkOff(C)}else{this.turnLinkOn(C)}}}}else{for(B in this.clipboardPageItems){var E=this.clipboardPageItems[B];var G=E.itemId;C=$(G);var A=false;for(var F=0;F<this.wishListPageItems.length;F++){var D=this.wishListPageItems[F];if(D==G){A=true}}if(A){this.turnLinkOff(C)}else{this.turnLinkOn(C)}}}},renderWishListLink:function(A){Object.extend(this,A);this.clipboardPageItems[A.itemId]=A;document.write('<a href="#" rel = "nofollow" id="'+A.itemId+'"><img src="'+A.unselectedImageURL+'" alt="'+A.unselectedText+'" class="ProductToolsIcon" />'+A.unselectedText+"</a>");Event.observe(A.itemId,"click",this.checkClipboardItem.bind(this))},renderWishListCheckBox:function(A){Object.extend(this,A);this.clipboardPageItems[A.itemId]=A;document.write('<input type="checkbox" id="'+A.itemId+'" onclick="document.wishList().checkClipboardItem(event);" />')},toggleLinkState:function(C){var B=this.isSelected(C);if(B!=null){var A=$(C);if(B){this.turnLinkOn(A)}else{this.turnLinkOff(A)}B=!B}return B},turnLinkOn:function(A){if(A.firstChild){A.firstChild.src=this.unselectedImageURL;A.firstChild.setAttribute("alt",this.unselectedText);A.lastChild.nodeValue=this.unselectedText}else{A.checked=false}},turnLinkOff:function(A){if(A.firstChild){A.firstChild.src=this.selectedImageURL;A.firstChild.setAttribute("alt",this.selectedText);A.lastChild.nodeValue=this.selectedText}else{A.checked=true}},isSelected:function(C){var B=true;var A=$(C);if(A){if(A.lastChild&&A.lastChild.nodeValue==this.unselectedText){B=false}else{if(A.checked==true){B=false}}}return B},checkClipboardItem:function(A){this.closeDialogBox();this.currentPageNumber=1;var D=Event.element(A);if(D.firstChild){Effect.Pulsate(D.firstChild,{duration:6})}var C=this.clipboardPageItems[D.id];var B=this.isSelected(D.id);if(!B){this.addActiveItem(C);this.dialogBox.addItem(C)}else{this.removeActiveItem(C);this.dialogBox.removeItem(C)}if(D.firstChild){Event.stop(A)}},editWishList:function(C){var A=$(C);var B=$("displayDiv_"+C);var E=$("editLinkDiv_"+C);var D=$("saveLinkDiv_"+C);if(!Util.isEmpty(A)){if(Element.getStyle(A,"display")=="none"){Element.setStyle(A,{display:"block"});Element.setStyle(B,{display:"none"});Element.setStyle(E,{display:"none"});Element.setStyle(D,{display:"block"})}}return false},startWishListFormSaveBusyImage:function(A){},deleteWishListFormAction:function(A,B){if(confirm(B)){new Ajax.Updater("wishListProductViewDiv",A,{method:"get"})}return false},saveWishListItemFormAction:function(B,A,C){this.startWishListFormSaveBusyImage(B);new Ajax.Request(A.getAttribute("action"),{method:"get",parameters:Form.serialize(A),onComplete:this.saveWishListItemCallback.bind(this)});return false},saveWishListItemCallback:function(A){var B=$("wishListProductViewDiv");if(!Util.isEmpty(B)){Element.update(B,A.responseText)}return true},toggleEditWishListTitleInPlace:function(){Element.toggle("wishListTitle");Element.toggle("editableWishListTitle");return false},cancelEditWishListTitleInPlace:function(){var A="";if($("oldTitleText")!=null&&$("oldTitleText").firstChild!=null){oldDescription=$("oldTitleText").firstChild.nodeValue}$("titleTxtField").value=A;this.toggleEditWishListTitleInPlace();return false},toggleEditWishListDescriptionInPlace:function(){Element.toggle("wishListDescription");Element.toggle("editableWishListDescription");return false},cancelEditWishListDescriptionInPlace:function(){var A="";if($("oldDescriptionText")!=null&&$("oldDescriptionText").firstChild!=null){A=$("oldDescriptionText").firstChild.nodeValue}$("descriptionTxtField").value=A;this.toggleEditWishListDescriptionInPlace();return false},createMessage:function(A){this.dialogBox.createMessage(A);return false},showWishListFromHyperLink:function(A,B){this.currentPageNumber=1;this.dialogBox.showWishListFromHyperLink(A,B);return false},removeItemById:function(B,A){this.removeActiveItemById(this.options.clipboardType+"_"+A);this.dialogBox.removeItemById(B,A,this.currentPageNumber);return false},cancelAction:function(){this.dialogBox.cancelAction();return false},cancelMergeOptionAction:function(){this.dialogBox.cancelMergeOptionAction();return false},removeAllProducts:function(A){this.currentPageNumber=1},changeActiveFamilyMember:function(A){this.currentPageNumber=1;this.dialogBox.changeActiveFamilyMember(A);return false},changeActiveWishList:function(A){this.currentPageNumber=1;this.dialogBox.changeActiveWishList(A);return false},previewMessage:function(){var C=$("fromFieldId").value;var B=$("toFieldId").value;var A=$("messageFieldId").value;this.dialogBox.previewMessage(C,B,A);return false},editMessage:function(A){var D=$("fromFieldId").value;var C=$("toFieldId").value;var B=$("messageFieldId").value;this.dialogBox.editMessage(D,C,B,A);return false},sendMessage:function(A){var D=$("fromFieldId").value;var C=$("toFieldId").value;var B=$("messageFieldId").value;this.dialogBox.sendMessage(D,C,B,A);return false},quickSendMessage:function(A){var D=$("fromFieldId").value;var C=$("toFieldId").value;var B=$("messageFieldId").value;this.dialogBox.quickSendMessage(D,C,B,A);return false},createNewWishList:function(){this.dialogBox.createNewWishList();return false},showWishListLogin:function(){this.dialogBox.showWishListLogin();return false},mergingOptions:function(){this.currentPageNumber=1;var A=$("isNewWishList");var B="X";if(A.checked){B=A.value}this.dialogBox.mergingOptions(B);return false},saveNewWishListMergeOption:function(C,A){this.currentPageNumber=1;var G=$("userPopup").value;var F=$("wishListNameFieldId").value;var E=$("wishListDescriptionFieldId").value;var B=$("isPrivate");var D=B.checked;if(F==""){this.dialogBox.updateStatusArea('<img src="'+C+'" border="0">&nbsp;&nbsp;'+A+"<br>")}else{if(D==false){B=$("isNotPrivate")}this.dialogBox.saveNewWishListMergeOption(G,F,E,B.value)}return false},saveExistingWishListMergeOption:function(){this.currentPageNumber=1;var A=$("userOptGroup").value;this.dialogBox.saveExistingWishListMergeOption(A);return false},saveNewWishList:function(C,A){this.currentPageNumber=1;var F=$("wishListNameFieldId").value;var E=$("wishListDescriptionFieldId").value;var B=$("isPrivate");var D=B.checked;if(F==""){this.dialogBox.updateStatusArea('<img src="'+C+'" border="0">&nbsp;&nbsp;'+A+"<br>")}else{if(D==false){B=$("isNotPrivate")}this.dialogBox.saveNewWishList(F,E,B.value)}return false},loginWishList:function(){this.currentPageNumber=1;var B=$("wishListUserNameFieldId").value;var A=$("wishListPasswordFieldId").value;this.dialogBox.loginWishList(B,A);return false},lostPassword:function(){this.currentPageNumber=1;var A=$("wishListUserNameFieldId").value;this.dialogBox.lostPassword(A);return false},resetPassword:function(){this.currentPageNumber=1;var C;var A;var B;if(!Util.isEmpty($("wishListBirthMonthFieldId"))){C=$("wishListBirthMonthFieldId").value}if(!Util.isEmpty($("wishListBirthDayFieldId"))){A=$("wishListBirthDayFieldId").value}if(!Util.isEmpty($("wishListQuestionAnswerFieldId"))){B=$("wishListQuestionAnswerFieldId").value}this.dialogBox.resetPassword(C,A,B);return false},savePassword:function(){this.currentPageNumber=1;var B=$("wishListNewPasswordFieldId").value;var A=$("wishListNewPasswordConfirmationFieldId").value;this.dialogBox.savePassword(B,A);return false},editSaveWishListProduct:function(D,G){var A=0;var B="options_"+G;var I="options_"+A;var F=$(I);var M=null;var L="";var K="";var J="";var E="";var H="";var C=false;while(F!=null){if(I==B){if(Element.visible(F)){C=true;M=$("merchantPopupId_"+G);if(M!=null){L=M.value;if(L.indexOf("WO")>=0){L=""}}M=$("wishListPopupId_"+G);if(M!=null){K=M.value}M=$("priorityPopupId_"+G);if(M!=null){J=M.value}M=$("quantityPopupId_"+G);if(M!=null){E=M.value}M=$("wishListProductCommentId_"+G);if(M!=null){H=encodeURIComponent(M.value)}}}else{this.dialogBox.hideWishListItemDetails(I)}A++;I="options_"+A;F=$(I)}if(C){this.dialogBox.saveWishListItem(D,K,L,J,E,this.currentPageNumber,H)}else{this.dialogBox.editWishListItem(B)}return false},deleteChildAccountConfirmationDialog:function(B){var C=($(B.callBackId)).getAttribute("href");var A=$H(B).merge($H({callBackHref:C}));return new STIConfirmDialogBox(A)},deleteWishListConfirmationDialog:function(B){var C=($(B.callBackId)).getAttribute("href");var A=$H(B).merge($H({callBackHref:C}));return new STIConfirmDialogBox(A)},jumpToPage:function(A){this.currentPageNumber=A;this.dialogBox.jumpToPage(A);return false}});var Util={isEmpty:function(A){return typeof (A)=="undefined"||A==null||A==""}};var AttributeValues=Class.create({dialogBox:null,selectedAttributeValueIds:null,initialize:function(){Object.extend(this,new Clipboard({clipboardType:"attributeValues"}));this.dialogBox=new AttributeValuesDialogBox()},openAttributeValuesDialogBox:function(A){this.dialogBox.showAttributeValues(A);return false},updateAttributeValuePopupUrl:function(B,A){if(this.selectedAttributeValueIds==null){if(A.formValuesForKey(B.name)!=null){this.selectedAttributeValueIds=A.formValuesForKey(B.name).clone()}else{this.selectedAttributeValueIds=new Array()}}if(B.checked){this.selectedAttributeValueIds.push(B.value)}else{var C=B.value;C=C.replace(/\+/g,"%20");this.selectedAttributeValueIds=this.selectedAttributeValueIds.without(C)}},filterProductsByAttributeValues:function(C,A){if(this.selectedAttributeValueIds!=null){C.removeFormValue(A);for(var D=0;D<this.selectedAttributeValueIds.length;D++){var B=this.selectedAttributeValueIds[D];C.addFormValue(A,B)}}C=C.relativeURL();window.location.href=C}});var SpecialOffers=Class.create({dialogBox:null,initialize:function(){Object.extend(this,new Clipboard({clipboardType:"specialOffers"}));this.dialogBox=new SpecialOffersDialogBox()},openSpecialOffersDialogBox:function(A){this.dialogBox.showSpecialOffers(A);return false}});var SSUrl=Class.create({DEVELOPER_CONSTANTS:{AMPERSAND:"&",QUESTION_MARK:"?",EQUALS:"=",URL_SUFFIX:"",MULTIVALUE_DELIMETER:"-"},PRODUCTION_CONSTANTS:{AMPERSAND:"__",QUESTION_MARK:"--",EQUALS:"_",URL_SUFFIX:".html",MULTIVALUE_DELIMETER:"%2d"},baseRelativeURL:"/",directActionName:null,formValues:new Object(),initialize:function(A){this.directActionName=A;if(this.formValues!=null){this.formValues=document.deepObjCopy(this.formValues)}if(document.pageProperties.isDeveloperMode){this.baseRelativeURL+=document.pageProperties.stiBaseURL+"/"}else{this.baseRelativeURL+="shop/"}},addFormValue:function(D,F){var C=false;var B;var A;for(B in this.formValues){if(B==D){A=this.formValues[B];A[A.length]=F;A=A.uniq();this.formValues[B]=A;C=true}}if(!C){var E=new Object();A=new Array();A.push(F);E[D]=A;Object.extend(this.formValues,E)}},addFormValues:function(C,A){for(var B=0;B<A.length;B++){this.addFormValue(C,A[B])}},removeFormValue:function(A){if(this.formValues[A]){delete this.formValues[A]}},formValuesForKey:function(A){return this.formValues[A]},removeValueFromFormValue:function(B,C){if(this.formValues[B]){var A=this.formValues[B];A=A.without(C);this.formValues[B]=A}},replaceFormValue:function(A,B){this.removeFormValue(A);this.addFormValue(A,B)},addRangeFormValue:function(B,A,D,E,C){value="r"+A+"r"+D+"r"+E+"r"+C;this.addFormValue(B,value)},replaceRangeFormValue:function(B,A,D,E,C){this.removeFormValue(B);this.addRangeFormValue(B,A,D,E,C)},setDirectActionName:function(A){this.directActionName=A},developerModeQueryString:function(){return this._queryString(this.DEVELOPER_CONSTANTS)},productionModeQueryString:function(){return this._queryString(this.PRODUCTION_CONSTANTS)},queryString:function(){return document.pageProperties.isDeveloperMode?this.developerModeQueryString():this.productionModeQueryString()},toString:function(){return this.absoluteURL()},developerModeAbsoluteURL:function(){return this._absoluteURL(this.DEVELOPER_CONSTANTS)},productionModeAbsoluteURL:function(){return this._absoluteURL(this.PRODUCTION_CONSTANTS)},absoluteURL:function(){return document.pageProperties.isDeveloperMode?this.developerModeAbsoluteURL():this.productionModeAbsoluteURL()},developerModeRelativeURL:function(){return this._relativeURL(this.DEVELOPER_CONSTANTS)},productionModeRelativeURL:function(){return this._relativeURL(this.PRODUCTION_CONSTANTS)},relativeURL:function(){return document.pageProperties.isDeveloperMode?this.developerModeRelativeURL():this.productionModeRelativeURL()},_queryString:function(E){var B="";var A=true;if(document.pageProperties.cbaId){this.replaceFormValue("cbaId",document.pageProperties.cbaId)}for(var D in this.formValues){var G=this.formValues[D];for(var C=0;C<G.length;C++){var F=G[C];if(D&&F){if(A){A=!A;B=E.QUESTION_MARK}else{B+=E.AMPERSAND}B+=D+E.EQUALS+encodeURIComponent(F)}}}return B},_absoluteURL:function(A){return"http://"+window.location.host+this._relativeURL(A)},_relativeURL:function(A){return this.baseRelativeURL+this.directActionName+this.queryString()+A.URL_SUFFIX}});Object.extend(document,{_comparisonClipboard:null,_wishList:null,_alertDialogBox:null,_confirmDialogBox:null,_contentDialogBox:null,_attributeValues:null,_specialOffers:null,_pageURL:null,pageProperties:{},redirect:function(A){window.location.replace(A);return false},updateView:function(){if(document._comparisonClipboard!=null){document.comparisonClipboard().updateInternalState();document.comparisonClipboard().updateView()}if(document._wishList!=null){document.wishList().updateInternalState();document.wishList().updateView()}},setPageProperties:function(A){Object.extend(this.pageProperties,A)},comparisonClipboard:function(){if(this._comparisonClipboard==null){this._comparisonClipboard=new ComparisonClipboard()}return this._comparisonClipboard},wishList:function(){if(this._wishList==null){this._wishList=new WishList()}return this._wishList},alertDialogBox:function(){if(this._alertDialogBox==null){this._alertDialogBox=new STIAlertDialogBox()}return this._alertDialogBox},confirmDialogBox:function(){if(this._confirmDialogBox==null){this._confirmDialogBox=new STIConfirmDialogBox()}return this._confirmDialogBox},contentDialogBox:function(){if(this._contentDialogBox==null){this._contentDialogBox=new ContentDialogBox()}return this._contentDialogBox},deepObjCopy:function(A){var B=new Object();if(typeof (A)=="object"){for(var C in A){if(typeof (A[C])=="object"){B[C]=deepObjCopy(A[C])}else{if(typeof (A[C])=="string"){B[C]=A[C]}else{if(typeof (A[C])=="number"){B[C]=A[C]}else{if(typeof (A[C])=="boolean"){B[C]=new Boolean(A[C])}}}}}}return B},attributeValues:function(){return this._attributeValues},createAttributeValuesPopup:function(){this._attributeValues=new AttributeValues();return this._attributeValues},specialOffers:function(){if(this._specialOffers==null){this._specialOffers=new SpecialOffers()}return this._specialOffers},addFavorite:function(A,B){if(window.sidebar){window.sidebar.addPanel(B,A,"")}else{if(window.external){window.external.AddFavorite(A,B)}else{if(window.opera&&window.print){return true}}}},makeFlashTransparent:function(){var D;var J=!arguments[1]?window.document:arguments[1];if(J.getElementsByTagName){var E=J.getElementsByTagName("object");for(D=0;D<E.length;D++){var F=E[D];if(F.getAttribute("classid")){var I=J.createElement("param");I.setAttribute("name","wmode");I.setAttribute("value","transparent");F.insertBefore(I,F.firstChild);var B=F.getElementsByTagName("embed");for(var H=0;H<B.length;H++){var K=B[H];K.setAttribute("wmode","transparent")}var C=J.createElement("div");C.setAttribute("id","flashContainerDiv");C.appendChild(F);J.body.innerHTML=C.innerHTML}}}if(J.getElementsByTagName){var G=J.frames;if(!G){G=J.getElementsByTagName("iframe")}for(D=0;D<G.length;D++){var A=G[D];if(A.contentDocument){document.makeFlashTransparent(arguments[0],A.contentDocument)}}}},renderAd:function(A){var B;if(window.XMLHttpRequest){B=new XMLHttpRequest()}else{if(window.ActiveXObject){B=new ActiveXObject("Microsoft.XMLHTTP")}}if(typeof (B)=="object"){B.open("GET",A.url.replace(/&amp;/g,"&"),false);B.send(null);document.write(B.responseText)}},toggleAd:function(B){var A=B.surroundingDivId;Element.toggle($(A))},toggleSubCategories:function(A,B,C){Element.toggle($(A));Element.toggle($(B));Element.toggle($(C));return false},pageURL:function(){if(this._pageURL==null){this._pageURL=this.nonCachedPageURL()}return this._pageURL},nonCachedPageURL:function(){var D=window.location.pathname;var A=window.location.search;var B=document.pageProperties.isDeveloperMode?SSUrl.prototype.DEVELOPER_CONSTANTS:SSUrl.prototype.PRODUCTION_CONSTANTS;if(D!=null&&D.indexOf(B.QUESTION_MARK)>=0){var C=D.split(B.QUESTION_MARK);D=C[0];A=C[1]}return this.parseURL(D,A)},parseURL:function(D,I,J,C){var L=D.indexOf("WebObjects")<0;var O=L?SSUrl.prototype.PRODUCTION_CONSTANTS:SSUrl.prototype.DEVELOPER_CONSTANTS;var P=D;var Q=I;if(Q!=null&&(J!=null&&J)){Q=Q.replace(/&amp;/g,"&")}if(Q!=null&&(J!=null&&J)){Q=Q.replace(/%3A/g,":")}var E=null;var A=null;if(!L){if(Q.indexOf(O.QUESTION_MARK)>=0){Q=Q.substr(1,Q.length-1)}}else{if(O.URL_SUFFIX!=""&&Q.indexOf(O.URL_SUFFIX)>=0){Q=Q.substr(0,Q.indexOf(O.URL_SUFFIX))}if(Q.indexOf(O.QUESTION_MARK)>=0){Q=Q.substr(O.QUESTION_MARK.length,Q.length-1)}}var N=P.split("/");E=N[N.length-1];A=new SSUrl(E);var H=Q.split(O.AMPERSAND);for(var G=0;G<H.length;G++){var B=H[G];if(B.indexOf(O.EQUALS)>=0){var F=B.split(O.EQUALS);var K=F[1];var M=decodeURIComponent(K);A.addFormValue(F[0],M)}}return A},showHideCategoryLinks:function(A){var B=$(A.linkId);var C=$(A.divId);if(B.innerHTML.indexOf(A.showText)>=0){Effect.BlindDown(C);Element.update(B,"<strong>"+A.hideText+"</strong>")}else{Effect.BlindUp(C);Element.update(B,"<strong>"+A.showText+"</strong>")}},showHideWithFade:function(A){var B=$(A.linkId);var C=$(A.divId);if(B.innerHTML.indexOf(A.showText)>=0){Effect.Appear(C,{duration:0.5});Element.update(B,"<strong>"+A.hideText+"</strong>")}else{Effect.Fade(C,{duration:0.15});Element.update(B,"<strong>"+A.showText+"</strong>")}}});var Browser=new Object();Object.extend(Browser,{isIE:function(){return(navigator.appVersion.indexOf("MSIE")!=-1)}});Object.extend(Array.prototype,{eachKey:function(A){$H(this).keys().each(function(B){A(B,this)})}});Object.extend(Element,{makeEmpty:function(A){Element.update(A,new String())},setAttribute:function(B,C){B=$(B);for(var A in C){B.setAttribute(A.camelize(),C[A])}},exists:function(A){var B=typeof ($(A));return B!="undefined"&&B!="string"}});Object.extend(Event,{pause:function(B){var A=new Date();var C=A.getTime()+B;while(true){A=new Date();if(A.getTime()>C){return }}}});Object.extend(Position,{lastClickX:null,lastClickY:null,_updateMouseClickXY:function(A){Position.lastClickX=Event.pointerX(A);Position.lastClickY=Event.pointerY(A)},putNearPointerClick:function(H,B){var I=Object.extend({verticalAlign:"top"},arguments[1]||{});var C=Position.windowSize();var A=Position.windowScroll();var G=Element.getDimensions(H);var E=Position.lastClickX==null?0:Position.lastClickX;var D=Position.lastClickY==null?0:Position.lastClickY;if(I.verticalAlign=="middle"){D-=G.height/2}if(D+G.height>C.height+A.yScroll){D=C.height+A.yScroll-G.height}if(D<0){D=0}if(D<A.yScroll){D+=(A.yScroll-D)}var F=15;if(E>C.width/2){E=E-(G.width+F)}else{E+=F}Element.setStyle(H,{left:E+"px",top:D+"px"})},centerInWindow:function(C){C=$(C);var D=this.windowSize();var B=this.windowScroll();var A=Element.getDimensions(C);Element.setStyle(C,{left:((D.width/2)-(A.width/2)+B.xScroll)+"px"});Element.setStyle(C,{top:((D.height/2)-(A.height/2)+B.yScroll)+"px"})},putFullWindow:function(B){B=$(B);var C=this.windowSize();var A=this.windowScroll();B.style.height=(C.height+A.yScroll)+"px";B.style.width="100%"},putFullPage:function(A){A=$(A);var B=this.pageSize();Element.setStyle(A,{height:B.height+"px"});Element.setStyle(A,{width:"100%"})},windowSize:function(){var B=Position.browserDimensions();var A=new Object();Object.extend(A,{width:B.windowWidth,height:B.windowHeight});return A},pageSize:function(){var B=Position.browserDimensions();var A=new Object();Object.extend(A,{width:B.pageWidth,height:B.pageHeight});return A},browserDimensions:function(){var B=new Object();Object.extend(B,{pageWidth:0,pageHeight:0,windowWidth:0,windowHeight:0});if(self.innerHeight){B.windowWidth=self.innerWidth;B.windowHeight=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){B.windowWidth=document.documentElement.clientWidth;B.windowHeight=document.documentElement.clientHeight}else{if(document.body){B.windowWidth=document.body.clientWidth;B.windowHeight=document.body.clientHeight}}}var C,A;if(window.innerHeight&&window.scrollMaxY){C=document.body.scrollWidth;A=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){C=document.body.scrollWidth;A=document.body.scrollHeight}else{C=document.body.offsetWidth;A=document.body.offsetHeight}}if(A<B.windowHeight){B.pageHeight=B.windowHeight}else{B.pageHeight=A}if(C<B.windowWidth){B.pageWidth=B.windowWidth}else{B.pageWidth=C}return B},windowScroll:function(){var A=new Object;Object.extend(A,{yScroll:0,xScroll:0});if(typeof (window.pageYOffset)=="number"){A.yScroll=window.pageYOffset;A.xScroll=window.pageXOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){A.yScroll=document.body.scrollTop;A.xScroll=document.body.scrollLeft}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){A.yScroll=document.documentElement.scrollTop;A.xScroll=document.documentElement.scrollLeft}}}return A}});Object.extend(String,{formatCurrency:function(B){B=B.toString().replace(/\$|\,/g,"");if(isNaN(B)){B="0"}sign=(B==(B=Math.abs(B)));B=Math.floor(B*100+0.50000000001);cents=B%100;B=Math.floor(B/100).toString();if(cents<10){cents="0"+cents}for(var A=0;A<Math.floor((B.length-(1+A))/3);A++){B=B.substring(0,B.length-(4*A+3))+","+B.substring(B.length-(4*A+3))}return(((sign)?"":"-")+"$"+B+"."+cents)}});Event.observe(window.document,"mousedown",Position._updateMouseClickXY);var Resizeable=Class.create({initialize:function(B){var A=Object.extend({top:6,bottom:6,left:6,right:6,minHeight:0,minWidth:0,zindex:1000,resize:null},arguments[1]||{});this.element=$(B);this.handle=this.element;Element.makePositioned(this.element);this.options=A;this.active=false;this.resizing=false;this.currentDirection="";this.eventMouseDown=this.startResize.bindAsEventListener(this);this.eventMouseUp=this.endResize.bindAsEventListener(this);this.eventMouseMove=this.update.bindAsEventListener(this);this.eventCursorCheck=this.cursor.bindAsEventListener(this);this.eventKeypress=this.keyPress.bindAsEventListener(this);this.registerEvents()},destroy:function(){Event.stopObserving(this.handle,"mousedown",this.eventMouseDown);this.unregisterEvents()},registerEvents:function(){Event.observe(document,"mouseup",this.eventMouseUp);Event.observe(document,"mousemove",this.eventMouseMove);Event.observe(document,"keypress",this.eventKeypress);Event.observe(this.handle,"mousedown",this.eventMouseDown);Event.observe(this.element,"mousemove",this.eventCursorCheck)},unregisterEvents:function(){},startResize:function(C){if(Event.isLeftClick(C)){var D=Event.element(C);if(D.tagName&&(D.tagName=="INPUT"||D.tagName=="SELECT"||D.tagName=="BUTTON"||D.tagName=="TEXTAREA")){return }var A=this.directions(C);if(A.length>0){this.active=true;var B=Position.cumulativeOffset(this.element);this.startTop=B[1];this.startLeft=B[0];this.startWidth=parseInt(Element.getStyle(this.element,"width"));this.startHeight=parseInt(Element.getStyle(this.element,"height"));this.startX=C.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;this.startY=C.clientY+document.body.scrollTop+document.documentElement.scrollTop;this.currentDirection=A;Event.stop(C)}}},finishResize:function(A,B){this.active=false;this.resizing=false;if(this.options.zindex){this.element.style.zIndex=this.originalZ}if(this.options.resize){this.options.resize(this.element)}},keyPress:function(A){if(this.active){if(A.keyCode==Event.KEY_ESC){this.finishResize(A,false);Event.stop(A)}}},endResize:function(A){if(this.active&&this.resizing){this.finishResize(A,true);Event.stop(A)}this.active=false;this.resizing=false},draw:function(D){var F=[Event.pointerX(D),Event.pointerY(D)];var C=this.element.style;var B;var E;var A;if(this.currentDirection.indexOf("n")!=-1){B=this.startY-F[1];E=Element.getStyle(this.element,"margin-top")||"0";A=this.startHeight+B;if(A>this.options.minHeight){C.height=A+"px";C.top=(this.startTop-B-parseInt(E))+"px"}}if(this.currentDirection.indexOf("w")!=-1){B=this.startX-F[0];E=Element.getStyle(this.element,"margin-left")||"0";newWidth=this.startWidth+B;if(newWidth>this.options.minWidth){C.left=(this.startLeft-B-parseInt(E))+"px";C.width=newWidth+"px"}}if(this.currentDirection.indexOf("s")!=-1){A=this.startHeight+F[1]-this.startY;if(A>this.options.minHeight){C.height=A+"px"}}if(this.currentDirection.indexOf("e")!=-1){newWidth=this.startWidth+F[0]-this.startX;if(newWidth>this.options.minWidth){C.width=newWidth+"px"}}if(C.visibility=="hidden"){C.visibility=""}},between:function(C,A,B){return(C>=A&&C<B)},directions:function(B){var D=[Event.pointerX(B),Event.pointerY(B)];var A=Position.cumulativeOffset(this.element);var C="";if(this.between(D[1]-A[1],0,this.options.top)){C+="n"}if(this.between((A[1]+this.element.offsetHeight)-D[1],0,this.options.bottom)){C+="s"}if(this.between(D[0]-A[0],0,this.options.left)){C+="w"}if(this.between((A[0]+this.element.offsetWidth)-D[0],0,this.options.right)){C+="e"}return C},cursor:function(A){var B=this.directions(A);if(B.length>0){B+="-resize"}else{B=""}this.element.style.cursor=B},update:function(B){if(this.active){if(!this.resizing){var A=this.element.style;this.resizing=true;if(Element.getStyle(this.element,"position")==""){A.position="relative"}if(this.options.zindex){this.originalZ=parseInt(Element.getStyle(this.element,"z-index")||0);A.zIndex=this.options.zindex}}this.draw(B);if(navigator.appVersion.indexOf("AppleWebKit")>0){window.scrollBy(0,0)}Event.stop(B);return false}}});var Cookie={version:"0.7",cookies:{},_each:function(A){$H(this.cookies).each(A)},getAll:function(){this.cookies={};$A(document.cookie.split("; ")).each(function(B){var A=B.indexOf("=");this.cookies[B.substring(0,A)]=unescape(B.substring(A+1,B.length))}.bind(this));return this.cookies},read:function(){var B=$A(arguments),A=[];this.getAll();B.each(function(C){if(this.cookies[C]){A.push(this.cookies[C])}else{A.push(null)}}.bind(this));return A.length>1?A:A[0]},write:function(B,A){if(B.constructor==Object&&B.name){B=[B]}if(B.constructor==Array){$A(B).each(function(C){this._write(C.name,C.value,C.expires,C.path,C.domain)}.bind(this))}else{A=A||{expires:false,path:"",domain:""};for(name in B){this._write(name,B[name],A.expires,A.path,A.domain)}}},_write:function(B,E,A,F,D){if(B.indexOf("=")!=-1){return }var C=B+"="+escape(E);if(A){C+="; expires="+A.toGMTString()}if(F){C+="; path="+F}if(D){C+="; domain="+D}document.cookie=C},erase:function(A){var B={};$A(arguments).each(function(C){B[C]=""});this.write(B,{expires:(new Date((new Date()).getTime()-100000000000))});this.getAll()},eraseAll:function(){this.erase.apply(this,$H(this.getAll()).keys())}};Object.extend(Cookie,{get:Cookie.read,set:Cookie.write,add:Cookie.read,remove:Cookie.erase,removeAll:Cookie.eraseAll,wipe:Cookie.erase,wipeAll:Cookie.eraseAll,destroy:Cookie.erase,destroyAll:Cookie.eraseAll});var DialogBox=Class.create({loadingImageSrc:"/ss/i/loading.gif",closeButtonImageSrc:"/ss/i/img_clipboard_close.gif",lastPointerX:null,lastPointerY:null,defaultDialogBoxId:"I___default_dialog_box_id___I",dialogBoxIds:new Array(),blockClose:false,options:{},initialize:function(){this.options=Object.extend({dialogBoxId:DialogBox.prototype.defaultDialogBoxId,overlay:true,resizable:false,draggable:false,width:null,height:null,left:null,top:null,center:false,showTitleBar:true,titelBarText:null,showFooter:true,footerText:null,verticalAlign:"top",fadeDuration:1,reposition:true},arguments[0]||{});this.showLoader();this.registerEventListeners();if(Browser.isIE()){Event.pause(250)}},registerEventListeners:function(){DialogBox.prototype.removeEventListeners();Event.observe(window,"resize",DialogBox.prototype.refreshAll);Event.observe(window,"scroll",DialogBox.prototype.refreshAll)},removeEventListeners:function(){try{Event.stopObserving(window,"resize",DialogBox.prototype.refreshAll);Event.stopObserving(window,"scroll",DialogBox.prototype.refreshAll)}catch(A){}},showOverlay:function(){Element.setStyle($("dialogBoxOverlay"),{display:"block"});if(Browser.isIE()){selects=document.getElementsByTagName("select");for(var A=0;A!=selects.length;A++){Element.setStyle(selects[A],{visibility:"hidden"})}}DialogBox.prototype.refreshOverlay()},hideOverlay:function(){Element.setStyle($("dialogBoxOverlay"),{display:"none"});if(Browser.isIE()){selects=document.getElementsByTagName("select");for(var A=0;A!=selects.length;A++){Element.setStyle(selects[A],{visibility:"visible"})}}},refreshOverlay:function(){Position.putFullPage($("dialogBoxOverlay"))},refreshLoader:function(){Position.centerInWindow($("dialogBoxLoadingImage"))},showLoader:function(){if(this.options.overlay){this.showOverlay()}Element.setStyle($("dialogBoxLoadingImage"),{display:"block"});this.refreshLoader()},hideLoader:function(){Element.setStyle($("dialogBoxLoadingImage"),{display:"none"})},refreshAll:function(){DialogBox.prototype.refreshOverlay();DialogBox.prototype.refreshLoader()},openDialogBox:function(A,C,B){this.renderDialogBox(A);this.showDialogBox(C,B)},renderDialogBox:function(A){$("dialogBoxTitleBar").removeAttribute("style");$("dialogBoxContent").removeAttribute("style");$("dialogBoxFooter").removeAttribute("style");DialogBox.prototype.dialogBoxIds.push(this.options.dialogBoxId);DialogBox.prototype.hideLoader();var C=$("dialogBox");var B=C.parentNode;B.setAttribute("id",A);var E=$("dialogBoxTitleBar");if(this.options.showTitleBar){Element.setStyle(E,{display:"block"})}else{Element.setStyle(E,{display:"none"})}var H=$("dialogBoxFooter");if(this.options.showFooter){Element.setStyle(H,{display:"block"})}else{Element.setStyle(H,{display:"none"})}var D=Position.windowSize();var G=D.width/2;var F=D.height/2;if(this.options.width==null){if(this.options.useProportionalWidth){Element.setStyle(C,{width:G+"px"})}else{Element.setStyle(C,{width:""})}}else{Element.setStyle(C,{width:this.options.width+"px"})}if(this.options.height==null){if(this.options.useProportionalHeight){Element.setStyle(C,{height:F+"px"})}else{Element.setStyle(C,{height:""})}}else{Element.setStyle(C,{height:this.options.height+"px"})}if(this.options.resizable){new Resizeable(C,{top:3})}if(this.options.reposition){if(this.options.top==null&&this.options.left==null&&this.options.center){Position.centerInWindow(C)}else{if(this.options.top==null&&this.options.left==null){Position.putNearPointerClick(C,{verticalAlign:this.options.verticalAlign})}else{if(this.options.top==null){this.options.top=Position.lastClickY}if(this.options.left==null){this.options.left=Position.lastClickX}Element.setStyle(C,{top:this.options.top+"px"});Element.setStyle(C,{left:this.options.left+"px"})}}}else{this.options.fadeDuration=0}if(this.options.draggable){E=$("dialogBoxTitleBar");new Draggable(C,{ghosting:false,zindex:1000,handle:E,starteffect:function(){},endeffect:function(){}})}},showDialogBox:function(C,B){var A=$("dialogBox");A.style.fontSize="";if(C){C(A,B)}else{Element.setStyle(A,{display:"block"})}},closeDialogBox:function(B,A){if(B){B($("dialogBox"),A)}else{Element.setStyle($("dialogBox"),{display:"none"})}DialogBox.prototype.hideOverlay();DialogBox.prototype.removeEventListeners()},mouseupEventHandler:function(){if(arguments[0]){var A=Event.element(arguments[0]);var C=A.parentNode;var D=true;while(C){if(C.getAttribute){var B=C.getAttribute("name");if(B=="dialogBoxContainer"){D=false;break}}C=C.parentNode}if(D){DialogBox.prototype.closeDialogBox()}}}});var ConfirmDialogBox=Class.create({initialize:function(E){Object.extend(this,new DialogBox(Object.extend(arguments[1]||{},{center:true,draggable:false,overlay:true,resizable:false,showTitleBar:false,width:300,height:150,confirmCallback:null,declineCallback:null})));var D=$("dialogBoxContent");Element.makeEmpty(D);var C=document.createElement("center");C.appendChild(document.createTextNode(E));C.appendChild(document.createElement("br"));C.appendChild(document.createElement("br"));var B=document.createElement("a");B.setAttribute("href","#");B.onclick=this.declineEventListener.bindAsEventListener(this);B.appendChild(document.createTextNode("Cancel"));C.appendChild(B);C.appendChild(document.createTextNode(" "));var A=document.createElement("a");A.setAttribute("href","#");A.onclick=this.confirmEventListener.bindAsEventListener(this);A.appendChild(document.createTextNode("OK"));C.appendChild(A);D.appendChild(C);this.openDialogBox("confirmationDialogBox")},confirmEventListener:function(A){DialogBox.prototype.closeDialogBox();if(this.options.confirmCallback!=null){this.options.confirmCallback.call()}return false},declineEventListener:function(A){DialogBox.prototype.closeDialogBox();if(this.options.declineCallback){this.options.declineCallback.call()}return false}});var AlertDialogBox=Class.create({continueCallback:null,initialize:function(F,E){Object.extend(this,new DialogBox(Object.extend(arguments[2]||{},{center:true,draggable:false,overlay:true,resizable:false,showTitleBar:true})));this.continueCallback=E;this.showOverlay();var D=$("dialogBoxContent");Element.makeEmpty(D);Element.classNames("dialogBox").set("ModalWindow");Element.classNames("dialogBoxTitleBar").set("ModalTop");Element.classNames("dialogBoxContent").set("ModalContent");Element.classNames("dialogBoxFooter").set("ModalBottom");D.appendChild(document.createElement("br"));var C=document.createElement("div");C.setAttribute("style","text-align: left;");C.appendChild(document.createTextNode(F));C.appendChild(document.createElement("br"));C.appendChild(document.createElement("br"));var A=document.createElement("div");A.setAttribute("style","text-align: center;");Element.classNames(A).set("BtnClose");var B=document.createElement("a");B.setAttribute("href","#");B.onclick=this.continueEventListener.bindAsEventListener(this);A.appendChild(B);C.appendChild(A);D.appendChild(C);this.openDialogBox("ModalDialogBox")},continueEventListener:function(A){DialogBox.prototype.closeDialogBox();if(this.continueCallback){this.continueCallback.call()}return false}});var ShippingInfoDialogBox=Class.create({continueCallback:null,initialize:function(G,F){Object.extend(this,new DialogBox(Object.extend(arguments[2]||{},{center:true,draggable:false,overlay:true,resizable:false,showTitleBar:true})));this.continueCallback=F;this.showOverlay();var E=$("dialogBoxContent");Element.makeEmpty(E);Element.classNames("dialogBox").set("ModalWindow");Element.classNames("dialogBoxTitleBar").set("ModalTop");Element.classNames("dialogBoxContent").set("ModalContent");Element.classNames("dialogBoxFooter").set("ModalBottom");E.appendChild(document.createElement("br"));var D=document.createElement("div");D.setAttribute("style","text-align: left;");var C=document.createElement("div");C.innerHTML=G;D.appendChild(C);D.appendChild(document.createElement("br"));D.appendChild(document.createElement("br"));var A=document.createElement("div");A.setAttribute("style","text-align: center;");Element.classNames(A).set("BtnClose");var B=document.createElement("a");B.setAttribute("href","#");B.onclick=this.continueEventListener.bindAsEventListener(this);A.appendChild(B);D.appendChild(A);E.appendChild(D);this.openDialogBox("ModalDialogBox")},continueEventListener:function(A){DialogBox.prototype.closeDialogBox();if(this.continueCallback){this.continueCallback.call()}return false}});var WindowDialogBox=Class.create({initialize:function(C){Object.extend(this,new DialogBox(Object.extend(arguments[1]||{},{iFrameId:"windowDialogBoxIFrame"+Math.random(),iFrameName:"windowDialogBoxIFrame"+Math.random(),center:true,draggable:true,overlay:true,resizable:false,showTitleBar:true})));var A=document.createElement("iframe");if(C.indexOf("?")>=0){C+="&"}else{C+="?"}C+="randomAntiCacheParam="+Math.random();Element.setAttribute(A,{src:C,width:"100%",height:"100%",id:this.options.iFrameId,display:"block",name:this.options.iFrameName});var D=$("dialogBoxContent");Element.makeEmpty(D);D.appendChild(A);Event.observe(A,"load",this.iFrameOnloadEventListener.bind(this));if(!frames[this.options.iFrameName]){var B=document.createEvent("HTMLEvents");B.initEvent("load",true,true);A.dispatchEvent(B)}},iFrameOnloadEventListener:function(A){this.openDialogBox("windowDialogBox");Element.setStyle($(this.options.iFrameId),{width:"100%",height:this.options.height+"px"})}});var ContentDialogBox=Class.create({initialize:function(B){Object.extend(this,new DialogBox(Object.extend(arguments[1]||{},{center:true,draggable:true,overlay:false,resizable:true,showTitleBar:true})));var A=$("dialogBoxContent");Element.update(A,B);this.openDialogBox("confirmationDialogBox")}});Event.observe(window,"load",function(){var A=$((document.getElementsByTagName("body")[0]).getAttribute("id"));try{Event.observe(A,"mouseup",DialogBox.prototype.mouseupEventHandler)}catch(B){Event.observe(window.document.body,"mouseup",DialogBox.prototype.mouseupEventHandler)}});function include(L,G,A,H,E,I,C,B){var P=document.pageProperties.isDeveloperMode;if(window.XMLHttpRequest){data=new XMLHttpRequest()}else{if(window.ActiveXObject){data=new ActiveXObject("Microsoft.XMLHTTP")}}if(typeof (data)=="object"){if(P){data.open("GET","/cgi-bin/WebObjects/ShopToIt.woa/wa/productDisplayWidget?"+L+"&"+G+"&"+A+"&"+H+"&"+E+"&"+I+"&"+C,false)}else{var F=L.substring(L.indexOf("=")+1);var O=G.substring(G.indexOf("=")+1);var D=A.substring(A.indexOf("=")+1);var N=H.substring(H.indexOf("=")+1);var J=E.substring(E.indexOf("=")+1);var K=I.substring(I.indexOf("=")+1);var M=C.substring(C.indexOf("=")+1);if(F==null||(F!=null&&F.length==0)){L=null}else{L=L.replace(/=/,"_")}if(O==null||(O!=null&&O.length==0)){G=null}else{G=G.replace(/=/,"_")}if(D==null||(D!=null&&D.length==0)){A=null}else{A=A.replace(/=/,"_")}if(N==null||(N!=null&&N.length==0)){H=null}else{H=H.replace(/=/,"_")}if(J==null||(J!=null&&J.length==0)){E=null}else{E=E.replace(/=/,"_")}if(K==null||(K!=null&&K.length==0)){I=null}else{I=I.replace(/=/,"_")}if(M==null||(M!=null&&M.length==0)){C=null}else{C=C.replace(/=/,"_")}B=B.replace(/=/,"_");data.open("GET","/shop/productDisplayWidget--"+L+"__"+G+"__"+A+"__"+H+"__"+E+"__"+I+"__"+C,false)}data.send(null);document.getElementById(B+"").innerHTML=data.responseText}}function isNotEmptyPopupValue(A){return(A!=null&&A!=""&&A!="WONoSelectionString")}function cacheOldValue(A){this.cachedValues.set(A.id,$F(A))}function resetPopups(B,D,K,J,I,G){var E=this.pageUrlForAjax;var H;E.setDirectActionName(D);for(var F=0;F<G.length;F++){var A=G[F];if(isNotEmptyPopupValue(A)){H=$F(A);E.removeValueFromFormValue(K,H)}}E.removeFormValue(J);E.removeFormValue(I);var C=this.cachedValues.get(B.id);if(isNotEmptyPopupValue(C)){E.removeValueFromFormValue(K,C);this.cachedValues.unset(B.id)}H=$F(B);if(isNotEmptyPopupValue(H)){E.addFormValue(K,H)}new Ajax.Request(E.relativeURL(),{method:"get",onComplete:updateGiftAdvisorSelector.bind(this)});return false}function updateGiftAdvisorSelector(A){var B=$("GiftAdvisorSelectorDiv");if(!Util.isEmpty(B)){Element.update(B,A.responseText)}return true}function searchProducts(F,G,M,L,K,A){var C=this.pageUrlForAjax;C.setDirectActionName(F);for(var D=0;D<A.length;D++){var H=$F(A[D]);if(isNotEmptyPopupValue(H)){C.addFormValue(M,H)}}var J=$F(G);if(isNotEmptyPopupValue(J)){var I=J.split("-");var E=I[0];var B=I[1];if(E!=null&&E!=""){C.replaceFormValue(L,E)}if(B!=null&&B!=""){C.replaceFormValue(K,B)}}else{C.removeFormValue(L);C.removeFormValue(K)}self.location=C.relativeURL();return false};