function sb_ToggleDisplay(a,b){if(document.getElementById(b).style.display=="block"||document.getElementById(b).style.display==""){document.cookie=b+"=0;";sb_HideDisplay(a,b)}else{document.cookie=b+"=1;";sb_ShowDisplay(a,b)}}function sb_HideDisplay(a,b){document.getElementById(b).style.display="none";document.getElementById(a).className="left arrowright"}function sb_ShowDisplay(a,b){document.getElementById(b).style.display="block";document.getElementById(a).className="left arrowdown"}function sb_ToggleMoreOpts(c,b,a){if(document.getElementById(c).style.display=="block"||document.getElementById(c).style.display==""){document.cookie=c+"=0;";sb_HideMoreOpts(c,b,a)}else{document.cookie=c+"=1;";sb_ShowMoreOpts(c,b,a)}}function sb_HideMoreOpts(c,b,a){document.getElementById(c).style.display="none";document.getElementById(b).innerHTML="+";document.getElementById(a).innerHTML="More Options"}function sb_ShowMoreOpts(c,b,a){document.getElementById(c).style.display="block";document.getElementById(b).innerHTML="-";document.getElementById(a).innerHTML="Fewer Options"}function positionHelpBox(b){if(document.implementation&&document.implementation.createDocument){b.style.marginTop=-54;var a=(tempX*1)-((document.width-800)/2);if(a>160){a=160}b.style.marginLeft=a}}complist=new Object();complist.delimiter="|";complist.classId="ClID";complist.list="";var COMPARE_COOKIE_NAME="ComparisonList";var COMPARE_ELID_CLASSID="ClID";function loadCompareList(){var a=YAHOO.util.Cookie.getSubs(COMPARE_COOKIE_NAME);if(a!=null){complist=a}}function saveCompareList(){YAHOO.util.Cookie.setSubs(COMPARE_COOKIE_NAME,complist,{path:"/"})}function addSkuToList(b){loadCompareList();var a=document.getElementById(COMPARE_ELID_CLASSID);if(a!=null){if(!(complist.classId==a.value)){complist.classId=a.value;complist.list=b;saveCompareList()}if(complist.list.indexOf(b)==-1){if(complist.list==""){complist.list=b}else{complist.list=complist.list+complist.delimiter+b}saveCompareList()}}}function removeSkuFromList(b){loadCompareList();var a;if(document.getElementById(COMPARE_ELID_CLASSID)!=null){a=document.getElementById(COMPARE_ELID_CLASSID).value;if((complist.classId==a)){if(complist.list.indexOf(b+complist.delimiter)!=-1){complist.list=complist.list.replace(b+complist.delimiter,"");saveCompareList()}else{if(complist.list.indexOf(complist.delimiter+b)!=-1){complist.list=complist.list.replace(complist.delimiter+b,"");saveCompareList()}}}}}function checkCompared(){loadCompareList();if(complist.list!=null){var a=complist.list.split(complist.delimiter);for(i=0;i<a.length;i++){if(document.getElementById("comp_"+a[i])!=null){document.getElementById("comp_"+a[i]).checked=true}}}}function updateList(a){var b=a.split("_");if(document.getElementById(a)!=null){if(document.getElementById(a).checked==true){addSkuToList(b[1])}else{removeSkuFromList(b[1])}}}var winpops=null;function opennamedpopuploc(c,e,d,b,a,f){if(winpops!=null){winpops.close()}winpops=window.open(c,e,"width="+d+",height="+b+",scrollbars,resizable,toolbar,");winpops.moveTo(a,f);document.forms.compareForm.submit()}function toggleCompareVisibility(){var a=document.getElementsByName("comparetoggle");for(var b=0;b<a.length;b++){a[b].style.visibility="visible"}}function listToHiddenInput(){loadCompareList();if(complist.list!=null){if(document.getElementById("cg_hidden_inputs")!=null){var a='<input type="hidden" name="classId" value="'+complist.classId+'"/>';var d='<input type="hidden" name="list" value="'+complist.list+'"/>';var c='<input type="hidden" name="delimiter" value="'+complist.delimiter+'"/>';var b=a+d+c;document.getElementById("cg_hidden_inputs").innerHTML=b}}}function CheckSBProd(a){var e=a+"";var b="";var f={success:function(k){try{update_feed_product(k.responseText)}catch(j){CatchAjaxError("CheckSBProd error:"+j.message)}},failure:function(j){CatchAjaxError("CheckSBProd status:"+j.statusText)}};if(e.indexOf("sku=")>=0&&e.indexOf("refid=")>=0){if(e.indexOf("?")>=0){e=e.substring(e.indexOf("?"));var g=e.split("&");for(var d=0;d<g.length;d++){if(g[d].indexOf("=")>=0){var h=g[d].split("=");if(h.length==2){if(h[0].toLowerCase()=="sku"||h[0].toLowerCase()=="piid"){if(b!=""){b=b+"&"}b=b+h[0].substring(0,8)+"="+h[1].substring(0,9)}}}}}if(b!=""){var c="/asp/public/static/ajax/feed_product_info.asp?"+b;YAHOO.util.Connect.asyncRequest("GET",c,f)}}}function update_feed_product(a){if(a.length>64){var c=document.getElementById("sbstandardheadid");if(c!=null){var b=document.getElementById("sbstandardheadtitleid");var d="";if(b!=null){d=b.innerHTML}if(d.length>128){d=""}c.innerHTML=a;var e=document.getElementById("feedprodcat");if(e!=null){e.innerHTML=d+"&nbsp;"}}}}function helppop(g,d,b){var c;var f;var a;var e=document.getElementById(g);c=findPos(e)[0]+15;f=findPos(e)[1]-28;a=document.getElementById(d);a.style.left=c+"px";a.style.top=f+"px";document.getElementById("helppopupcontent").innerHTML=b;a.style.display="block"}function showsbloadpanel(a,b,c){loadbatcpanel(c,a);document.location=b.href;return false}function filter(a,c){var d=new Array(0);for(var b=a.length-1;b>-1;b--){if(c(a[b])){d.push(a[b])}}return d}function changeCB(c,d,a,b,e){return function(){var h,j;var k=b(e.maxSlider.getValue(),"R");var g=b(e.minSlider.getValue(),"L");var f=document.location.href;f=f.replace(/%7E/g,"~");if((f.indexOf("/asp/superbrowse.asp")==-1)&&(f.indexOf("~")==-1)){f=document.getElementById("baseUrl").value}if(f.indexOf("/asp/superbrowse.asp")!=-1){if((j=f.indexOf("slider=S"+c+"~"))!=-1){if((h=f.indexOf("&",j))==-1){f=f.substring(0,j-1)}else{f=f.substring(0,j-1)+f.substring(h,f.length)}}f=f.replace(".html&",".html?");if((k<a)||(g>d)){if(f.indexOf(".html")==f.length-5){f=f+"?"}else{f=f+"&"}f=f+"slider=S"+c+"~";f=f+g+"~"+k}}else{if((j=f.indexOf("-S"+c+"~"))!=-1){if((h=f.indexOf("-",j+1))!=-1){f=f.substring(0,j)+f.substring(h,f.length)}else{h=f.indexOf(".html");f=f.substring(0,j)+f.substring(h,f.length)}}if((k<a)||(g>d)){f=f.replace(".html","-S"+c+"~"+g+"~"+k+".html")}}document.location=f}}function moveCB(d,b,c,a){return function(){document.getElementById("min_"+b).innerHTML=a(d.minSlider.getValue(),"L");document.getElementById("max_"+b).innerHTML=a(d.maxSlider.getValue(),"R")}}function showAllCB(b,a){return function(){b.minSlider.setValue(0);b.maxSlider.setValue(a);return false}}function sliderToValue(c,d,b,a){d=d+1;b=b+1;c=c-a;return function(e,g){var h=d;var f=(Math.log(b/d))/c;if(g=="L"){return Math.floor(h*Math.exp(f*e))-1}else{return Math.ceil(h*Math.exp(f*(e-a)))-1}}}function sliderToValueInverse(c,d,b,a){d=d+1;b=b+1;c=c-a;return function(e,g){var h=d;var f=(Math.log(b/d))/c;if(g=="L"){return Math.floor(Math.log((e+1)/h)/f)}else{return Math.ceil(Math.log((e+1)/h)/f)+a}}}function init_slider(e){var a=183;var m=12;var n,k,b,o,r,d,p,q,j,h,f;var c=[0,a];var g=0;var l=document.getElementById("curr_sliders").value;l=l.replace(/%7E/g,"~");b=e.id.split("_")[1];o=Math.max(parseFloat(document.getElementById("min_"+b).innerHTML),0);r=parseFloat(document.getElementById("max_"+b).innerHTML);h=sliderToValue(a,o,r,m);f=sliderToValueInverse(a,o,r,m);if((d=l.indexOf("S"+b+"~"))>-1){if((p=l.indexOf(",",d+1))>-1){q=l.substring(d+b.length+2,p)}else{q=l.substring(d+b.length+2,l.length)}j=q.split("~");c=[f(parseInt(j[0]),"L"),f(parseInt(j[1]),"R")];document.getElementById("min_"+b).innerHTML=j[0];document.getElementById("max_"+b).innerHTML=j[1]}else{document.getElementById("min_"+b).innerHTML=h(c[0],"L");document.getElementById("max_"+b).innerHTML=h(c[1],"R")}e.parentNode.style.display="";n=YAHOO.widget.Slider.getHorizDualSlider(e.id,e.childNodes[0].id,e.childNodes[1].id,a,g,c);n.subscribe("change",moveCB(n,b,o,h));document.getElementById("showall_"+b).onclick=showAllCB(n,a);n.subscribe("slideEnd",changeCB(b,o,r,h,n));return}function init_sliders(){var a;if(document.getElementsByClassName){a=document.getElementsByClassName("sliderbg")}else{a=filter(document.getElementsByTagName("div"),function(b){return(b.className=="sliderbg")})}for(i=0;i<a.length;i++){if(a[i].parentNode.parentNode.style.display!="none"){init_slider(a[i])}}}function printArray(a){var b="";for(var c=0;c<a.length;c++){b=b+" "+c+":"+a[c].style.display}return(b)}function hideAtt(a){a.style.display="none";var c=filter(a.parentNode.childNodes,function(e){return(e.tagName=="LI")});var d=false;for(var b=0;b<c.length;b++){if(c[b].style.display!="none"){d=true}}if(!d){document.getElementById("hd_"+a.parentNode.id.split("_")[1]).style.display="none"}else{document.getElementById("hd_"+a.parentNode.id.split("_")[1]).style.display=""}}function showAtt(a){a.style.display="";document.getElementById("hd_"+a.parentNode.id.split("_")[1]).style.display=""};