var Cart=function() {
Cart.initializeBase(this);
this._timeout = 0;
this._userContext = null;
this._succeeded = null;
this._failed = null;
}
Cart.prototype={
_get_path:function() {
 var p = this.get_path();
 if (p) return p;
 else return Cart._staticInstance.get_path();},
AddToWishList:function(PosCode,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'AddToWishList',false,{PosCode:PosCode},succeededCallback,failedCallback,userContext); },
AddToShoppingCart:function(PosCode,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'AddToShoppingCart',false,{PosCode:PosCode},succeededCallback,failedCallback,userContext); },
CalculateDelivery:function(PosCode,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'CalculateDelivery',false,{PosCode:PosCode},succeededCallback,failedCallback,userContext); },
GetLinkedProducts:function(PosCode,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'GetLinkedProducts',false,{PosCode:PosCode},succeededCallback,failedCallback,userContext); }}
Cart.registerClass('Cart',Sys.Net.WebServiceProxy);
Cart._staticInstance = new Cart();
Cart.set_path = function(value) { Cart._staticInstance.set_path(value); }
Cart.get_path = function() { return Cart._staticInstance.get_path(); }
Cart.set_timeout = function(value) { Cart._staticInstance.set_timeout(value); }
Cart.get_timeout = function() { return Cart._staticInstance.get_timeout(); }
Cart.set_defaultUserContext = function(value) { Cart._staticInstance.set_defaultUserContext(value); }
Cart.get_defaultUserContext = function() { return Cart._staticInstance.get_defaultUserContext(); }
Cart.set_defaultSucceededCallback = function(value) { Cart._staticInstance.set_defaultSucceededCallback(value); }
Cart.get_defaultSucceededCallback = function() { return Cart._staticInstance.get_defaultSucceededCallback(); }
Cart.set_defaultFailedCallback = function(value) { Cart._staticInstance.set_defaultFailedCallback(value); }
Cart.get_defaultFailedCallback = function() { return Cart._staticInstance.get_defaultFailedCallback(); }
Cart.set_enableJsonp = function(value) { Cart._staticInstance.set_enableJsonp(value); }
Cart.get_enableJsonp = function() { return Cart._staticInstance.get_enableJsonp(); }
Cart.set_jsonpCallbackParameter = function(value) { Cart._staticInstance.set_jsonpCallbackParameter(value); }
Cart.get_jsonpCallbackParameter = function() { return Cart._staticInstance.get_jsonpCallbackParameter(); }
Cart.set_path("http://www.barbourbymail.co.uk/ws/Cart.svc");
Cart.AddToWishList= function(PosCode,onSuccess,onFailed,userContext) {Cart._staticInstance.AddToWishList(PosCode,onSuccess,onFailed,userContext); }
Cart.AddToShoppingCart= function(PosCode,onSuccess,onFailed,userContext) {Cart._staticInstance.AddToShoppingCart(PosCode,onSuccess,onFailed,userContext); }
Cart.CalculateDelivery= function(PosCode,onSuccess,onFailed,userContext) {Cart._staticInstance.CalculateDelivery(PosCode,onSuccess,onFailed,userContext); }
Cart.GetLinkedProducts= function(PosCode,onSuccess,onFailed,userContext) {Cart._staticInstance.GetLinkedProducts(PosCode,onSuccess,onFailed,userContext); }
var gtc = Sys.Net.WebServiceProxy._generateTypedConstructor;
Type.registerNamespace('Barbour.Website');
if (typeof(Barbour.Website.Cart) === "undefined") {
   Barbour.Website.Cart = {};
}
if (typeof(Barbour.Website.Cart.AddCartResult) === 'undefined') {
Barbour.Website.Cart.AddCartResult=gtc("Cart.AddCartResult:http://schemas.datacontract.org/2004/07/Barbour.Website");
Barbour.Website.Cart.AddCartResult.registerClass('Barbour.Website.Cart.AddCartResult');
}
Type.registerNamespace('Common.Entities');
if (typeof(Common.Entities.LinkedProductEntity) === 'undefined') {
Common.Entities.LinkedProductEntity=gtc("LinkedProductEntity:http://schemas.datacontract.org/2004/07/Common.Entities");
Common.Entities.LinkedProductEntity.registerClass('Common.Entities.LinkedProductEntity');
}
Type.registerNamespace('Business');
if (typeof(Business.Cart) === "undefined") {
   Business.Cart = {};
}
if (typeof(Business.Cart.ShippingOptionItemUiVisibility) === 'undefined') {
Business.Cart.ShippingOptionItemUiVisibility=gtc("Cart.ShippingOptionItemUiVisibility:http://schemas.datacontract.org/2004/07/Business");
Business.Cart.ShippingOptionItemUiVisibility.registerClass('Business.Cart.ShippingOptionItemUiVisibility');
}
Type.registerNamespace('Common');
if (typeof(Common.DeliveryTypes) === 'undefined') {
Common.DeliveryTypes = function() { throw Error.invalidOperation(); }
Common.DeliveryTypes.prototype = {NotSet: 0,Express: 1,Standard: 2,Economy: 3}
Common.DeliveryTypes.registerEnum('Common.DeliveryTypes', true);
}

