Type.registerNamespace('CustomAjaxHandler');
CustomAjaxHandler.ShoppingCart=function() {
CustomAjaxHandler.ShoppingCart.initializeBase(this);
this._timeout = 0;
this._userContext = null;
this._succeeded = null;
this._failed = null;
}
CustomAjaxHandler.ShoppingCart.prototype={
_get_path:function() {
 var p = this.get_path();
 if (p) return p;
 else return CustomAjaxHandler.ShoppingCart._staticInstance.get_path();},
AddToCart:function(productId,leftQuantity,rightQuantity,leftBaseCurve,rightBaseCurve,leftPower,rightPower,leftCylinder,rightCylinder,leftAxis,rightAxis,leftAdd,rightAdd,leftColour,rightColour,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'AddToCart',false,{productId:productId,leftQuantity:leftQuantity,rightQuantity:rightQuantity,leftBaseCurve:leftBaseCurve,rightBaseCurve:rightBaseCurve,leftPower:leftPower,rightPower:rightPower,leftCylinder:leftCylinder,rightCylinder:rightCylinder,leftAxis:leftAxis,rightAxis:rightAxis,leftAdd:leftAdd,rightAdd:rightAdd,leftColour:leftColour,rightColour:rightColour},succeededCallback,failedCallback,userContext); },
UpdateTotal:function(elements,succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'UpdateTotal',false,{elements:elements},succeededCallback,failedCallback,userContext); },
GetCartItemIDs:function(succeededCallback, failedCallback, userContext) {
return this._invoke(this._get_path(), 'GetCartItemIDs',false,{},succeededCallback,failedCallback,userContext); }}
CustomAjaxHandler.ShoppingCart.registerClass('CustomAjaxHandler.ShoppingCart',Sys.Net.WebServiceProxy);
CustomAjaxHandler.ShoppingCart._staticInstance = new CustomAjaxHandler.ShoppingCart();
CustomAjaxHandler.ShoppingCart.set_path = function(value) { CustomAjaxHandler.ShoppingCart._staticInstance.set_path(value); }
CustomAjaxHandler.ShoppingCart.get_path = function() { return CustomAjaxHandler.ShoppingCart._staticInstance.get_path(); }
CustomAjaxHandler.ShoppingCart.set_timeout = function(value) { CustomAjaxHandler.ShoppingCart._staticInstance.set_timeout(value); }
CustomAjaxHandler.ShoppingCart.get_timeout = function() { return CustomAjaxHandler.ShoppingCart._staticInstance.get_timeout(); }
CustomAjaxHandler.ShoppingCart.set_defaultUserContext = function(value) { CustomAjaxHandler.ShoppingCart._staticInstance.set_defaultUserContext(value); }
CustomAjaxHandler.ShoppingCart.get_defaultUserContext = function() { return CustomAjaxHandler.ShoppingCart._staticInstance.get_defaultUserContext(); }
CustomAjaxHandler.ShoppingCart.set_defaultSucceededCallback = function(value) { CustomAjaxHandler.ShoppingCart._staticInstance.set_defaultSucceededCallback(value); }
CustomAjaxHandler.ShoppingCart.get_defaultSucceededCallback = function() { return CustomAjaxHandler.ShoppingCart._staticInstance.get_defaultSucceededCallback(); }
CustomAjaxHandler.ShoppingCart.set_defaultFailedCallback = function(value) { CustomAjaxHandler.ShoppingCart._staticInstance.set_defaultFailedCallback(value); }
CustomAjaxHandler.ShoppingCart.get_defaultFailedCallback = function() { return CustomAjaxHandler.ShoppingCart._staticInstance.get_defaultFailedCallback(); }
CustomAjaxHandler.ShoppingCart.set_path("/Services/ShoppingCart.asmx");
CustomAjaxHandler.ShoppingCart.AddToCart= function(productId,leftQuantity,rightQuantity,leftBaseCurve,rightBaseCurve,leftPower,rightPower,leftCylinder,rightCylinder,leftAxis,rightAxis,leftAdd,rightAdd,leftColour,rightColour,onSuccess,onFailed,userContext) {CustomAjaxHandler.ShoppingCart._staticInstance.AddToCart(productId,leftQuantity,rightQuantity,leftBaseCurve,rightBaseCurve,leftPower,rightPower,leftCylinder,rightCylinder,leftAxis,rightAxis,leftAdd,rightAdd,leftColour,rightColour,onSuccess,onFailed,userContext); }
CustomAjaxHandler.ShoppingCart.UpdateTotal= function(elements,onSuccess,onFailed,userContext) {CustomAjaxHandler.ShoppingCart._staticInstance.UpdateTotal(elements,onSuccess,onFailed,userContext); }
CustomAjaxHandler.ShoppingCart.GetCartItemIDs= function(onSuccess,onFailed,userContext) {CustomAjaxHandler.ShoppingCart._staticInstance.GetCartItemIDs(onSuccess,onFailed,userContext); }
