
$(function(){Sears.navBuild('#NavContainer',Sears.leftNavData);});var isKiosk=false;function gup(name){name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var regexS="[\\?&]"+name+"=([^&#]*)";var regex=new RegExp(regexS);var results=regex.exec(window.location.href);if(results==null){return"";}else{return results[1];}}String.format=function(format){var args=Array.prototype.slice.call(arguments,1);return format.replace(/\{(\d+)\}/g,function(m,i){return args[i];});};if(!String.prototype.replaceAll){String.prototype.replaceAll=function(find,replace){return this.split(find).join(replace);};}function trim(s){return typeof s!='undefined'&&s!=null?s.trim():'';}$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&parseInt($.browser.version,10)==6){s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+'style="display:block;position:absolute;z-index:-1;'+(s.opacity!==false?'filter:Alpha(Opacity=\'0\');':'')+'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+'"/>';return this.each(function(){if($('> iframe.bgiframe',this).length==0){this.insertBefore(document.createElement(html),this.firstChild);}});}return this;};function checkZip(str){if(str.length<5)return false;if(!checkNumeric(str.charAt(0)+str.charAt(1)+str.charAt(2)+str.charAt(3)+str.charAt(4)))return false;if(str.length==5)return true;if((str.charAt(5)!='-')||(str.length!=10))return false;if(!checkNumeric(str.charAt(6)+str.charAt(7)+str.charAt(8)+str.charAt(9)))return false;return true;}function checkNumeric(str){strLength=str.length;var isFloat=false;var error=false;var i=0;for(i;i<strLength;i++){if((str.charAt(i)<'0')||(str.charAt(i)>'9')){if(!isFloat&&(str.charAt(i)=='.')){isFloat=true;}else if(i==0){if((str.charAt(i)!='-')){error=true;break;}}else
{error=true;break;}}}return!error;}function fnRedirectToUrl(url){var redirectUrl="/";if(url!='undefined'&&url!=null&&url!=""){if(url=="current"){redirectUrl=window.location.href;}else{redirectUrl=url;}}if($.browser.msie&&parseInt($.browser.version,10)==6){setTimeout(function(){window.location.replace(redirectUrl);},100);}else{window.location.replace(redirectUrl);}}function fnStoreLocator(){var url='http://www.sears.com';var domain='';if(url.indexOf('/shc/')==-1){domain=url.split(".com");domain[0]=domain[0]+'.com';}else{domain=url.split("/shc/");}var zip=$('input#storeLocator_zip').val();var city=$('input#storeLocator_city').val();var state=$('select#storeLocator_state').val();var pathName=domain[0]+"/shc/s/StoreLocatorView?storeId=10153&catalogId=12605";var error=false;if((zip==null||zip=='')&&(state==null||state==''||city==null||city=='')){$('div.flyout_error').html("Please enter zip or city and state");$('div.flyout_error').show();error=true;}else
{if(zip!=null&&zip!=''){if(!checkZip(zip)){$('div.flyout_error').show();error=true;}else
{pathName=pathName+"&zip="+zip;}}if(state!=null&&state!=''&&city!=''&&city!=null){pathName=pathName+"&state="+state+"&city="+city;}if(error==false)window.location=pathName;}window.location=pathName;}
