usingNamespace("Biz.Store")["PagenationControlPanelHelper"]={getCurrentPageFullPath:function(D,A,C){var B=D.indexOf("?");if(B>0){D=D.substring(0,B)}var E=$QueryString.Set(A,C);return D+E},getParamenterValue:function(G,E){E=E+"=";var F=G.split("&");var B="";var C=0;for(var D=0;D<F.length;D++){B=F[D];C=B.indexOf(E);if(C!=-1){var A=B.split("=");return A[1]}}return""},changedSortField:function(E){var B=$(E);var A=B.val();var C=parseInt(A);if(C<=0){return}var F=Biz.Store.PagenationControlPanelHelper.getCurrentListStyle();var D=window.location.href;D=Biz.Store.PagenationControlPanelHelper.getCurrentPageFullPath(D,"listStyle",F);D=Biz.Store.PagenationControlPanelHelper.getCurrentPageFullPath(D,"sort",A);window.location.href=D},getCurrentListStyle:function(){var A="";$("li[@class=showRow]").find("span[@class=current]").each(function(B,C){if(typeof(C)!="undefined"){A="Row";return false}});if(A==""){A="Grid"}return A},setListStyleValueToPageUrl:function(A){$("ul[@class=showNo]").find("a").each(function(B,D){if(typeof(D)!="undefined"){var C=$(D).attr("href");C=Biz.Store.PagenationControlPanelHelper.getCurrentPageFullPath(C,"listStyle",A);$(D).attr("href",C)}});$("div[@class=pagePanel]").find("a").each(function(B,D){if(typeof(D)!="undefined"){var C=$(D).attr("href");C=Biz.Store.PagenationControlPanelHelper.getCurrentPageFullPath(C,"listStyle",A);$(D).attr("href",C)}})},switchListStyle:function(D,F,B){$("#productList").removeClass("listShow"+D).addClass("listShow"+F);$(".displayPanel .showStyle .show"+F).html('<span class="current"></span>');var E="Biz.Store.PagenationControlPanelHelper.switchListStyle('"+F+"', '"+D+"', '"+B+"')";var C=D=="Row"?"2":"1";var A=$("<a href=\"javascript:Biz.Common.CoreMetrics.BuildCoreMetricsLink('show"+D+"','"+C+'\');" onclick="'+E+'"></a>');$(".displayPanel .showStyle .show"+D).empty().append(A);Biz.Store.PagenationControlPanelHelper.saveListStyleForPage(F,B)},getListStyleForPage:function(A){return $State.GetValue($State.Name.Product,A)},saveListStyleForPage:function(newC,pageName){var jsonObject=eval("({"+pageName+':"'+newC+'"})');$State.Save($State.Name.Product,jsonObject)}};usingNamespace("Biz.Store")["BrandStore"]={changedCategoryFilter:function(E){var B=$(E);var A=B.val();var C=parseInt(A);if(C<=0){$("#productModuleFilter").empty();$("#productModuleFilter").append("<option value='-1'>"+$Resource.BuildContent("FilterProduct")+"</option>");return}$("#btnFilterSearch").attr("href","javascript:void(0)");var D=window.location.href;D=Biz.Store.PagenationControlPanelHelper.getCurrentPageFullPath(D,"FilterCategory",A);window.location.href=D},gotoProductDetailInfoPage:function(){var B=$("#productModuleFilter").val();var A=true;if(B=="-1"){A=false}if(A){window.location.href=B}}};usingNamespace("Biz.Store")["CountDown"]={StartCountDown:function(){$(".CountDown_LeftTime").each(function(){var A=$(this).attr("leftTime");if(A<=0){$(this).text("Time Over")}else{$(this).countdown({until:A,format:"HMS",compact:true,onExpiry:function(){$(this).text("Time Over")}})}})}};
