shopCartObjectJS={updateWaitTimeOut:150,showSelectBoxFor:4000,langId:"-1",storeId:"",catalogId:"",errorMessages:{},setErrorMessage:function(_1,_2){
this.errorMessages[_1]=_2;
},setCommonParameters:function(_3,_4,_5){
this.langId=_3;
this.storeId=_4;
this.catalogId=_5;
},initializeShoppingCartPage:function(){
dojo.event.kwConnect({srcObj:this,srcFunc:"updateCartWait",targetObj:this,targetFunc:"updateCart",delay:this.updateWaitTimeOut,once:true});
},updateCartWait:function(_6,_7,_8){
},updateCart:function(_9,_a,_b){
var _c=parseInt(_9.value);
if(!isNaN(_c)){
var _d=[];
_d.orderId=".";
_d["storeId"]=this.storeId;
_d["catalogId"]=this.catalogId;
_d["langId"]=this.langId;
this.updateParamObject(_d,"orderItemId",_a,false,-1);
this.updateParamObject(_d,"quantity",_c,false,-1);
_d["supplierData"]=_b;
wc.service.invoke("AjaxUpdateOrderItem",_d);
cursor_wait();
}else{
alert("Please Enter a Valid Quantity.");
}
},addToCartWait:function(_e,_f){
dojo.debug("add to cart, catentryId:"+_f+", with quantity:"+_e);
if(_e>0){
var _10=[];
_10.orderId=".";
_10["storeId"]=this.storeId;
_10["catalogId"]=this.catalogId;
_10["langId"]=this.langId;
this.updateParamObject(_10,"catEntryId",_f,false,-1);
this.updateParamObject(_10,"orderId",".",false,-1);
this.updateParamObject(_10,"quantity",_e,false,-1);
wc.service.invoke("AjaxAddOrderItem",_10);
cursor_wait();
}
},updateCartRefresh:function(_11,_12,_13){
_13.refresh(_11);
cursor_clear();
},updateParamObject:function(_14,key,_16,_17,_18){
if(_14==null){
_14=[];
}
if(_14[key]!=null&&_17){
if(dojo.lang.isArrayLike(_14[key])){
if(_18!=null&&_18!=""){
_14[key][_18]=_16;
}else{
_14[key].push(_16);
}
}else{
var _19=_14[key];
_14[key]=[];
_14[key].push(_19);
_14[key].push(_16);
}
}else{
if(_18!=null&&_18!=""&&_18!=-1){
_14[key+"_"+_18]=_16;
}else{
if(_18==-1){
var i=1;
while(_14[key+"_"+i]!=null){
i++;
}
_14[key+"_"+i]=_16;
}else{
_14[key]=_16;
}
}
}
return _14;
}};
miniShopCartPageJS={aDropDownTarget:"f",updateMiniCartRefresh:function(_1b,_1c,_1d){
_1d.refresh(_1b);
cursor_clear();
},defineDropTargets:function(){
var _1e=document.getElementById("miniShoppingCartDropArea");
var _1f=new wc.widget.WCHtmlDropTarget(_1e,["item","product"]);
_1f.onDrop=this.miniCartDropEventHandler;
dojo.debug("Initialized drag and drop handler: miniCartDropEventHandler");
},dover:function(_20){
},miniCartDropEventHandler:function(_21){
alert("just a test");
this.onDragOut(_21);
var _22=_21.dragSource.dragObject.catentryId;
var _23=parseInt(_21.dragSource.dragObject.quantity);
dojo.debug("Add catentryId:"+_22+", with quantity:"+_23);
if(!isNaN(_23)&&!isNaN(_22)){
shopCartObjectJS.addToCartWait(_23,_22);
}else{
}
return true;
}};

