APE.namespace("APE.dom");(function(){APE.mixin(APE.dom,{findAncestorWithTagName:b});var a=/^H/.test(document.documentElement.tagName);function b(f,d,c){d=(a?d.toUpperCase():d.toLowerCase());for(var e=f.parentNode;e&&e!=c;){if(e.tagName===d){return e}e=e.parentNode}return null}})();function RadioGroup(a){this.id=a;this.init()}RadioGroup.getById=APE.getById;RadioGroup.prototype={init:function(){var a=document.getElementById(this.id+"Reset");if(a){APE.dom.Event.addCallback(a,"click",RadioGroup.resetClickHandler)}},value:"",reset:function(){if(this.value){APE.dom.removeClass(document.getElementById(this.value),"radioGroupSelected");this.value="";if(typeof this.onchange=="function"){this.onchange()}}},processClick:function(a){var b,f=APE.dom,e=f.Event.getTarget(a),c=this.value;if(!/li/i.test(e.tagName)){e=f.findAncestorWithTagName(e,"LI",document.getElementById(this.id));if(!e){return}}if(f.hasToken(e.className,"disabledRadio")){return}b=e.id;if(!b){return}if(b===this.value){f.removeClass(e,"radioGroupSelected");this.value="";if(typeof this.onchange=="function"){this.onchange()}return}this.value=b;if(typeof this.onchange=="function"){this.onchange()}if(c){f.removeClass(document.getElementById(c),"radioGroupSelected")}f.addClass(e,"radioGroupSelected")},disableElement:function(a){APE.dom.addClass(a,"disabledRadio")},enableElement:function(a){APE.dom.removeClass(a,"disabledRadio")}};RadioGroup.resetClickHandler=function(){RadioGroup.getById(this.id.replace(/Reset$/,"")).reset()};APE.EventPublisher=function(b,a){this.src=b;this._callStack=[];this.type=a};APE.EventPublisher.prototype={add:function(b,a){this._callStack.push([b,a||this.src]);return this},addBefore:function(b,a){return APE.EventPublisher.add(this,"beforeFire",b,a)},addAfter:function(b,a){return APE.EventPublisher.add(this,"afterFire",b,a)},getEvent:function(a){return APE.EventPublisher.get(this,a)},remove:function(c,b){var f=this._callStack,d=0,a,e;if(!b){b=this.src}for(;d<f.length;d++){e=f[d];if(e[0]===c&&e[1]===b){return f.splice(d,1)}}return null},removeBefore:function(b,a){return this.getEvent("beforeFire").remove(b,a)},removeAfter:function(b,a){return this.getEvent("afterFire").remove(b,a)},fire:function(a){return APE.EventPublisher.fire(this)(a)},toString:function(){return"APE.EventPublisher: {src="+this.src+", type="+this.type+", length="+this._callStack.length+"}"}};APE.EventPublisher.add=function(d,c,b,a){return APE.EventPublisher.get(d,c).add(b,a)};APE.EventPublisher.fire=function(b){return a;function a(m){var d=false,g=0,h=b._callStack,c;if(typeof b.beforeFire=="function"){try{if(b.beforeFire(m)==false){d=true}}catch(f){APE.deferError(f)}}for(;g<h.length;g++){c=h[g];try{if(c[0].call(c[1],m)==false){d=true}}catch(f){APE.deferError(f)}}if(typeof b.afterFire=="function"){if(b.afterFire(m)==false){d=true}}return !d}};APE.EventPublisher.get=function(f,e){var d=this.Registry.hasOwnProperty(e)&&this.Registry[e]||(this.Registry[e]=[]),b=0,a=d.length,c;for(;b<a;b++){if(d[b].src===f){return d[b]}}c=new APE.EventPublisher(f,e);if(f[e]){c.add(f[e],f)}f[e]=this.fire(c);d[d.length]=c;return c};APE.EventPublisher.Registry={};APE.EventPublisher.cleanUp=function(){var c,e,d,b,a;for(c in this.Registry){e=this.Registry[c];for(b=0,a=e.length;b<a;b++){d=e[b];d.src[d.type]=null}}};if(window.CollectGarbage){APE.EventPublisher.get(window,"onunload").addAfter(APE.EventPublisher.cleanUp,APE.EventPublisher)}APE.namespace("shopping.widget");(function(){OfferTableResults.getById=APE.getById;shopping.widget.OfferTableResults=OfferTableResults;OfferTableResults.prototype.onupdate=function(){};function OfferTableResults(id,storeClassName){this.id=id;this.storeClassName=storeClassName;this.applyFilters=function(filterList){var i,j,k,len,jLen,kLen,dom=APE.dom,rows,row,store,checkStore,isSelectStar=/^\*+$/.test(filterList),isFilterListEmpty=!isSelectStar&&filterList.join("")==="",isMatchInRow,rowCount,storeCount={length:0},storeItems;if(typeof this.onfilterbegin=="function"){this.onfilterbegin(filterList)}if(!this.stores){this.stores=dom.getElementsByClassName(document.getElementById(this.id),"",this.storeClassName)}for(i=0,len=this.stores.length;i<len;i++){store=this.stores[i];checkStore=store.getAttribute("id");if(checkStore.match("Target")!="Target"){storeItems=document.getElementById(store.id+"Items");rows=storeItems.getElementsByTagName("tr");rowCount=0;for(j=0,jLen=rows.length;j<jLen;j++){row=rows[j];isMatchInRow=isFilterListEmpty||isSelectStar;var filterMatch;if(!isMatchInRow){isMatchInRow=true;if(!isSelectStar){for(k=0,kLen=filterList.length;k<kLen;k++){if(filterList[k]){filterMatch=dom.getElementsByClassName(row,"",filterList[k]);if(filterMatch.length==0){isMatchInRow=false;break}}}}}if(isMatchInRow){rowCount++}if(typeof this.onrowfilter=="function"){this.onrowfilter({row:row,rowIndex:j,storeId:store.id,isMatchInRow:isMatchInRow})}}if(typeof this.onstorefilter=="function"){this.onstorefilter({storeId:store.id,rowCount:rowCount,isFilterListEmpty:isFilterListEmpty,lowestPrice:undefined})}if(rowCount!==0){if(!storeCount[store.id]){storeCount[store.id]=true;storeCount.length++}}}}if(typeof this.onfiltercomplete=="function"){this.onfiltercomplete({storeCount:storeCount.length})}};this.updateStores=function(stores){try{var storeId=this.id,storeElId,storeData,dealData,storeEl,priceEl,taxEl,shippingEl,priceIncl,shippingIncl,deals,dealEl,dom=APE.dom,gEBCN=dom.getElementsByClassName;for(storeId in stores){storeData=stores[storeId];storeElId="shoes-"+storeId;storeEl=document.getElementById(storeElId);if(storeEl){deals=storeData.deals;for(dealId in deals){dealData=deals[dealId];dealRow=document.getElementById(storeElId+"-"+dealId);if(dealRow){priceEl=document.getElementById(storeElId+"price"+dealId);priceEl.firstChild.data=dealData.price;taxEl=$(".tax",dealRow)[0];taxEl.innerHTML=dealData.tax;if(dealData.tax===""){dom.addClass(taxEl,"hi1")}else{dom.removeClass(taxEl,"hi1")}shippingEl=$(".shipping",dealRow)[0];shippingEl.innerHTML=dealData.shipping;priceIncl=$(".price",dealRow)[0];priceIncl.innerHTML=dealData.price;shippingIncl=$(".taxShippingArea",dealRow)[0];shipClass="";var taxEmptyClass="";if(dealData.tax==""){taxEmptyClass="hi1"}if(dealData.shipping=="Free Shipping"){shipClass="freeShip"}var taxShippingHtml="<ul><li class='tax "+taxEmptyClass+"'>"+dealData.tax+"</li>";taxShippingHtml=taxShippingHtml+"<li class='shipping "+shipClass+"'>"+dealData.shipping+"</li></ul>";shippingIncl.innerHTML=taxShippingHtml}}}}this.onupdate()}catch(ex){}};this.updateAttributeFilters=function(attFilters){for(filterId in attFilters){eval(filterId+" = ["+attFilters[filterId]+"];")}}}})();APE.namespace("shopping.widget");(function(){shopping.widget.Panel=m;function m(n){this.id=n;document.getElementById(n).tabIndex=0}m.activeId="";m.getById=APE.getById;var c=APE.dom,f=document.body;c.Event.addCallback(f,"click",e);c.Event.addCallback(f,"mousedown",b);f=null;var d={},g=/Actuator$/;m.prototype={show:function(){if(m.activeId===this.id){this.hide();return}m.activeId=this.id;document.getElementById(this.id).style.display="block";var n=this.id.replace(/Panel$/,"Actuator"),o=document.getElementById(n);if(o){APE.dom.addClass(o,"actuatorActive")}},hide:function(){document.getElementById(this.id).style.display="none";m.activeId="";var n=this.id.replace(/Panel$/,"Actuator"),o=document.getElementById(n);if(typeof this.onhide=="function"){this.onhide()}if(o){APE.dom.removeClass(o,"actuatorActive")}}};function e(o){var n=c.Event.getTarget(o),s=n.id,p=document,r;if(!s||!g.test(s)){return}s=s.replace(g,"Panel");c.Event.preventDefault(o);if(!(s in d)){d[s]=s;r=p.getElementById(s);c.Event.addCallback(r,"mousedown",h);c.Event.addCallback(r,"keydown",a);c.Event.addCallback(n,"keydown",a)}m.getById(s).show()}function a(n){if(n.keyCode===27){m.getById(this.id.replace(g,"Panel")).hide()}}function b(o){var p=c.Event.getTarget(o),n=p&&p.id;if(m.activeId){if(n&&n.replace(g,"Panel")===m.activeId){return}m.getById(m.activeId).hide()}}function h(o){o=o||window.event;if(o.stopPropagation){o.stopPropagation()}o.cancelBubble=true;var p=APE.dom,n=p.Event.getTarget(o);if(p.hasToken(n.className,"panelClose")){m.getById(this.id).hide()}}})();APE.namespace("shopping.widget");(function(){var widget=shopping.widget,Panel=widget.Panel,dom=APE.dom;widget.InfoPop=InfoPop;InfoPop.getById=APE.getById;if(!Panel.instances){Panel.instances={}}InfoPop.instances=Panel.instances;dom.Event.addCallback(document,"mousedown",infoPopMousedown);function infoPopMousedown(ev){var target=dom.Event.getTarget(ev),baseId;if(dom.hasToken(target.className,"infoLink")){baseId=target.id.replace(/(?:Actuator)$/,"");shopping.widget.InfoPop.getById(baseId+"Panel",baseId)}}function InfoPop(panelId,baseId){Panel.call(this,panelId);this.baseId=baseId;this.panelId=panelId}APE.extend(InfoPop,widget.Panel,{show:function(){var actuator=document.getElementById(this.baseId+"Actuator"),action,panelId,sdcId,req,filledTemplate,templateId;if(!actuator){return}action=actuator.href;sdcId=this.baseId.match(/\d+$/);if(!sdcId){return}panelId=this.baseId+"Panel";templateId=this.baseId+sdcId[0]+"Template";filledTemplate=document.getElementById(templateId);if(filledTemplate===null){req=APE.ajax.AsyncRequest.getById(this.baseId,{action:action,panelId:panelId}),req.onsucceed=panelSuccessCallback;req.send()}else{Panel.prototype.show.call(this)}},hide:function(){Panel.prototype.hide.call(this)}});function panelSuccessCallback(){var panelEl=document.getElementById(this.config.panelId),infoPop,infoTemplate,responseText=this.req.responseText,data,emailEl,phoneEl,paymentMethods;if(responseText){data=eval("("+responseText+")");infoTemplate=document.getElementById("infoTemplate").cloneNode(true);infoTemplate.id=this.id+data.sdcId+"Template";populateStoreName(data,infoTemplate);populateAddress(data,infoTemplate,data.addressStreet,data.addressCityState);phoneEl=dom.getElementsByClassName(infoTemplate,"","phone")[0];if(data.phone){phoneEl[dom.textContent]=data.phone}if(data.emailAddress){emailEl=dom.getElementsByClassName(infoTemplate,"","email")[0];emailEl.href="mailto:"+data.emailAddress;emailEl.style.display="inline"}paymentMethods=data.paymentMethods;if(paymentMethods&&paymentMethods){populatePaymentMethods(paymentMethods,infoTemplate)}panelEl.appendChild(infoTemplate)}infoPop=InfoPop.getById(this.config.panelId);Panel.prototype.show.call(infoPop)}function populatePaymentMethods(paymentMethods,infoTemplate){var pmt=dom.getElementsByClassName(infoTemplate,"","pmt"),pmtRow,pmt0,ul,ul2,head,liBuffer,pMethod,liStart="<li",liEnd="</li>",classAttr=" class='markChecked'>",gt=">",join=liEnd+liStart;if(typeof paymentMethods=="string"){pmt0=pmt[0];pmt0.colspan="2";pmtRow=pmt0.parentNode;pmt0[dom.textContent]=paymentMethods;pmtRow.deleteCell(2);pmt0.className="infoNotAvailable";pmt[1].style.display="none"}else{if(typeof paymentMethods=="object"){liBuffer=[];for(pMethod in paymentMethods){liBuffer[liBuffer.length]=(paymentMethods[pMethod]?classAttr:gt)+pMethod}ul=document.createElement("ul");ul2=ul.cloneNode(false);head=liBuffer.splice(0,Math.ceil(liBuffer.length/2));ul.innerHTML=liStart+head.join(join)+liEnd;ul2.innerHTML=liStart+liBuffer.join(join)+liEnd;pmt[0].appendChild(ul);pmt[1].appendChild(ul2)}}}function populateStoreName(data,infoTemplate){var storeNameEl=infoTemplate.getElementsByTagName("th")[0];if(data.merchantName){storeNameEl[dom.textContent]=data.merchantName}else{if(data.logo){storeNameEl.firstChild.src=data.logo}}}function populateAddress(data,infoTemplate,addressStreet,addressCityState){var addressEl=infoTemplate.getElementsByTagName("address")[0],addressCityStateEl;if(addressStreet||addressCityState){if(addressStreet){addressEl.firstChild.data=data.addressStreet}if(data.addressCityState){addressCityStateEl=dom.getElementsByClassName(addressEl,"","cityState")[0];addressCityStateEl[dom.textContent]=addressCityState}}else{addressEl.className="infoNotAvailable"}}})();APE.namespace("APE.ajax");(function(){APE.ajax.AsyncRequest=f;f.getById=APE.getById;function f(o,m){this.id=o;this.httpMethod=m.method&&m.method.toLowerCase()||"get";this.uri=m.action;if(!this.uri){throw URIError("formConfig.action = undefined")}this.enctype=m.enctype;if(!this.enctype&&this.httpMethod=="post"){this.enctype="application/x-www-form-urlencoded"}this.req=a();this.config={};for(var n in m){if(!(n in this.config)){this.config[n]=m[n]}}}var e="XMLHttpRequest",b="ActiveXObject",h=(e in window)?e:b,d=e==h,c=[];function a(){var n,o,m;for(o=0;o<4;o++){n=c[o];if(!n){return c[o]=p()}else{m=n.readyState;if(m==4){n.abort()}if(m==0){return n}}}return p();function p(){return d?new window[h]:new window[h]("Microsoft.XMLHTTP")}}function g(m){window.clearInterval(m)}f.prototype={onabort:function(){},oncomplete:function(){},onsucceed:function(){},onfail:function(){},ontimeout:function(){},onsend:function(){},timeoutMillis:0,send:function(o,p){var n=this.uri;this.timeoutMillis=p|0||4000;this._setUpReadyStateChangeHandler();if(this.httpMethod=="get"&&typeof o=="string"){n+=o}this.req.open(this.httpMethod,n,true);if("setRequestHeader" in this.req){this.req.setRequestHeader("X-REQUESTED-WITH","XMLHttpRequest");if(this.httpMethod=="post"){if(typeof o=="string"){this.req.setRequestHeader("Content-Type",this.enctype)}else{if(o&&typeof o.unshift=="function"&&this.enctype=="multipart/form-data"){var r="---------------------------DATA_"+(new Date-0)+"\n";o=r+o.join(r)+r;this.req.setRequestHeader("Content-Type",this.enctype+"; "+r)}}}}try{this.onsend();this.req.send(o||null);return this}catch(m){return this}},abort:function(){this.req.abort();g(this._pollId);window.clearInterval(this.timeoutID);this.onabort(this.req);this._oncomplete(false)},_oncomplete:function(m){this.oncomplete({successful:m})},toString:function(){var n="ajax.AsyncRequest: \nuri: "+this.uri+"\nhttpMethod: "+this.httpMethod+"\n----------------------\nreq: \n",o;for(o in this.req){try{if(typeof this.req[o]=="string"){n.concat(o+": "+this.req[o]+"\n")}}catch(m){}}return n},_setUpReadyStateChangeHandler:function(){var o=this;this._pollId=window.setInterval(m,50);if(this.timeoutMillis>0){var n=function(){o.ontimeout();o.req.abort();o._oncomplete()};this.timeoutID=setTimeout(n,this.timeoutMillis)}function m(){if(o.req.readyState==4){p()}}function p(){g(o._pollId);var r=o.req.status,s=r>=200&&r<300||r==304||r==1223;if(s){o._oncomplete(true);o.onsucceed(o.req)}else{o._oncomplete(false);o.onfail(o.req)}window.clearInterval(o.timeoutID)}}}})();var JsonObjData="";(function(){var d=APE.dom,addCallback=d.Event.addCallback,srtInstance,filterColor="filterColor",filterSize="filterSize",browser=navigator.appName;srtId="shoeResultsTable",srt=document.getElementById(srtId);if(!srt){return}srtInstance=shopping.widget.OfferTableResults.getById(srtId,"shoeStore");srtInstance.onrowfilter=srtRowFiltered;srtInstance.onstorefilter=srtFiltered;srtInstance.onfiltercomplete=filterCompleteHander;addCallback(srt,"click",shoeResultsTableClicked);srt=null;$("#newDoPopUp .panelClose").click(function(i){$("#newDoPopUp .dealQlDesc").empty();$("#newDoPopUp .qlImgLink img").attr("src","");$("#newDoPopUp .taxShippingArea").empty();$("#newDoPopUp").hide()});$(document).click(function(e){if($(e.target).parents("#newDoPopUp").length===0){$("#newDoPopUp .dealQlDesc").empty();$("#newDoPopUp .qlImgLink img").attr("src","");$("#newDoPopUp .taxShippingArea").empty();$("#newDoPopUp").hide()}if($(e.target).parents(".ovImgArea").length===1||$(e.target).parents("h3.dealName").length===1){$("#newDoPopUp .dealQlDesc").empty();$("#newDoPopUp .qlImgLink img").attr("src","");if($(e.target).is("a")){$parent=$(e.target).parents("td").prev("td.firstCell").children(".ovImgArea").children("a")}else{$parent=$(e.target).parents("a")}elId=$parent.attr("id");newElId=elId.replace("dc","do");elId=elId.replace("dc","");$elId_position=$parent.position();topPos=$elId_position.top;topPos=topPos+60+"px";leftPos="192px";$("#newDoPopUp").css({display:"block",position:"absolute",zIndex:5000,top:topPos});$dealLink=$parent.parents("td").nextAll("td.lastCell").find("a").attr("href");if($dealLink.match("CT=105")=="CT=105"){$dealLink_img=$dealLink.replace("CT=105","CT=104");$dealLink_vs=$dealLink.replace("CT=105","CT=104")}else{if($dealLink.match("CT=103")=="CT=103"){$dealLink_img=$dealLink.replace("CT=103","CT=104");$dealLink_vs=$dealLink.replace("CT=103","CT=104")}}$price=$parent.parents("td").nextAll("td.dealPrice").find("div.vMid span.price").html();$storeName=$("#"+newElId+" span.storeName").html();$imgAlt=$parent.find("img").attr("alt");$imgSrc=$parent.find("img").attr("src");$imgSrc=$imgSrc.replace("50x50","250x250");$shortDesc=$("#"+newElId+" div#short"+elId).clone();$longDesc=$("#"+newElId+" div#long"+elId).clone();shortDescId=$shortDesc.attr("id");shortDescId=shortDescId+"-a";$shortDesc.attr("id",shortDescId);$shortDesc.find("a").click(function(){swap("long"+elId+"-a","short"+elId+"-a")});longDescId=$longDesc.attr("id");longDescId=longDescId+"-a";$longDesc.attr("id",longDescId);$longDesc.find("a").click(function(){swap("short"+elId+"-a","long"+elId+"-a")});var taxShip="";var taxDesc="";var shipDesc="";$parent.parents("td").nextAll("td.dealPrice").find("ul li").each(function(i){if($(this).hasClass("tax")){taxDesc=$(this).html()}if($(this).hasClass("shipping")){if($(this).hasClass("freeShip")){shipDesc='<span class="freeShip">'+$(this).html()+"</span>"}else{shipDesc="<span>"+$(this).html()+"</span>"}}});if(taxDesc==""||shipDesc==""){var taxInfo=$parent.parents("td").nextAll("td.dealPrice").find(".taxShippingArea").html()}if(taxDesc!=""){taxShip=taxDesc}else{if(shipDesc!=""){taxShip=shipDesc}else{taxShip=taxInfo}}$("#newDoPopUp a.qlImgLink").attr("href",$dealLink_img);$("#newDoPopUp a.qlImgLink").find("img").attr("src",$imgSrc);$("#newDoPopUp a.qlImgLink").find("img").attr("alt",$imgAlt);$("#newDoPopUp a.qlImgLink").find("img").attr("title",$imgAlt);$("#newDoPopUp .dealQlTtl").html($imgAlt);$shortDesc.appendTo("#newDoPopUp .dealQlDesc");$longDesc.appendTo("#newDoPopUp .dealQlDesc");$("#newDoPopUp .dealStoreName a").attr("href",$dealLink_img);$("#newDoPopUp .dealStoreName a").html($storeName);$("#newDoPopUp .price").html($price);$("#newDoPopUp .taxShippingArea").html(taxShip);$("#newDoPopUp .dealQlColR a.storeVisitLink").attr("href",$dealLink_vs);$("#newDoPopUp").show();e.stopPropagation()}});function buildSortList(filters,noFilters,zipLowestPrice){var storeString="";var filterCount="0";for(i=0;i<filters.length;i++){if(filters[i].length>"1"&&filterCount<"1"){storeString=filters[i]}else{if(filters[i].length>"1"&&filterCount=="1"){if(storeString.length>"1"){storeString=storeString+"_"+filters[i]}else{storeString=filters[i]}}}filterCount++}if(filters==""||filters==","){storeString="sort_no_filter"}function setPrice(resetPrice){var newTbodys=document.getElementById("shoeResultsTable").getElementsByTagName("tbody");var storeInfo=document.getElementById("pr").getElementsByTagName("span")[2].innerHTML;var fromTxt=document.getElementById("glbFromTxt").innerHTML;var priceSet=false;for(i=0;i<newTbodys.length;i++){if(priceSet==false){if(resetPrice){if(i==1){firstRow=newTbodys[i].getElementsByTagName("tr")[0].getElementsByTagName("td")[4];priceValue=firstRow.getElementsByTagName("span")[0].innerHTML;document.getElementById("pr").innerHTML='<span class="numStores" id="glbFromTxt">'+fromTxt+'</span> <span class="priceTxt">'+priceValue+'</span> &nbsp;&nbsp; <span class="numStores">'+storeInfo+"</span>"}}else{checkStyle=newTbodys[i].getAttribute("style");if(checkStyle!="display: none;"||checkStyle==null){checkId=newTbodys[i].getAttribute("id");if(checkId!=null){if(checkId.match("mTarget")=="mTarget"){checkRows=newTbodys[i].getElementsByTagName("tr");for(j=0;j<checkRows.length;j++){rowCheck=checkRows[j].className;if(rowCheck.match("rowExcluded")!="rowExcluded"&&priceSet==false){priceValue=checkRows[j].getElementsByTagName("td")[4];priceValue=priceValue.getElementsByTagName("span")[0].innerHTML;document.getElementById("pr").innerHTML='<span class="numStores" id="glbFromTxt">'+fromTxt+'</span> <span class="priceTxt">'+priceValue+'</span> &nbsp;&nbsp; <span class="numStores">'+storeInfo+"</span>";priceSet=true}}}}}}}}}if(storeString.length>"1"){noSortFlag=false;if(storeString=="sort_no_filter"){if(noFilters!=""){newStoreString=noFilters}else{hiddenStoreIDs=document.getElementById("sort_no_filter").value;if(hiddenStoreIDs!=null||hiddenStoreIDs!=""){newStoreString=hiddenStoreIDs.split(",")}}newPriceString=zipLowestPrice;noSortFlag=true}else{var storeVarIds=document.getElementById("storeVarIds").innerHTML;var stringFilters=storeVarIds.split(";");var searchStore="";var newStoreString="";var newPriceString="";for(j=0;j<stringFilters.length;j++){if(storeString.length<"10"){tempString=stringFilters[j].replace("var","");searchStore=tempString.search(storeString);if(searchStore!="-1"){searchStore=tempString.search("_");if(searchStore=="-1"){newStoreString=stringFilters[j]+";"}else{searchStore=tempString.search("_s");if(searchStore=="-1"){searchStore=tempString.search("_p");if(searchStore!="-1"){newPriceString=stringFilters[j]+";"}}}}tempString=""}else{if(storeString.length>"9"){tempString=stringFilters[j].replace("var","");searchStore=tempString.search(storeString);if(searchStore!="-1"){searchStore=tempString.search("_p");if(searchStore=="-1"){newStoreString=stringFilters[j]+";"}else{if(searchStore!="-1"){newPriceString=stringFilters[j]+";"}}}tempString=""}}}newStoreString=newStoreString.replace("var ","");newStoreString=eval(newStoreString);newPriceString=newPriceString.replace("var ","");newPriceString=eval(newPriceString);var checkZipField=document.getElementById("textZipped").innerHTML;if(checkZipField.match("Price")=="Price"){if(JsonObjData!=null&&JsonObjData!=""){if(filters!=null&&filters.length>0&&storeString!="sort_no_filter"){var useJsonObjData="JsonObjData."+storeString;useJsonObjData=eval(useJsonObjData);newStoreString=useJsonObjData;newPriceString=zipLowestPrice}}}}reSortMe(newStoreString,noSortFlag,newPriceString);setPrice(false);window.setTimeout(updateLowestPrice,100);if(!noSortFlag){reSortCarousel()}if((filters==""||filters==",")&&noFilters==""){var checkZipField=document.getElementById("textZipped").innerHTML;if(checkZipField.match("Price")!="Price"){clearDom()}else{clearCarousel();var clearFilters=document.getElementById("clearFilters");if(clearFilters){clearFilters.style.display="none"}}}var sizeFilter=false;$("ul#filterSize li").each(function(){if($(this).is(".radioGroupSelected")){sizeFilter=true}});if(!sizeFilter){$("ul.offerSizes li").each(function(){$(this).removeClass("selected")})}}else{clearDom();setPrice(true)}function reSortMe(storeArray,noSortFlag,priceArray){var clearTbdyItems=$("#shoeResultsTable > tbody").each(function(){$(this).css("display","none");$(this).css("visibility","hidden");testTbId=$(this).attr("id");testTbId=testTbId.search("Target");if(testTbId!="-1"){$(this).remove()}});if(noSortFlag==false){var podCarousel=document.getElementById("podealCarousel").getElementsByTagName("LI");for(j=0;j<podCarousel.length;j++){d.addClass(podCarousel[j],"hiddenElement");d.removeClass(podCarousel[j],"visibleElement2");d.removeClass(podCarousel[j],"curPOImg")}}var priceVal="";for(q=0;q<storeArray.length;q++){tbodyContent(storeArray[q],priceArray,sizeFilter)}}function tbodyContent(sourceId,priceVal){var shoeResultsTable=document.getElementById("shoeResultsTable");var newTbdyM=document.createElement("tbody");var newRow="";var firstCell="";newTbdyM.setAttribute("id","shoes-"+sourceId+"-Target");newTbdyM.setAttribute("class","shoeStore");tbM=document.getElementById("shoes-"+sourceId).getElementsByTagName("tr");for(i=0;i<tbM.length;i++){newRow=tbM[i].cloneNode(true);newTbdyM.appendChild(newRow);newTbdyM.getElementsByTagName("td")[0].style.paddingBottom="5px";newTbdyM.getElementsByTagName("td")[0].style.backgroundColor="#F0F0F0";newTbdyM.getElementsByTagName("td")[0].style.paddingLeft="6px";newTbdyM.getElementsByTagName("td")[0].style.borderBottom="1px solid #CCC";newTbdyM.getElementsByTagName("td")[0].getElementsByTagName("div")[0].style.paddingBottom="0"}shoeResultsTable.appendChild(newTbdyM);var newTbdy=document.createElement("tbody");var fixNewRow="";newTbdy.setAttribute("id","shoes-"+sourceId+"-mTarget");newTbdy.setAttribute("class","storeAvailability");tbItems=document.getElementById("shoes-"+sourceId+"Items").getElementsByTagName("tr");var firstDivId="";var tdCell="";var openLink="";var priceCompare=false;for(i=0;i<tbItems.length;i++){newRow=tbItems[i].cloneNode(true);newTbdy.appendChild(newRow);tdCell=newRow.getElementsByTagName("td")[1];tdCell.style.paddingTop="5px";newRow.getElementsByTagName("td")[3].innerHTML="&nbsp;";newRowClassName=newRow.className;if(newRowClassName.match("rowExcluded")=="rowExcluded"){d.addClass(newRow,"hiddenElement")}else{fixNewRow=newTbdy.getElementsByTagName("td");for(k=0;k<fixNewRow.length;k++){if(fixNewRow[k].className!="noborder"){fixNewRow[k].style.borderBottom="1px #CCC solid"}}newRow.getElementsByTagName("td")[0].style.border="none";newRow.getElementsByTagName("td")[6].style.border="none"}}fixBorderCells=newTbdy.getElementsByTagName("tr");for(l=0;l<fixBorderCells.length;l++){noBorderClass=fixBorderCells[l].className;if(noBorderClass.match("hiddenElement")!="hiddenElement"||noBorderClass.match("rowExcluded")!="rowExcluded"){styleRow=fixBorderCells[l];if(newRowClassName.match("lastRow")=="lastRow"){styleRow=fixBorderCells[l]}}}styleRow.getElementsByTagName("td")[0].style.borderBottom="1px solid #CCC";styleRow.getElementsByTagName("td")[6].style.borderBottom="1px solid #CCC";d.addClass(styleRow.getElementsByTagName("td")[6],"noBorder2");shoeResultsTable.appendChild(newTbdy);return tbodyContent}function reSortCarousel(){$clearList=$("#podealCarousel li").each(function(i){if($(this).hasClass("newSort")==true){$(this).remove()}});imgIdArray=new Array();$newDomObjs=$("#shoeResultsTable > tbody").each(function(){var $tbodyId=$(this).attr("id");if($tbodyId.match("mTarget")=="mTarget"){$("#"+$tbodyId+" > tr").filter(function(){if(!$(this).hasClass("rowExcluded")){var $imgId=$(this).find(".ovImgArea img").attr("id");imgIdArray.push($imgId)}})}});var pointerSet=false;$carouselList=$("#podealCarousel li").each(function(i){if($(this).attr("id")!="curPOImg"){li_ImgId=$(this).find("img").attr("id");li_ImgId=li_ImgId.replace("sm-","");for(i=0;i<imgIdArray.length;i++){matchImgId=imgIdArray[i].replace("do-","");if(matchImgId==li_ImgId){$imgTag=$(this).find("img");$newImgTag=$imgTag.clone();if(!pointerSet){pointerSet=true;$newLiTag=$newImgTag.appendTo('<li class="newSort curPOImg"></li>').parent().appendTo("ul#podealCarousel").end();$newLiTag.addClass("curPOImg");$mainProdImage=$("#mainOfferShoe");$podLiImgAlt=$mainProdImage.attr("alt");$podLiImgtitle=$mainProdImage.attr("title");$podLiImgSrc=$newImgTag.attr("src");$podLiImgSrc=$podLiImgSrc.replace("40x40","300x300");$mainProdImage.attr("src",$podLiImgSrc);$mainProdImage.attr("alt",$podLiImgAlt);$mainProdImage.attr("title",$podLiImgtitle);$mainProdImage.attr("id","mainOfferShoe");d.addClass($mainProdImage,"customImageSizeForShoes")}else{$newLiTag=$newImgTag.appendTo('<li class="newSort"></li>').parent().appendTo("ul#podealCarousel").end()}}}}else{$(this).removeClass("curPOImg")}});itemCount=0;$carouselList=$("#podealCarousel li").each(function(i){if($(this).hasClass("newSort")==true){itemCount++}});if(itemCount<6){$("#podealCarouselPrev").addClass("carouselButton-disabled");$("#podealCarouselNext").addClass("carouselButton-disabled")}else{$("#podealCarouselPrev").removeClass("carouselButton-disabled");$("#podealCarouselNext").removeClass("carouselButton-disabled")}document.getElementById("podealCarousel").removeAttribute("style")}function clearCarousel(){var myPodCarousel=$("#podealCarousel li").each(function(j){if(j==0){$(this).removeClass("hiddenElement");$(this).addClass("curPOImg");$firstLiImg=$(this).find("img");$firstLiImgAlt=$firstLiImg.attr("alt");$firstLiImgTitle=$firstLiImg.attr("title");$firstLiImgSrc=$firstLiImg.attr("src");$firstLiImgSrc=$firstLiImgSrc.replace("40x40","300x300");$mainProdImg=$("#mainOfferShoe");$mainProdImg.attr("alt",$firstLiImgAlt);$mainProdImg.attr("title",$firstLiImgTitle);$mainProdImg.attr("src",$firstLiImgSrc)}if(j>0){$(this).removeClass("hiddenElement");$(this).removeClass("curPOImg");if($(this).hasClass("newSort")==true){$(this).remove()}$(this).addClass("visibleElement2")}});$("#podealCarouselNext").removeClass("carouselButton-disabled")}function clearDom(){clearCarousel();$("#shoeResultsTable > tbody").each(function(){$(this).css("display","");$(this).css("visibility","visible");testTbId=$(this).attr("id");resetTbId=testTbId.search("Items");testTbId=testTbId.search("Target");if(testTbId!="-1"){$(this).remove()}});var clearFilters=document.getElementById("clearFilters");if(clearFilters){clearFilters.style.display="none"}$("ul.offerSizes li").each(function(){$(this).removeClass("selected")})}}function shoeResultsTableClicked(ev){var target=d.Event.getTarget(ev),className=target.className,storeTbodyId,headerExp;if("unselectable" in target&&d.hasToken(className,"scriptLink")){target.unselectable="on"}if(d.hasToken(className,"descToggle")){toggleMoreInfo(target,this)}else{if(d.hasToken(className,"infoLink")){return}else{if(!d.hasToken(className,"storeName")){target=d.findAncestorWithClass(target,"storeName",this)}if(!target){return}headerExp=/Header$/;if(headerExp.test(target.id)){storeTbodyId=target.id.replace(headerExp,"");if(storeTbodyId){}}}}}(function initializeFilters(){var fColor=document.getElementById(filterColor),fSize=document.getElementById(filterSize),unselectable="unselectable",clearFilters=document.getElementById("clearFilters");if(fColor){addCallback(fColor,"click",handleRadioGroupClick);if(unselectable in fColor){fColor[unselectable]="on"}}if(fSize){addCallback(fSize,"click",handleRadioGroupClick);if(unselectable in fSize){fSize[unselectable]="on"}}if(clearFilters){addCallback(clearFilters,"click",clearAllFilters)}})();function handleRadioGroupClick(event){var rg=RadioGroup.getById(this.id);if(!rg.hasOwnProperty("onchange")){rg.onchange=radioChangeHandler}rg.processClick(event);var sizeFilter="";$("ul#filterSize li").each(function(){if($(this).is(".radioGroupSelected")){sizeFilter=$(this).attr("id").replace("Filter","")}});if(sizeFilter){$("#shoeResultsTable > tbody").each(function(){$tbodyId=$(this).attr("id");if($tbodyId.match("mTarget")=="mTarget"){$("#"+$tbodyId+" > tr").filter(function(){if(!$(this).hasClass("rowExcluded")){$(this).find("ul.offerSizes li").each(function(){if($(this).hasClass(sizeFilter)){$(this).addClass("selected")}else{$(this).removeClass("selected")}})}})}})}}function clearAllFilters(){var rg=RadioGroup.getById(filterColor);if(rg){rg.reset()}rg=RadioGroup.getById(filterSize);if(rg){rg.reset()}var clearFilters=document.getElementById("clearFilters");if(clearFilters){clearFilters.style.display="none"}}var miniOfferTable;function radioChangeHandler(){filterRadioGroup(this);applyFilter()}function applyFilter(){var filters=[];if(document.getElementById(filterColor)){filters.push(RadioGroup.getById(filterColor).value.replace(/Filter$/,""))}if(document.getElementById(filterSize)){filters.push(RadioGroup.getById(filterSize).value.replace(/Filter$/,""))}if(!srtInstance.hasOwnProperty("onfilterbegin")){srtInstance.onfilterbegin=srtFilterBegin}if(allStoresOpen&&filters.join("")===""){filters="*"}srtInstance.applyFilters(filters);var clearFilters=document.getElementById("clearFilters");if(clearFilters){clearFilters.style.display="inline"}noFilters="";buildSortList(filters,noFilters)}function srtFilterBegin(){}function filterRadioGroup(radioGroup){if(!radioGroup||typeof pageData=="undefined"||!("colorSizeMap" in pageData)){return}var filterColor="filterColor",filterSize="filterSize",values,idExp=/[\d]{8}/g,value=radioGroup.value.match(idExp),map,i,len,item,itemId,items,theOtherId,theOtherEl,theOtherRadioGroup,disabledCount=0,seeStoreEl;if(radioGroup.id===filterColor){theOtherId=filterSize;map=pageData.colorSizeMap}else{theOtherId=filterColor;map=pageData.sizeColorMap}theOtherEl=document.getElementById(theOtherId);if(!theOtherEl||!map){return}theOtherRadioGroup=RadioGroup.getById(theOtherId);items=theOtherEl.getElementsByTagName("li");if(!value){for(i=0,len=items.length;i<len;i++){theOtherRadioGroup.enableElement(items[i])}}else{values=map[value];for(i=0,len=items.length;i<len;i++){item=items[i];itemId=item.id.match(idExp);if(!itemId){continue}itemId=itemId[0];if(values.indexOf(itemId)!==-1){theOtherRadioGroup.enableElement(item)}else{theOtherRadioGroup.disableElement(item);disabledCount++}}}seeStoreEl=document.getElementById(theOtherId+"SeeStore");if(seeStoreEl){if(disabledCount===len){theOtherEl.style.display="none";seeStoreEl.className=""}else{theOtherEl.style.display="";seeStoreEl.className="seeStoreNot"}}}var lowestRfe;function srtRowFiltered(rfe){var priceEl,v;if(rfe.isMatchInRow){d.removeClass(rfe.row,"rowExcluded");priceEl=document.getElementById(rfe.storeId+"Pricerank"+(rfe.rowIndex));if(!priceEl){return}v=+priceEl.value;if(!lowestRfe||v<lowestRfe.value){lowestRfe=rfe;lowestRfe.value=v}}else{d.addClass(rfe.row,"rowExcluded")}}function srtFiltered(fe){var storeCountEl=document.getElementById(fe.storeId+"count");storeCountEl.firstChild.data=fe.rowCount;var m=d.removeClass;if(fe.isFilterListEmpty){}else{if(fe.rowCount>0){}else{m=d.addClass}}m(document.getElementById(fe.storeId),"storeNoResult")}function filterCompleteHander(fce){var availableAt;setTimeout(hideSpinner,500);document.getElementById("availableAtCount").firstChild.data=String(fce.storeCount);productStore=document.getElementById("pr");availableAt=document.getElementById("availableAt");if(productStore){storeTxt=productStore.getElementsByTagName("span")[2];if(fce.storeCount===1){storeVar=glbStoreSingular}else{storeVar=glbStoresPlural}storeTxt.innerHTML=fce.storeCount+" "+storeVar}if(availableAt){(fce.storeCount===1?d.removeClass:d.addClass)(availableAt,"pluralClass")}if(lowestRfe){var row=lowestRfe.row,storeId=lowestRfe.storeId,priceId=storeId+"price"+(lowestRfe.rowIndex),header,gEBCN=d.getElementsByClassName,storeVisitLink=gEBCN(row,"","storeVisitLink")[0],store=document.getElementById(storeId),storeImage=gEBCN(store,"","storeImage")[0],storeColors=gEBCN(row,"","offerColors")[0],storeSizes=gEBCN(row,"","offerSizes")[0],storeExtraInfo=gEBCN(store,"","taxShippingArea")[0],priceEl=document.getElementById(priceId);if(!storeImage){header=document.getElementById(storeId+"Header")}}lowestRfe=null}function hideSpinner(){}function updateVisitStoreLink(href){var link=document.getElementById(this.id);link.setAttribute("href",href)}function updateStoreNameLogo(href,ihtml){var link=document.getElementById(this.id);link.setAttribute("href",href);link.innerHTML=ihtml}function updateText(text){var textNode=document.getElementById(this.id).firstChild;if(textNode){textNode.data=text}}var seeAllToggle=document.getElementById("seeAllToggle");if(seeAllToggle){addCallback(seeAllToggle,"click",toggleShowAllOverride);seeAllToggle=null}var allStoresOpen=false;function toggleShowAllOverride(){if(!allStoresOpen){openAllStores();d.removeClass(this,"seeAllToggleShow")}else{closeAllStores();d.addClass(this,"seeAllToggleShow")}allStoresOpen=!allStoresOpen}seeAllToggle=null;function openAllStores(){clearAllFilters();srtInstance.applyFilters("*")}function closeAllStores(){clearAllFilters();srtInstance.applyFilters([""])}function toggleMoreInfo(target,srt){var fullDescription,de="descriptionExpanded";fullDescription=d.findAncestorWithTagName(target,"td",srt);if(d.hasToken(fullDescription.className,de)){d.removeClass(fullDescription,de)}else{d.addClass(fullDescription,de)}}var currentXpoImage,podealCarousel=document.getElementById("podealCarousel"),mainOfferShoe,picSize;if(podealCarousel){mainOfferShoe=document.getElementById("mainOfferShoe");mainOfferShoe.setAttribute("galleryimg","no");picSize=mainOfferShoe.width+"x"+mainOfferShoe.height;addCallback(podealCarousel,"click",changeXpoImage);podealCarousel=null}podealCarousel=null;var hasZoom="zoom" in document.body.style;function changeXpoImage(ev){var target=d.Event.getTarget(ev),productImage,newImageUrl,cpo,cpoId="curPOImg";if(target.tagName!="IMG"){return}var podCarousel=document.getElementById("podealCarousel").getElementsByTagName("LI");for(j=0;j<podCarousel.length;j++){d.removeClass(podCarousel[j],"curPOImg")}d.addClass(target.parentNode,"curPOImg");productImage=document.getElementById("mainOfferShoe");if(productImage){newImageUrl=target.src;currentXpoImage=productImage.src;newImageUrl=newImageUrl.replace(/([\d]{2,3})x\1/,picSize);if(productImage.src.indexOf(newImageUrl)==-1){productImage.src=newImageUrl;cpo=document.getElementById(cpoId);cpo.removeAttribute("id");target.parentNode.id=cpoId;if(hasZoom){target.style.position="relative";setTimeout(fixCpoLayout,1)}}}}function fixCpoLayout(){var c=document.getElementById("curPOImg");c.firstChild.style.position="static"}addCallback(document.body,"click",processDC);function processDC(ev){var target=d.Event.getTarget(ev),src,hash=target.hash,id,dcRelExp=/dc[0-9]+-[0-9]+$/;if(!hash||!dcRelExp.test(hash)){return}id=dcRelExp.exec(hash);id=id&&id[0];if(!id){return}src=document.getElementById(id);if(src){target.href=src.href}}APE.namespace("shopping.widget");shopping.widget.Placeholder=Placeholder;Placeholder.getById=APE.getById;function Placeholder(id){this.id=id;this.labelId=id+"Label";var label=document.getElementById(this.labelId);this.placeholderText=label&&label.firstChild.data||"";this.init()}Placeholder.prototype={init:function(){var inp=document.getElementById(this.id),addCallback=APE.dom.Event.addCallback;addCallback(inp,"focus",inpFocused);addCallback(inp,"blur",inpBlurred);addCallback(inp,"keydown",inpKeyDown);addCallback(inp,"keyup",inpPotentialChange);addCallback(inp,"mouseup",inpPotentialChange)},reset:function(){var inp=document.getElementById(this.id);if(!inp){return}inp.value=inp.defaultValue=this.placeholderText;APE.dom.addClass(inp.form,"defaultState");this.onreset(true)},isEmpty:function(){var inp=document.getElementById(this.id),trimExp=/^\s+|\s+$/g,value=inp.value.replace(trimExp,""),labelTxt=this.placeholderText;return value===""||(!!labelTxt&&value===labelTxt.replace(trimExp,""))},onreset:function(usePlaceholderText){}};function inpBlurred(){var dom=APE.dom,ph=Placeholder.getById(this.id);dom.removeClass(this,"focus");if(ph.isEmpty()){dom.addClass(this.form,"defaultState");this.value=ph.placeholderText}else{dom.removeClass(this.form,"defaultState")}}function inpFocused(){var ph=Placeholder.getById(this.id);APE.dom.addClass(this,"focus");if(this.value===ph.placeholderText){this.value=""}}function inpKeyDown(ev){ev=ev||event;if(ev.keyCode===27){this.value=this.defaultValue;try{this.blur()}catch(xxx_mozilla_permission_denied_to_get_property_XULElement_selectedIndex){}Placeholder.getById(this.id).onreset(false)}}function inpPotentialChange(){var dom=APE.dom,ph=Placeholder.getById(this.id);if(ph.isEmpty()){dom.addClass(this.form,"defaultState")}else{dom.removeClass(this.form,"defaultState")}}shopping.widget.Message=Message;Message.getById=APE.getById;function Message(id){this.id=id}Message.prototype={show:function(msg){var msgEl=document.getElementById(this.id);msgEl.innerHTML=msg;msgEl.style.visibility="visible"},hide:function(){var msgEl=document.getElementById(this.id);msgEl.style.visibility="hidden"}};var tsId="taxShip",doc=window.document,zipIn=doc.getElementById(tsId),EventPublisher=APE.EventPublisher,AsyncRequest=APE.ajax.AsyncRequest,req=AsyncRequest.getById(tsId,zipIn),taxShipReset=doc.getElementById("taxShipReset"),zipInProgress="zipInProgress",widget=shopping.widget,zipInPlaceholder=widget.Placeholder.getById("Z"),errMessage=widget.Message.getById("msg-err"),TIMEOUT_MILLIS=10000;zipIn.onsubmit=zipInSubmitted;zipInPlaceholder.onreset=hideErrorMessage;req.onsend=requestSendHandler;req.onabort=setDefaultState;req.oncomplete=removeProgress;req.ontimeout=timeoutHandler;req.onerror=saveError;taxShipReset.onclick=resetClicked;EventPublisher.add(req,"onsucceed",updateTableData);EventPublisher.add(doc.getElementById("Z"),"onkeypress",setMaxLength);zipIn=taxShipReset=req=doc=null;var addedUpdateZipCallback=false;function resetClicked(){addedUpdateZipCallback=false;AsyncRequest.getById(tsId).abort();setDefaultState()}function setDefaultState(){var z=document.getElementById("Z");z.value="";z.removeAttribute("maxLength");sendForm.call(z.form);hideErrorMessage();zipInPlaceholder.reset()}function requestSendHandler(){var form=document.getElementById(tsId);d.addClass(form,zipInProgress)}function removeProgress(){var zipIn=document.getElementById(tsId);d.removeClass(zipIn,zipInProgress)}function zipInSubmitted(ev){var z=this.elements.Z;d.Event.preventDefault(ev);hideErrorMessage();if(z.value===z.defaultValue){return}sendForm.call(this)}var runUpdateSortList=false;function sendForm(){var req=AsyncRequest.getById(tsId,this),z=this.elements.Z,zipCode=z.value.replace(/\s+/g,""),fName="&formName="+this.elements.formName.value;if(zipCode===""){if(pageData.unzippedData){document.getElementById("textZipped").innerHTML="* Enter zip code for tax and shipping";document.getElementById("zipNote").innerHTML="* Enter zip code above for tax and shipping";var updateZipStar=getElementsByClassName("shoesZipStar","span");for(l=0;l<updateZipStar.length;l++){updateZipStar[l].innerHTML="*"}if(!runUpdateSortList){buildSortList(filterArray);runUpdateSortList=true}widget.OfferTableResults.getById("shoeResultsTable","shoeStore").updateStores(pageData.unzippedData.stores);widget.OfferTableResults.getById("shoeResultsTable","shoeStore").updateAttributeFilters(pageData.unzippedData.filtermap);addedUpdateZipCallback=false}else{if(!addedUpdateZipCallback){EventPublisher.add(req,"onsucceed",setUnzippedData);addedUpdateZipCallback=true;req.send("Z="+fName,TIMEOUT_MILLIS)}}}else{if((zipCode|0)===0||!/^\d{5}$/.test(zipCode)){errMessage.show(pageData.errorMessages.invalidZip)}else{req.send("Z="+zipCode+fName,TIMEOUT_MILLIS)}}}function updateTableData(){var zipIn=document.getElementById(tsId),data,responseText=this.req.responseText,z;if(!responseText){errMessage.show(pageData.errorMessages.noResponse)}z=document.getElementById("Z");z.defaultValue=z.value;try{data=eval("("+responseText+")");if(typeof data=="string"){}widget.OfferTableResults.getById("shoeResultsTable","shoeStore").updateStores(data.stores);widget.OfferTableResults.getById("shoeResultsTable","shoeStore").updateAttributeFilters(data.filtermap);colorFilterStr="";filterColorList="";filterColorList=document.getElementById("filterColor");if(filterColorList!=null){filterColorList=filterColorList.getElementsByTagName("LI");for(i=0;i<filterColorList.length;i++){colorFilterSel=filterColorList[i].className;if(colorFilterSel!=null){checkClassName=colorFilterSel.match("radioGroupSelected");if(checkClassName!=null){colorFilterStr=filterColorList[i].getAttribute("id");colorFilterStr=colorFilterStr.replace("Filter","")}}}}sizeFilterStr="";filterSizeList="";filterSizeList=document.getElementById("filterSize");if(filterSizeList!=null){filterSizeList=filterSizeList.getElementsByTagName("LI");for(j=0;j<filterSizeList.length;j++){sizeFilterSel=filterSizeList[j].className;if(sizeFilterSel!=null){checkClassName=sizeFilterSel.match("radioGroupSelected");if(checkClassName!=null){sizeFilterStr=filterSizeList[j].getAttribute("id");sizeFilterStr=sizeFilterStr.replace("Filter","")}}}}var filterArrayStr="";if(colorFilterStr&&!sizeFilterStr){filterArrayStr=colorFilterStr}else{if(colorFilterStr&&sizeFilterStr){filterArrayStr=colorFilterStr+"_"+sizeFilterStr}else{if(!colorFilterStr&&sizeFilterStr){filterArrayStr=sizeFilterStr}}}filterArray=new Array(filterArrayStr);zipLowestPrice="";if(filterArray!=""){filterPrice=filterArray+"_p";zipLowestPrice="data.filtermap."+filterPrice;zipLowestPrice=eval(zipLowestPrice)}if(filterArray==""){var noFilters=data.nofiltermap.sort_no_filter}if(zipLowestPrice==""){zipLowestPrice=data.nofiltermap.sort_no_filter_p}var sort_no_filterID=document.getElementById("sort_no_filter");sort_no_filterID.value=data.nofiltermap.sort_no_filter;JsonObjData=data.filtermap;document.getElementById("textZipped").innerHTML="Price includes tax and shipping for ZIP:";document.getElementById("zipNote").innerHTML=" ";var updateZipStar=getElementsByClassName("shoesZipStar","span");for(l=0;l<updateZipStar.length;l++){updateZipStar[l].innerHTML=" "}buildSortList(filterArray,noFilters,zipLowestPrice)}catch(ex){}d.removeClass(zipIn,zipInProgress)}function setMaxLength(){this.maxLength=5}function hideErrorMessage(){errMessage.hide()}var tryAgainMessage=pageData.errorMessages.requestTimeout+"<span class='scriptLink' id='submitZ'>"+pageData.errorMessages.requestTimeoutTryAgain+"</span>";function timeoutHandler(){var submitZ=document.getElementById("submitZ");if(!submitZ.onclick){submitZ.onclick=function(){var z=document.getElementById("Z");if(z.value===zipInPlaceholder.placeholderText){z.value=""}sendForm.call(document.getElementById("taxShip"))};submitZ=null}}function saveError(){showErrorMessage(pageData.errorMessages.serverError);pageData.lastError=this._req.responseText}function setUnzippedData(){var data,responseText=this.req.responseText,reqSuccessPublisher=APE.EventPublisher.get(this,"onsucceed");if(!responseText){timeoutHandler.call(this)}try{data=eval("("+responseText+")");document.getElementById("textZipped").innerHTML="* Enter zip code for tax and shipping";document.getElementById("zipNote").innerHTML="* Enter zip code above for tax and shipping";var updateZipStar=getElementsByClassName("shoesZipStar","span");for(l=0;l<updateZipStar.length;l++){updateZipStar[l].innerHTML="*"}}catch(ex){}widget.OfferTableResults.getById("shoeResultsTable","shoeStore").updateStores(data);widget.OfferTableResults.getById("shoeResultsTable","shoeStore").updateAttributeFilters(data.filtermap);reqSuccessPublisher.remove(setUnzippedData)}function updateLowestPrice(){var rowCheck="";var priceLabel="";var lowestPriceVal="";var itemLowestPriceVal="";var targetLowestPriceVal="";var getPriceLabel=false;var itemPriceSet=false;var targetPriceSet=false;$fullPriceList=$("#shoeResultsTable > tbody").each(function(){var $tbodyId=$(this).attr("id");if($tbodyId.match("Items")=="Items"){$("#"+$tbodyId+" > tr").filter(function(){if(!getPriceLabel){priceLabel=$(this).find("td").eq(3).html();getPriceLabel=true}if(!itemPriceSet){if(!$(this).hasClass("rowExcluded")){itemLowestPriceVal=$(this).find(".vMid span.price").html();itemLowestPriceVal=itemLowestPriceVal.replace(/[^0-9\\.]/g,"");itemLowestPriceVal=parseFloat(itemLowestPriceVal);itemPriceSet=true}}})}if($tbodyId.match("mTarget")=="mTarget"){$("#"+$tbodyId+" > tr").filter(function(){if(!targetPriceSet){if(!$(this).hasClass("rowExcluded")){targetLowestPriceVal=$(this).find(".vMid span.price").html();targetLowestPriceVal=targetLowestPriceVal.replace(/[^0-9\\.]/g,"");targetLowestPriceVal=parseFloat(targetLowestPriceVal);targetPriceSet=true}}})}});lowestPriceVal=itemLowestPriceVal;if(targetLowestPriceVal!=null||targetLowestPriceVal!=""){lowestPriceVal=targetLowestPriceVal}var newPriceList=$("#shoeResultsTable span.price");var setPriceVal="";for(z=0;z<newPriceList.length;z++){var $priceLabelCheck_tbody=$(newPriceList[z]).parents().map(function(){return this}).get(3);$priceLabelCheck_tbodyId=$priceLabelCheck_tbody.getAttribute("id");if($priceLabelCheck_tbodyId.match("mTarget")=="mTarget"){$("#"+$priceLabelCheck_tbodyId+" > tr").filter(function(){if(!$(this).hasClass("rowExcluded")){setPriceVal=$(this).find(".dealPrice .vMid span.price").html();setPriceVal=setPriceVal.replace(/[^0-9\\.]/g,"");setPriceVal=parseFloat(setPriceVal);if(setPriceVal>lowestPriceVal){$(this).find("td").eq(3).html("&nbsp;")}if(setPriceVal<=lowestPriceVal){$(this).find("td").eq(3).html(priceLabel)}}})}}}})();