dojo.registerModulePath("wc","wc");
dojo.require("dojo.html.*");
dojo.require("dojo.lang.*");
dojo.require("dojo.event.*");
dojo.require("dojo.widget.*");
dojo.require("dojo.xml.Parse");
dojo.require("dojo.json");
dojo.require("dojo.widget.ContentPane");
dojo.require("wc.widget.RefreshArea");
dojo.require("wc.render.RefreshController");
dojo.require("wc.render.Context");
dojo.require("wc.widget.WCAccordionContainer");
dojo.require("wc.widget.WCHtmlDropTarget");
dojo.require("wc.widget.TitlePaneTemplate");
dojo.require("wc.widget.ContentPaneTemplate");
dojo.require("wc.widget.ScrollablePane");
dojo.require("wc.widget.ProductQuickView");
dojo.require("wc.widget.ToolTipContent");
dojo.require("dojo.dom");
dojo.require("dojo.io.*");
dojo.require("dojo.lfx.*");
dojo.require("dojo.storage.*");
function wishListUpdated(){
}
function orderUpdated(){
}
function userChanged(){
}
function queryToParamObject(_1,_2,_3){
if(_2==null){
var _2=[];
}
var _4=_1.split("&");
for(var i=0;i<_4.length;i++){
var _6=_4[i];
var _7=_6.split("=");
if(_7!=null&&_7.length>1){
var _8=_7[0];
var _9=_7[1];
_2=updateParamObject(_2,_8,_9,_3);
}
}
return _2;
}
function updateParamObject(_a,_b,_c,_d,_e){
if(_a==null){
_a=[];
}
if(_a[_b]!=null&&_d){
if(dojo.lang.isArrayLike(_a[_b])){
if(_e!=null&&_e!=""){
_a[_b][_e]=_c;
}else{
_a[_b].push(_c);
}
}else{
var _f=_a[_b];
_a[_b]=[];
_a[_b].push(_f);
_a[_b].push(_c);
}
}else{
if(_e!=null&&_e!=""&&_e!=-1){
_a[_b+"_"+_e]=_c;
}else{
if(_e==-1){
var i=1;
while(_a[_b+"_"+i]!=null){
i++;
}
_a[_b+"_"+i]=_c;
}else{
_a[_b]=_c;
}
}
}
return _a;
}
storeAccordionJS={quickCartDrop:null,wishListDrop:null,compareDrop:null,compareCounter:0,compareRowCounter:0,compareItemCatEntry:new Object(),isComparePane:false,allSelectedFromCart:false,showStoreAccordionWaitTime:100,updateWaitTimeOut:1500,defaultShippingInfoParamObject:null,isDefaultShippingProvided:false,shipmentBlockObject:null,isShipmentBlockProvided:false,quickCartForm:[],wishListForm:[],isUpdateCartCalled:false,isShipmentPage:false,flexFlowOptions:new Object(),langId:"-1",storeId:"",catalogId:"",properties:new Object(),errorMessages:new Object(),redirect:false,directToCheckout:function(){
cursor_wait();
this.redirect=true;
wc.service.invoke("AjaxPrepareOrder");
},setErrorMessage:function(key,_12){
this.errorMessages[key]=_12;
},getErrorMessage:function(key){
var _14=this.errorMessages[key];
if(_14==null){
_14="Could not get the message value for specified key "+key;
}
return _14;
},setProperty:function(_15,_16){
this.properties[_15]=_16;
},getProperty:function(_17){
return this.properties[_17];
},removeProperty:function(_18){
delete this.properties[_18];
},setCommonParameters:function(_19,_1a,_1b){
this.langId=_19;
this.storeId=_1a;
this.catalogId=_1b;
},onLoad:function(){
this.initStoreAccordionContainer();
this.quickCartPostRefreshHandler();
this.wishListPostRefreshHandler();
},showStoreAccordion:function(_1c){
var _1d=document.getElementById("storeaccordion_div");
_1d.style.visibility="inherit";
dojo.html.show(_1d);
},initStoreAccordionContainer:function(){
busyCount++;
this.showStoreAccordion(this.showStoreAccordionWaitTime);
busyCount--;
dojo.event.kwConnect({srcObj:this,srcFunc:"updateCartWaitRTL",targetObj:this,targetFunc:"updateCartRTL",delay:this.updateWaitTimeOut,once:true});
},toggleCheckboxes:function(_1e,_1f){
checkAllNode=dojo.byId(_1f);
checkItems=dojo.html.getElementsByClass(_1e+"_checkboxItems");
if(checkAllNode.checked){
if(dojo.lang.isArrayLike(checkItems)){
dojo.lang.forEach(checkItems,function(_20){
_20.checked=true;
});
}else{
checkItems.checked=true;
}
}else{
if(dojo.lang.isArrayLike(checkItems)){
var _21=0;
dojo.lang.forEach(checkItems,function(_22){
_22.checked=false;
});
}else{
checkItems.checked=false;
}
}
},updateShippingInfoParams:function(_23){
if(this.defaultShippingInfoParamObject==null){
this.defaultShippingInfoParamObject=new Object();
}
for(shippingInfoParamName in _23){
this.defaultShippingInfoParamObject[shippingInfoParamName]=_23[shippingInfoParamName];
this.isDefaultShippingProvided=true;
}
},resetShippingInfoParams:function(){
this.defaultShippingInfoParamObject=null;
this.isDefaultShippingProvided=false;
},updateShipmentBlockObject:function(_24){
this.shipmentBlockObject=_24;
this.isShipmentBlockProvided=true;
},resetShipmentBlockObject:function(){
this.shipmentBlockObject=null;
this.isShipmentBlockProvided=false;
},addItemWithShipingInfo:function(_25){
var _26=wc.service.declare({id:"AjaxAddOrderItemWithShipingInfo",actionId:"AjaxAddOrderItemWithShipingInfo",url:"/webapp/wcs/stores/servlet/AjaxOrderChangeServiceItemAdd",successHandler:function(_27){
},failureHandler:function(_28){
if(_28!=null&&_28.errorMessage!=null){
alertDialog(_28.errorMessage,this.storeId,this.catalogId,this.langId);
}else{
if(_28!=null&&_28.errorMessageKey!=null){
alertDialog(_28.errorMessageKey,this.storeId,this.catalogId,this.langId);
}else{
alert("Error");
}
}
}});
dojo.event.kwConnect({srcObj:_26,srcFunc:"successHandler",targetObj:this,targetFunc:"updateItemDefaultShipingInfo",once:true});
wc.service.invoke("AjaxAddOrderItemWithShipingInfo",_25);
cursor_wait();
},updateItemDefaultShipingInfo:function(_29){
for(paramName in this.defaultShippingInfoParamObject){
for(items in _29["orderItemId"]){
_29=updateParamObject(_29,paramName,this.defaultShippingInfoParamObject[paramName],false,-1);
}
}
this.alertParams(_29);
wc.service.invoke("OrderItemShipmentBlockUpdate",_29);
cursor_wait();
},quickCartDropEventHandler:function(_2a){
this.add2ShopCartAjaxForDroppedItems(_2a.dragSource.dragObject);
return true;
},add2ShopCartAjaxForDroppedItems:function(_2b){
var _2c=[];
_2c.storeId=this.storeId;
_2c.catalogId=this.catalogId;
_2c.langId=this.langId;
_2c.orderId=".";
_2c.catEntryId=_2b.catentryId;
_2c.quantity="1";
if(!this.isDefaultShippingProvided){
this.alertParams(_2c);
wc.service.invoke("AjaxAddOrderItem",_2c);
}else{
this.addItemWithShipingInfo(_2c);
}
cursor_wait();
var _2d=document.getElementById("home_widgets");
if(_2d!=null){
var _2e=document.getElementById("home_popup");
var _2f=document.getElementById("rightMenu");
if(_2d.style.visibility==null||_2d.style.visibility=="hidden"||_2d.style.visibility==""){
_2d.style.visibility="visible";
_2e.style.visibility="visible";
_2f.style.visibility="visible";
}
}
},deleteFromCart:function(){
var _30=[];
_30.storeId=this.storeId;
_30.catalogId=this.catalogId;
_30.langId=this.langId;
var _31=false;
checkItems=dojo.html.getElementsByClass("QuickCartForm_checkboxItems");
if(dojo.lang.isArrayLike(checkItems)){
dojo.lang.forEach(checkItems,function(_32){
if(_32.checked){
var _33=_32.value;
_33=eval("("+_33+")");
for(key in _33){
_30=updateParamObject(_30,key,_33[key],false,-1);
}
_31=true;
}
});
}else{
if(checkItems.checked==true){
var _34=checkItems.value;
_34=eval("("+_34+")");
for(key in _34){
_30=updateParamObject(_30,key,_34[key],false);
}
_31=true;
}
}
if(_31){
_30.orderId=".";
this.alertParams(_30);
wc.service.invoke("AjaxDeleteOrderItem",_30);
cursor_wait();
}
var _35=dojo.byId("checkAllCartItem");
_35.checked=false;
},moveFromCart:function(){
var _36=false;
var _37=[];
_37.storeId=this.storeId;
_37.catalogId=this.catalogId;
_37.langId=this.langId;
var _38=[];
_38.storeId=this.storeId;
_38.catalogId=this.catalogId;
_38.langId=this.langId;
checkItems=dojo.html.getElementsByClass("QuickCartForm_checkboxItems");
if(dojo.lang.isArrayLike(checkItems)){
dojo.lang.forEach(checkItems,function(_39){
if(_39.checked){
var _3a=_39.value;
_3a=eval("("+_3a+")");
for(key in _3a){
var _3b=_3a[key];
_37=updateParamObject(_37,key,_3b,false,-1);
_38=updateParamObject(_38,key,_3b,false,-1);
}
_36=true;
}
});
}else{
if(checkItems.checked==true){
var _3c=checkItems.value;
_3c=eval("("+_3c+")");
for(key in _3c){
_37=updateParamObject(_37,key,_3c[key],false);
_38=updateParamObject(_38,key,_3c[key],false);
}
_36=true;
}
}
if(_36){
_37.orderId=".";
this.alertParams(_37);
wc.service.invoke("AjaxDeleteOrderItem",_37);
cursor_wait();
_38.URL="SuccessfulAJAXRequest";
this.alertParams(_38);
wc.service.invoke("AjaxInterestItemAdd",_38);
cursor_wait();
var _3d=document.getElementById("storeaccordion_div");
if(_3d!=null){
switchToWishPane();
}
}
var _3e=dojo.byId("checkAllCartItem");
_3e.checked=false;
},updateCartWait:function(_3f,_40){
},updateCart:function(_41,_42){
var _43=parseInt(_41.value);
if(!isNaN(_43)){
var _44=[];
_44.storeId=this.storeId;
_44.catalogId=this.catalogId;
_44.langId=this.langId;
_44.orderId=".";
_44.quantity=_43;
_44.orderItemId=_42;
this.alertParams(_44);
wc.service.invoke("AjaxUpdateOrderItem",_44);
cursor_wait();
}else{
}
},updateCartWaitRTL:function(_45,_46){
},updateCartRTL:function(_47,_48){
var _49=parseInt(_47.value);
if(!isNaN(_49)){
var _4a=[];
_4a.orderId=".";
_4a["storeId"]=this.storeId;
_4a["catalogId"]=this.catalogId;
_4a["langId"]=this.langId;
updateParamObject(_4a,"orderItemId",_48,false,-1);
updateParamObject(_4a,"quantity",_49,false,-1);
wc.service.invoke("AjaxUpdateOrderItemRTL",_4a);
cursor_wait();
}else{
}
},wishListDropEventHandler:function(_4b){
this.add2WishListAjaxForDroppedItems(_4b.dragSource.dragObject);
return true;
},add2WishListAjaxForDroppedItems:function(_4c){
var _4d=[];
_4d.storeId=this.storeId;
_4d.catalogId=this.catalogId;
_4d.langId=this.langId;
if(_4c.catentryId==null){
return;
}
if(typeof _4c.orderId!="undefined"&&typeof _4c.orderItemId!="undefined"){
_4d.orderId=".";
_4d.orderItemId=_4c.orderItemId;
this.alertParams(_4d);
wc.service.invoke("AjaxDeleteOrderItem",_4d);
cursor_wait();
}
_4d.URL="SuccessfulAJAXRequest";
_4d.catEntryId=_4c.catentryId;
this.alertParams(_4d);
wc.service.invoke("AjaxInterestItemAdd",_4d);
cursor_wait();
var _4e=document.getElementById("home_widgets");
if(_4e!=null){
var _4f=document.getElementById("home_popup");
var _50=document.getElementById("rightMenu");
if(_4e.style.visibility==null||_4e.style.visibility=="hidden"||_4e.style.visibility==""){
_4e.style.visibility="visible";
_4f.style.visibility="visible";
_50.style.visibility="visible";
}
}
},deleteFromWishList:function(){
var _51=[];
_51.storeId=this.storeId;
_51.catalogId=this.catalogId;
_51.langId=this.langId;
var _52=false;
checkItems=dojo.html.getElementsByClass("WishListForm_checkboxItems");
if(dojo.lang.isArrayLike(checkItems)){
dojo.lang.forEach(checkItems,function(_53){
if(_53.checked){
var _54=_53.value;
_54=eval("("+_54+")");
for(key in _54){
_51=updateParamObject(_51,key,_54[key],true);
}
_52=true;
}
});
}else{
if(checkItems.checked==true){
var _55=checkItems.value;
_55=eval("("+_55+")");
for(key in _55){
_51=updateParamObject(_51,key,_55[key],false);
}
_52=true;
}
}
if(_52){
_51.URL="SuccessfulAJAXRequest";
this.alertParams(_51);
wc.service.invoke("AjaxInterestItemDelete",_51);
cursor_wait();
}
var _56=dojo.byId("checkAllWishListItem");
_56.checked=false;
},moveFromWishList:function(){
var _57=[];
_57.storeId=this.storeId;
_57.catalogId=this.catalogId;
_57.langId=this.langId;
var _58=false;
checkItems=dojo.html.getElementsByClass("WishListForm_checkboxItems");
if(dojo.lang.isArrayLike(checkItems)){
dojo.lang.forEach(checkItems,function(_59){
if(_59.checked){
var _5a=_59.value;
_5a=eval("("+_5a+")");
for(key in _5a){
_57=updateParamObject(_57,key,_5a[key],false,-1);
}
_58=true;
}
});
}else{
if(checkItems.checked==true){
var _5b=checkItems.value;
_5b=eval("("+_5b+")");
for(key in _5b){
_57=updateParamObject(_57,key,_5b[key],false);
}
_58=true;
}
}
if(_58){
_57.orderId=".";
if(!this.isDefaultShippingProvided){
this.alertParams(_57);
wc.service.invoke("AjaxAddOrderItem",_57);
}else{
this.addItemWithShipingInfo(_57);
}
cursor_wait();
var _5c=document.getElementById("storeaccordion_div");
if(_5c!=null){
switchToCartPane();
}
}
var _5d=dojo.byId("checkAllWishListItem");
_5d.checked=false;
},fastCheckout:function(_5e){
wc.service.declare({id:"FastCheckOutPrepareOrder",actionId:"FastCheckOutPrepareOrder",url:"/webapp/wcs/stores/servlet/AjaxOrderProcessServiceOrderPrepare",formId:_5e,successHandler:function(_5f){
cursor_clear();
wc.service.invoke("AjaxSubmitOrder");
},failureHandler:function(_60){
if(_60!=null&&_60.errorMessage!=null){
alertDialog(_60.errorMessage,this.storeId,this.catalogId,this.langId);
}else{
alert("Error");
}
}});
wc.service.declare({id:"FastCheckOutOrderCopy",actionId:"FastCheckOutOrderCopy",url:"/webapp/wcs/stores/servlet/AjaxOrderCopy",formId:_5e,successHandler:function(_61){
cursor_clear();
wc.service.invoke("FastCheckOutPrepareOrder");
cursor_wait();
},failureHandler:function(_62){
if(_62!=null&&_62.errorMessage!=null){
alertDialog(_62.errorMessage,this.storeId,this.catalogId,this.langId);
}else{
alert("Error");
}
}});
wc.service.invoke("FastCheckOutOrderCopy");
cursor_wait();
},showCompare:function(_63){
this.isComparePane=_63;
},getStorageKey:function(){
var _64="CompareItems";
var _65=dojo.byId("sessionId").innerHTML;
var _66=0;
for(i=0;i<_65.length;i++){
_66=_66+_65.charCodeAt(i);
}
_64=_64+_66;
return _64;
},initializeCompare:function(){
if(this.isComparePane){
var _67=this.getStorageKey();
this.compareCounter=0;
this.compareRowCounter=0;
this.compareItemCatEntry=new Object();
var _68=StorageJS.load(_67);
if(_68!=null){
this.compareItemCatEntry=_68;
}
var _69=document.getElementById("compareZone");
var _6a=_69.childNodes;
for(i=0;i<_6a.length;i++){
if(_6a[i].id!="compareDropZoneImg"){
_69.removeChild(_6a[i]);
}
}
var _6b=true;
for(catEntryIdentifier in this.compareItemCatEntry){
this.compareCounter++;
if(this.compareCounter<=5){
var _6c=document.CompareForm.catentryId[this.compareCounter-1].value=catEntryIdentifier;
for(i=0;i<_6a.length;i++){
if(_6a[i].id=="compareDropZoneImg"){
_69.removeChild(_6a[i]);
}
}
var td1=document.createElement("td");
td1.setAttribute("id","compareCatentry"+_6c);
var _6e=document.createElement("input");
_6e.setAttribute("id","compareCatentryCheckBox"+_6c);
_6e.setAttribute("type","checkbox");
_6e.setAttribute("class","CompareForm_checkboxItems");
_6e.setAttribute("value",catEntryIdentifier);
td1.appendChild(_6e);
var td2=document.createElement("td");
var _70=document.createElement("div");
_70.setAttribute("id","compareCatentryContainer"+_6c);
td2.appendChild(_70);
_70.innerHTML=this.compareItemCatEntry[catEntryIdentifier];
var _71=dojo.dom.getFirstChildElement(_70);
var _72=new dojo.dnd.HtmlDragSource(_71,"compare_item");
_72.dragObject["catentryId"]=catEntryIdentifier;
this.compareRowCounter++;
var tr1=document.createElement("tr");
tr1.setAttribute("id","compareRow"+this.compareRowCounter);
tr1.appendChild(td1);
tr1.appendChild(td2);
if(_6b){
var _74=document.createElement("table");
var _75=document.createElement("tbody");
_75.setAttribute("id","compareItemsTable");
_74.appendChild(_75);
_75.appendChild(tr1);
_69.appendChild(_74);
}else{
var _75=document.getElementById("compareItemsTable");
_75.appendChild(tr1);
}
_6b=false;
}
}
}
},Add2CompareAjaxRTL:function(_76,_77,_78,_79,_7a){
var _7b=this.getStorageKey();
if(_76 in this.compareItemCatEntry||_76==null){
alert(this.getErrorMessage("compareItemExist"));
return false;
}else{
this.compareCounter++;
if(this.compareCounter<=5){
document.CompareForm.catentryId[this.compareCounter-1].value=_76;
var _7c="<table><tr><td align='center'>"+_7a.innerHTML+"<td class='blackText' valign='top' align='left' style='width: 100%;'>"+"<div class='rw_title' style='font-size:8pt;'><a href='"+_79+"' >"+_77+"</a></div>"+"<div style='font-size: 7pt;'>Model# "+_78+"</div>"+"</td></tr></table>";
this.compareItemCatEntry[_76]=_7c;
StorageJS.save(_7b,this.compareItemCatEntry,-1);
this.initializeCompare();
var _7d=document.getElementById("home_widgets");
if(_7d!=null){
var _7e=document.getElementById("home_popup");
var _7f=document.getElementById("rightMenu");
if(_7d.style.visibility==null||_7d.style.visibility=="hidden"||_7d.style.visibility==""){
_7d.style.visibility="visible";
_7e.style.visibility="visible";
_7f.style.visibility="visible";
}
}
var _80=document.getElementById("storeaccordion_div");
if(_80!=null){
switchToComparePane();
}
}else{
alert("You can only compare up to 5 items");
}
}
},Add2CompareAjax:function(_81,_82){
var _83=this.getStorageKey();
if(_81 in this.compareItemCatEntry||_81==null){
alert(this.getErrorMessage("compareItemExist"));
return false;
}else{
this.compareCounter++;
if(this.compareCounter<=5){
document.CompareForm.catentryId[this.compareCounter-1].value=_81;
var _84=_82.innerHTML.replace(/^\s+/,"").replace(/\s+$/,"");
this.compareItemCatEntry[_81]=_84;
StorageJS.save(_83,this.compareItemCatEntry,-1);
this.initializeCompare();
var _85=document.getElementById("home_widgets");
if(_85!=null){
var _86=document.getElementById("home_popup");
var _87=document.getElementById("rightMenu");
if(_85.style.visibility==null||_85.style.visibility=="hidden"||_85.style.visibility==""){
_85.style.visibility="visible";
_86.style.visibility="visible";
_87.style.visibility="visible";
}
}
var _88=document.getElementById("storeaccordion_div");
if(_88!=null){
switchToComparePane();
}
}else{
alert("You can only compare up to 5 items");
}
}
},Add2CompareAjaxWith:function(_89,_8a,_8b,_8c,url){
var _8e=this.getStorageKey();
if(_89 in this.compareItemCatEntry||_89==null){
alert(this.getErrorMessage("compareItemExist"));
}else{
this.compareCounter++;
if(this.compareCounter<=5){
document.CompareForm.catentryId[this.compareCounter-1].value=_89;
var _id="Compare_Item_"+_89;
var _90=""+"\t<table><tr><td align='center'><a id='imgcatBrowse"+_id+"' href='"+url+"' >\n"+"\t\t\t\t\t\t<img src='"+_8c+"' alt='"+_8c+"' border='0' width='35' height='42' />\n"+"\t\t\t\t</a>\n</td>"+"  \t\t\t<td class='blackText' valign='top' align='left' style='width:100%;'>"+" \t\t\t\t\t<div class='rw_title' style='font-size:8pt;'><a href='"+url+"' >"+_8b+"</a></div>"+"             \t\t<div style='font-size:7pt;'>Model# "+_8a+"</div>"+"  </td></tr></table>";
this.compareItemCatEntry[_89]=_90;
StorageJS.save(_8e,this.compareItemCatEntry,-1);
this.initializeCompare();
var _91=document.getElementById("home_widgets");
if(_91!=null){
var _92=document.getElementById("home_popup");
var _93=document.getElementById("rightMenu");
if(_91.style.visibility==null||_91.style.visibility=="hidden"||_91.style.visibility==""){
_91.style.visibility="visible";
_92.style.visibility="visible";
_93.style.visibility="visible";
}
}
var _94=document.getElementById("storeaccordion_div");
if(_94!=null){
switchToComparePane();
}
}else{
alert("You can only compare up to 5 items");
}
}
},compareDropEventHandler:function(_95){
_95.dragSource.type="compare_item";
var _96=_95.dragObject.domNode;
var _97=_95.dragSource.dragObject.catentryId;
var _98=_95.dragSource.dragObject.ShortDescription;
var _99=_95.dragSource.dragObject.SKU;
var _9a=_95.dragObject.domNode;
var _96=_9a.cloneNode(true);
var _9b=_96.childNodes;
var _9c="";
for(i=0;i<_9b.length;i++){
if(typeof _9b[i].id!="undefined"){
_9c=_9b[i].href;
var _9d=_9b[i].childNodes;
for(j=0;j<_9d.length;j++){
if(typeof _9d[j].width!="undefined"){
_9d[j].width="35";
}
if(typeof _9d[j].height!="undefined"){
_9d[j].height="42";
}
}
}
}
this.Add2CompareAjaxRTL(_97,_98,_99,_9c,_96);
},increaseCompareCounter:function(){
this.compareCounter++;
},deleteFromCompareZone:function(){
var _9e=this.getStorageKey();
checkItems=dojo.html.getElementsByClass("CompareForm_checkboxItems");
var _9f=[];
if(dojo.lang.isArrayLike(checkItems)){
dojo.lang.forEach(checkItems,function(_a0){
if(_a0.checked){
var _a1=parseInt(_a0.value);
_9f.push(_a1);
this.compareCounter--;
}
});
}else{
if(checkItems.checked==true){
var _a2=parseInt(checkItems.value);
_9f.push(_a2);
this.compareCounter--;
}
}
for(index in _9f){
delete this.compareItemCatEntry[_9f[index]];
}
StorageJS.save(_9e,this.compareItemCatEntry,-1);
this.initializeCompare();
var _a3=dojo.byId("checkAllCompareItem");
_a3.checked=false;
},compareProducts:function(){
var _a4=this.getStorageKey();
var _a5=StorageJS.load(_a4);
if(_a5!=null){
this.compareItemCatEntry=_a5;
}
var url=document.CompareForm.action+"?storeId="+document.CompareForm.storeId.value+"&catalogId="+document.CompareForm.catalogId.value+"&langId="+document.CompareForm.langId.value+"&categoryId="+document.CompareForm.categoryId.value;
for(catEntryIdentifier in this.compareItemCatEntry){
url=url+"&catentryId="+catEntryIdentifier;
}
document.location.href=url;
},quickCartPostRefreshHandler:function(){
if(!("quickCart" in this.flexFlowOptions)||("quickCart" in this.flexFlowOptions&&this.flexFlowOptions["quickCart"]==true)){
var _a7="QuickCartForm";
var _a8="miniQuickCartText";
if(document.getElementById(_a8)){
}
this.updateShipmentSelectBoxes();
}
},wishListPostRefreshHandler:function(){
if(!("wishList" in this.flexFlowOptions)||("wishList" in this.flexFlowOptions&&this.flexFlowOptions["wishList"]==true)){
var _a9="WishListForm";
var _aa="miniWishListText";
}
},updateShipmentSelectBoxes:function(){
if(this.isShipmentPage){
this.shipmentBlockObject=shipmentPageJS.getQuickCartHelperObjects();
if(this.shipmentBlockObject!=null){
var _ab="";
var _ac=dojo.widget.manager.getWidgetsByFilter(this.quickCartProductQuickViewFilter,false);
for(widget in _ac){
var _ad=_ac[widget];
if(_ad!=null&&_ad.shipmentSelectBoxId!=null){
var i=_ad.orderItemId;
var _af=document.getElementById("SelectBoxSelectedValue_"+i);
for(_b0 in this.shipmentBlockObject){
var _b1=this.shipmentBlockObject[_b0];
var _b0=parseInt(_b0);
if(_ad.addressId==_b1.addressId&&_ad.shipModeId==_b1.shipModeId){
_ab=_b0+1;
break;
}
}
_af.innerHTML=_ab;
}else{
alert("shipmentSelectBoxId property is not set under additionalProperties for ProductQuickViewWidget");
}
}
}
}
},quickCartProductQuickViewFilter:function(_b2){
var _b3="productquickview";
if(_b2.widgetType.toLowerCase()==_b3){
tempStr=_b2.identifier;
tempStr=tempStr.substring(0,17);
if(tempStr=="quickCartCatEntry"){
return true;
}
}
return false;
},shipmentChanged:function(_b4,_b5){
_b4=eval("( "+_b4+" )");
var _b6=dojo.byId(_b5).options[dojo.byId(_b5).selectedIndex].value;
if(shipmentPageJS.isValidBlock(_b6)){
var _b7=eval("("+shipmentPageJS.getQuickCartHelperObjects()[_b6-1]+")");
for(newParam in _b7){
_b4=updateParamObject(_b4,newParam,_b7[newParam],false);
}
this.updateItemShipingInfo(_b4);
}else{
alert("Please select a valid address and shipping method in Shipment "+_b6);
}
},updateItemShipingInfo:function(_b8){
wc.service.invoke("OrderItemShipmentBlockUpdate",_b8);
cursor_wait();
},showShipment:function(_b9){
this.isShipmentPage=_b9;
},setFlexFlowOptions:function(key,_bb){
this.flexFlowOptions=updateParamObject(this.flexFlowOptions,key,_bb,false);
},alertParams:function(_bc){
var str="";
for(x in _bc){
str=str+"\n"+x+":"+_bc[x];
}
}};
if(typeof StorageJS!="undefined"){
dojo.event.connect(StorageJS,"loaded",storeAccordionJS,"initializeCompare");
}
var compareCounter=0;
var compareRowCounter=0;
var allSelectedFromCart=false;
function quickCartDropEventHandler(_be){
storeAccordionJS.quickCartDropEventHandler(_be);
return true;
}
function wishListDropEventHandler(_bf){
storeAccordionJS.wishListDropEventHandler(_bf);
return true;
}
function compareDropEventHandler(_c0){
storeAccordionJS.compareDropEventHandler(_c0);
return true;
}
function onLoadEvent(){
storeAccordionJS.onLoad();
}
function switchToChktPane(){
var _c1=dojo.widget.byId("CheckoutWidget");
var _c2=dojo.widget.byId("StoreAccordian");
_c2.selectChild(_c1.parent);
}
function switchToCartPane(){
var _c3=dojo.widget.byId("QuickCartWidget");
var _c4=dojo.widget.byId("StoreAccordian");
if(_c3!=null){
_c4.selectChild(_c3.parent);
}
}
function switchToWishPane(){
var _c5=dojo.widget.byId("WishListWidget");
var _c6=dojo.widget.byId("StoreAccordian");
if(_c5!=null){
_c6.selectChild(_c5.parent);
}
}
function switchToComparePane(){
var _c7=dojo.widget.byId("CompareWidget");
if(_c7!=null){
var _c8=dojo.widget.byId("StoreAccordian");
_c8.selectChild(_c7.parent);
}
}

