// cached javascript var EcommerceHandler = { GetBasket:function(callback,context){return new ajax_request(this.url + '?_method=GetBasket&_session=r','',callback, context);}, writeValuesInFile:function(val,callback,context){return new ajax_request(this.url + '?_method=writeValuesInFile&_session=r','val=' + enc(val),callback, context);}, RemoveItemFromCart:function(cardId,logo,callback,context){return new ajax_request(this.url + '?_method=RemoveItemFromCart&_session=r','cardId=' + enc(cardId)+ '\r\nlogo=' + enc(logo),callback, context);}, UpdateItemFromCart:function(cardId,changeQuantityValue,logo,callback,context){return new ajax_request(this.url + '?_method=UpdateItemFromCart&_session=rw','cardId=' + enc(cardId)+ '\r\nchangeQuantityValue=' + enc(changeQuantityValue)+ '\r\nlogo=' + enc(logo),callback, context);}, UpdateItemFromCart1:function(cardId,changeLogo,callback,context){return new ajax_request(this.url + '?_method=UpdateItemFromCart1&_session=rw','cardId=' + enc(cardId)+ '\r\nchangeLogo=' + enc(changeLogo),callback, context);}, SetGreetingMsg:function(cardId,val,changeLogo,callback,context){return new ajax_request(this.url + '?_method=SetGreetingMsg&_session=rw','cardId=' + enc(cardId)+ '\r\nval=' + enc(val)+ '\r\nchangeLogo=' + enc(changeLogo),callback, context);}, UpdateItemFromCartCheckedMerge:function(cardId,changeLogo,callback,context){return new ajax_request(this.url + '?_method=UpdateItemFromCartCheckedMerge&_session=rw','cardId=' + enc(cardId)+ '\r\nchangeLogo=' + enc(changeLogo),callback, context);}, DeleteBasketItem:function(productId,logo,callback,context){return new ajax_request(this.url + '?_method=DeleteBasketItem&_session=rw','productId=' + enc(productId)+ '\r\nlogo=' + enc(logo),callback, context);}, GetTotalCardsAmount:function(callback,context){return new ajax_request(this.url + '?_method=GetTotalCardsAmount&_session=rw','',callback, context);}, CheckItemExists:function(callback,context){return new ajax_request(this.url + '?_method=CheckItemExists&_session=rw','',callback, context);}, GetCartTotalSumCountAmount:function(callback,context){return new ajax_request(this.url + '?_method=GetCartTotalSumCountAmount&_session=rw','',callback, context);}, Update:function(productId,quantity,logo,callback,context){return new ajax_request(this.url + '?_method=Update&_session=rw','productId=' + enc(productId)+ '\r\nquantity=' + enc(quantity)+ '\r\nlogo=' + enc(logo),callback, context);}, UpdateOnlyLogo:function(productId,logo,callback,context){return new ajax_request(this.url + '?_method=UpdateOnlyLogo&_session=rw','productId=' + enc(productId)+ '\r\nlogo=' + enc(logo),callback, context);}, UploadUserImages:function(filePath,callback,context){return new ajax_request(this.url + '?_method=UploadUserImages&_session=rw','filePath=' + enc(filePath),callback, context);}, InsertIntoBasket:function(productId,name,quantity,rate,logo,callback,context){return new ajax_request(this.url + '?_method=InsertIntoBasket&_session=rw','productId=' + enc(productId)+ '\r\nname=' + enc(name)+ '\r\nquantity=' + enc(quantity)+ '\r\nrate=' + enc(rate)+ '\r\nlogo=' + enc(logo),callback, context);}, UpdateItemPrintGreetings:function(ProductId,greetings,logo,callback,context){return new ajax_request(this.url + '?_method=UpdateItemPrintGreetings&_session=rw','ProductId=' + enc(ProductId)+ '\r\ngreetings=' + enc(greetings)+ '\r\nlogo=' + enc(logo),callback, context);}, UpdateItemFrontPrintGreetingsMessage:function(ProductId,frontMessage,logo,callback,context){return new ajax_request(this.url + '?_method=UpdateItemFrontPrintGreetingsMessage&_session=rw','ProductId=' + enc(ProductId)+ '\r\nfrontMessage=' + enc(frontMessage)+ '\r\nlogo=' + enc(logo),callback, context);}, UpdateItemBackPrintGreetingsMessage:function(ProductId,backMessage,logo,callback,context){return new ajax_request(this.url + '?_method=UpdateItemBackPrintGreetingsMessage&_session=rw','ProductId=' + enc(ProductId)+ '\r\nbackMessage=' + enc(backMessage)+ '\r\nlogo=' + enc(logo),callback, context);}, GrandSumAmount:function(callback,context){return new ajax_request(this.url + '?_method=GrandSumAmount&_session=rw','',callback, context);}, vatCalculation:function(callback,context){return new ajax_request(this.url + '?_method=vatCalculation&_session=rw','',callback, context);}, UpdateProductLogoColor:function(ProductId,colorName,logo,callback,context){return new ajax_request(this.url + '?_method=UpdateProductLogoColor&_session=rw','ProductId=' + enc(ProductId)+ '\r\ncolorName=' + enc(colorName)+ '\r\nlogo=' + enc(logo),callback, context);}, UpdateProductLogoColorBack:function(ProductId,colorName,logo,callback,context){return new ajax_request(this.url + '?_method=UpdateProductLogoColorBack&_session=rw','ProductId=' + enc(ProductId)+ '\r\ncolorName=' + enc(colorName)+ '\r\nlogo=' + enc(logo),callback, context);}, AddItem:function(myBasket,ProductId,name,quantity,rate,logo,category,callback,context){return new ajax_request(this.url + '?_method=AddItem&_session=rw','myBasket=' + enc(myBasket)+ '\r\nProductId=' + enc(ProductId)+ '\r\nname=' + enc(name)+ '\r\nquantity=' + enc(quantity)+ '\r\nrate=' + enc(rate)+ '\r\nlogo=' + enc(logo)+ '\r\ncategory=' + enc(category),callback, context);}, GetTotalOrder:function(category,callback,context){return new ajax_request(this.url + '?_method=GetTotalOrder&_session=rw','category=' + enc(category),callback, context);}, GetTotalOrderMain:function(callback,context){return new ajax_request(this.url + '?_method=GetTotalOrderMain&_session=rw','',callback, context);}, GetPrintLogo:function(callback,context){return new ajax_request(this.url + '?_method=GetPrintLogo&_session=rw','',callback, context);}, url:'/ajax/WebSearch.CMS.AjaxMethods.EcommerceHandler,WebSearch.CMS.AjaxMethods.ashx' } function HtmlControl(id) { var ele = null; if(typeof(id) == 'object') ele = id; else ele = document.getElementById(id); if(ele == null) return null; var _o = ele.cloneNode(true); var _op = document.createElement('SPAN'); _op.appendChild(_o); this._source = _op.innerHTML; } HtmlControl.prototype.toString = function(){ return this._source; } function HtmlControlUpdate(func, parentId) { var f,i,ff,fa=''; var ele = document.getElementById(parentId); if(ele == null) return; var args = []; for(i=0; i 2) for(i=2; i9999||year<1970||month<1||month>12||day<0||day>31||hours<0||hours>23||minutes<0||minutes>59||seconds<0||seconds>59)throw("ArgumentException");this.Year = year;this.Month = month;this.Day = day;this.Hours = hours;this.Minutes = minutes;this.Seconds = seconds;} DateTime.prototype.toString = function(){return digi(this.Year,4) + digi(this.Month,2) + digi(this.Day,2) + digi(this.Hours,2) + digi(this.Minutes,2) + digi(this.Seconds,2);} function TimeSpan(){this.Days=0;this.Hours=0;this.Minutes=0;this.Seconds=0;this.Milliseconds=0;} TimeSpan.prototype.toString = function(){return this.Days+'.'+this.Hours+':'+this.Minutes+':'+this.Seconds+'.'+this.Milliseconds;}