var agt=navigator.userAgent.toLowerCase();var is_major=parseInt(navigator.appVersion);var is_minor=parseFloat(navigator.appVersion);var is_nav=((dojo.isMozilla>0)||(dojo.isSafari>0));var is_nav6up=is_nav;var is_firefox=(dojo.isFF>0);var is_opera=(dojo.isOpera>0);var is_ie=(dojo.isIE>0);var is_ie3=(dojo.isIE==3);var is_ie4=(dojo.isIE==4);var is_ie5=(dojo.isIE==5);var is_ie5_5=(dojo.isIE==5.5);var is_ie5up=(dojo.isIE>=5);var is_ie5_5up=(dojo.isIE>=5.5);var is_ie6=(dojo.isIE==6);var is_ie6up=(dojo.isIE>=6);var is_ie7=(dojo.isIE==7);var is_iframe_compliant=(is_ie5up||is_nav6up||is_opera||(dojo.isChrome>0));var is_win=((agt.indexOf("win")!=-1)||(agt.indexOf("32bit")!=-1));var is_mac=(agt.indexOf("mac")!=-1);function activeXCheck(){document.cookie="ActiveXEnabled=true; path=/";if(is_ie){try{if(window.ActiveXObject){return new ActiveXObject(getControlPrefix()+".XmlHttp");}}catch(ex){if(window.XMLHttpRequest==undefined){document.cookie="ActiveXEnabled=false; path=/";}}}}function getControlPrefix(){if(getControlPrefix.prefix){return getControlPrefix.prefix;}var _37b=["MSXML2","Microsoft","MSXML","MSXML3"];var o,o2;for(var i=0;i<_37b.length;i++){try{o=new ActiveXObject(_37b[i]+".XmlHttp");o2=new ActiveXObject(_37b[i]+".XmlDom");return getControlPrefix.prefix=_37b[i];}catch(ex){}}throw new Error("Could not find an installed XML parser");}activeXCheck();function openPromoWindow(_37e,_37f){var _380=(document.cookie.indexOf(_37f)==-1);var _381=document.cookie.indexOf(_37f+"viewed=");if(_380&&(_381==-1)){var _382=window.open(_37e,"SitePromotions","noresizable,noscrollbars,screenX=100, screenY=100,width=310,height=230");_382.moveTo(100,100);}}function detectIframeAdobe(_383,_384,_385){var _386=createCatalogUrlString(_383,_384,_385);window.location=_386;}function createCatalogUrlString(_387,_388,_389){var _38a,adobeCompatable=false;var _38b=false;if(is_iframe_compliant){adobeCompatable=detectAdobe();}var _38c="?browserCompatable="+is_iframe_compliant+"&adobeCompatable="+adobeCompatable;if(detectAdobe(true)){_38b=true;}_38c=_38c+"&toolbar="+_38b;if(_387!=null&&_387!=""){_38c=_38c+"&CatPage="+_387;}if(_388==null||_388==""){_38a="viewCatalogPDF.shtml"+_38c;var _38d=window.location.pathname;var _38e=_38d.indexOf("/cgi-bin/");if(_38d.indexOf("wwg")==-1){if(_38e==-1){_38a="/Grainger/wwg/"+_38a;}else{var _38f=_38d.indexOf("/",9);var _390=_38d.substring(_38e,_38f);_38a=_390+"/wwg/"+_38a;}}}else{_38a=_388+_38c;}if(_389){_38a="/Grainger/"+_38a;}return _38a;}function iframeRefresh(_391){if(detectAdobe(true)){parent.location.reload();if(_391!=null){alert("Please click OK to view the Help Pop-up Window.");openIt(_391);}}}function showPopup(url,_393,_394){var _395=window.open(url,"childwin","width="+_393+",height="+_394+",menubar=no,scrollbars,status=no");iframeRefresh(_395);}function popUpPositionWidth(_396){var _397=(_396)/2;var xMax=screen.width;var _399=((xMax)/2)-_397;return _399;}function popUpPositionHeight(_39a){var _39b=(_39a)/2;yMax=screen.height;yOffset=((yMax)/2)-_39b;return yOffset;}function popWin(url,_39d,_39e,_39f,_3a0,_3a1,menu,_3a3,_3a4,_3a5){if(_39d==null||_39d==""){_39d=400;}if(_39e==null||_39e==""){_39e=400;}if(_3a0==null||_3a0==""){_3a0="no";}if(_3a1==null||_3a1==""){_3a1="no";}if(menu==null||menu==""){menu="no";}if(_3a3==null||_3a3==""){_3a3="no";}if(_3a4==null||_3a4==""){_3a4="no";}if(_3a5==null||_3a5==""){_3a5="childwin";}goBack(_39f);if(window.location.pathname.indexOf("PDF")==-1){popupwindow=window.open(url,_3a5,"width="+_39d+",height="+_39e+",menubar="+menu+",scrollbars,status="+_3a4+",toolbar="+_3a0+",location="+_3a1+",resizable="+_3a3);if(_3a5=="mastersetWindow"){moveX=0;moveY=0;if(is_firefox){moveY=500;}openIt(popupwindow,moveX,moveY);}else{openIt(popupwindow);}}else{showPopup(url,_39d,_39e);}}function popWinSurvey(url,_3a7){goBack(_3a7);popupwindow=window.open(url,"childwin","menubar=no,scrollbars,status=no");openIt(popupwindow);}function openIt(_3a8,_3a9,_3aa){_3a8.focus();if(!_3a8.opener){_3a8.opener=window;}if((_3a9!=null)&&(_3aa!=null)){_3a8.moveTo(_3a9,_3aa);}}function goBack(qty){if(qty!=null&&qty.length>0){window.history.go(qty);}}function submitSearch(form,obj){if(!isNullSearch(obj)){form.submit();}}function isNullSearch(obj){var _3af=obj.value;_3af=_3af.replace(/^\s+/,"").replace(/\s+$/,"");if((_3af==null)||(_3af=="")){alert("Please enter text to search.");return true;}return false;}function isValidQuantity(obj){var qty=obj.value;qty=qty.replace(/^\s+/,"").replace(/\s+$/,"");if(qty==""||qty=="Qty"){return true;}var _3b2=/^[0-9]*$/;if(_3b2.test(qty)==false||parseInt(qty,10)<=0){alert("You have entered an invalid character in the quantity field for one or more item \nnumbers.  Please double check the quantity field(s) on this page and ensure that\neach one only contains a positive number.");unlocksubmit();obj.focus();return false;}return true;}function isEmptyItemRow(_3b3,_3b4){if((_3b4.value.replace(/^(\s)+$/,"")==""||_3b4.value.toUpperCase()=="ITEM #")){return true;}else{return false;}}function isValidItemRow(_3b5,_3b6){if(isValidQuantity(_3b5)){if(_3b6.value.toUpperCase()=="ITEM #"||_3b6.value.replace(/^(\s)+$/,"")==""){alert("Please enter an item number.");unlocksubmit();_3b6.focus();}else{if(_3b5.value=="Qty"){_3b5.value="";}return true;}}else{_3b5.focus();}return false;}function validateSearchQuery(_3b7){return (!isNullSearch(_3b7));}var cansubmit=true;function _submitOnce(){if(cansubmit){cansubmit=false;return true;}return false;}function unlocksubmit(){cansubmit=true;}unlocksubmit();function forward(page){document.location=page;}function getElmtRef(_3b9){if(!document.getElementById){return document.all[_3b9];}else{return document.getElementById(_3b9);}}String.prototype.trim=function(){var x=this;x=x.replace(/^\s*(.*)/,"$1");x=x.replace(/(.*?)\s*$/,"$1");return x;};String.prototype.endsWith=function(){if(arguments.length!=1){return true;}var s=arguments[0];if(this.length>=s.length){return this.substring(this.length-s.length,this.length)==s;}else{return false;}};function createCookie(name,_3bd,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var _3c0="; expires="+date.toGMTString();}else{var _3c0="";}document.cookie=name+"="+_3bd+_3c0+"; path=/";}function readCookie(name){var _3c2=name+"=";var ca=document.cookie.split(";");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" "){c=c.substring(1,c.length);}if(c.indexOf(_3c2)==0){return c.substring(_3c2.length,c.length);}}return null;}function eraseCookie(name){createCookie(name,"",-1);}function elipsis(_3c7,_3c8){if(_3c7&&_3c8){_3c8=parseInt(_3c8);var _3c9;if(_3c7.length>_3c8){_3c9="<span title=\""+_3c7+"\">"+_3c7.substring(0,_3c8-4)+"&nbsp;...</span>";}else{_3c9=_3c7;}return _3c9;}return _3c7;}function decodeUrlChars(_3ca){return _3ca.replace(/%22/g,"\"").replace(/%27/g,"'");}var cookiesEnabled=true;function cookieCheck(){var _3cb=new Date();_3cb.setFullYear(_3cb.getFullYear()+1);document.cookie="cookies=true; expires="+_3cb.toGMTString()+"; path=/";document.cookie="grainger=true; path=/";var _3cc=!(document.cookie.indexOf("grainger=")==-1);var _3cd=!(document.cookie.indexOf("cookies=")==-1);if(!_3cc||!_3cd){cookiesEnabled=false;}}cookieCheck();function alternateTableRows(_3ce){if(document.getElementsByTagName){var _3cf=document.getElementById(_3ce);var rows=_3cf.getElementsByTagName("tr");for(i=0;i<rows.length;i++){if(i%2!=0){rows[i].className="trgray";}}}}function getBaseApplicationURL(){var uri=location.protocol+"//"+document.domain+location.pathname;var _3d2=new RegExp("(https*://.*?/(Grainger|gcom_a[0-9]+|cgi-bin/gcom_a[0-9]+))/.*");return (uri.replace(_3d2,"$1"));}function callCmSetProduction(){if(window.location.href.indexOf("www.grainger.com")>-1){cmSetProduction();}}function replaceMissingImage(_3d3,_3d4){_3d3.src=_3d4;_3d3.onerror="";return true;}function loadJavaScript(_3d5){var _3d6=document.getElementsByTagName("head").item(0);var js=document.createElement("script");js.setAttribute("language","javascript");js.setAttribute("type","text/javascript");js.setAttribute("src",_3d5);if(_3d5.indexOf("dojo.js")>=0){js.setAttribute("djConfig","parseOnLoad: true");}_3d6.appendChild(js);}function loadCSS(_3d8){var _3d9=document.getElementsByTagName("head").item(0);var css1=document.createElement("link");css1.setAttribute("rel","stylesheet");css1.setAttribute("type","text/css");css1.setAttribute("href",_3d8);_3d9.appendChild(css1);}function submitEnter(_3db){var _3dc;if(window.event){_3dc=window.event.keyCode;}else{if(_3db){_3dc=_3db.which;}else{return true;}}if(_3dc==13){document.signinForm.submit();return false;}else{return true;}}function enterKeyPressed(_3dd){var _3de;if(window.event){_3de=window.event.keyCode;}else{if(_3dd){_3de=_3dd.which;}else{return false;}}if(_3de==13){return true;}else{return false;}}function showSignIn(){var _3df=readCookie("ActiveXEnabled");if(_3df=="false"){window.location=getBaseApplicationURL()+"/wwg/loginOrRegister.shtml";}var _3e0;if(window.location.href.indexOf("viewCatalogPDF.shtml")>-1){_3e0="56px";}else{_3e0="150px";}dojo.extend(dijit.Dialog,{_position:function(){if(!dojo.hasClass(dojo.body(),"dojoMove")){var node=this.domNode;var _3e2=dijit.getViewport();var p=this._relativePosition;var mb=p?null:dojo.marginBox(node);dojo.style(node,{left:Math.floor(_3e2.l+(p?p.l:(_3e2.w-mb.w)/2))+"px",top:_3e0});}}});var _3e5=dijit.byId("signin");_3e5.show();var _3e6=dojo.byId("loginSubmit");if(_3e6!=null){_3e6.onclick=function(){_3e6.disabled=true;dojo.byId("signinForm").submit();return (false);};}document.signinForm.currentPageURL.value=window.location.href;document.signinForm.userName.focus();}var performKeywordSearch=function(form){if(null!=form.searchQuery&&form.searchQuery.value.length>0){form.searchQuery.value=form.searchQuery.value.replace(/^\s*|\s*$/g,"");if(getQueryParam("sst")!=""){form.sst.value=getQueryParam("sst");}if(form.searchQuery.value.length>0){if(form.Ntt.value.length>0){form.Ntt.value+="|"+form.searchQuery.value;}else{form.Ntt.value=form.searchQuery.value;}form.submit();return (true);}}alert("Please enter a search value.");return (false);};function getQueryParam(key){var _3e9=window.location.search.substring(1);var vars=_3e9.split("&");for(var i=0;i<vars.length;i++){var _3ec=vars[i].split("=");if(_3ec[0]==key){return _3ec[1];}}return "";}function searchTypeChange(obj){if(dojo.byId("mixedviewSearchType").value!=obj.value){dojo.byId("mixedviewSearchType").value=obj.value;var _3ee="";var _3ef="";if(window.location.href.indexOf("homepage.jsp")!=-1){_3ee="homepage.jsp";_3ef="?searchType="+obj.value;}else{if(window.location.href.indexOf("start.shtml")!=-1){_3ee="start.shtml";_3ef="?searchType="+obj.value;}else{if(window.location.href.indexOf("search.shtml")!=-1){_3ee="search.shtml";_3ef="?op=search&searchType="+obj.value;}else{if(window.location.href.indexOf("/ecatalog/")!=-1){_3ee="/ecatalog/";_3ef="N-?op=search&searchType="+obj.value;}}}}if(_3ef!=""){var idx=window.location.href.indexOf(_3ee);window.location.href=window.location.href.substr(0,idx+_3ee.length)+_3ef;}}}var containsElement=function(arr,ele){var _3f3=false,index=0;while(!_3f3&&index<arr.length){if(arr[index]==ele){_3f3=true;}else{index++;}}return _3f3;};var autoCursor=function(_3f4,len,e){var _3f7=(is_nav)?e.which:e.keyCode;var _3f8=(is_nav)?[0,8,9]:[0,8,9,16,17,18,37,38,39,40,46];if(_3f4.value.length>=len&&!containsElement(_3f8,_3f7)){_3f4.value=_3f4.value.slice(0,len);var _3f9=getIndex(_3f4);for(var i=(_3f9+1)%_3f4.form.length;i!=_3f9;i=++i%_3f4.form.length){try{_3f4.form[i].focus();break;}catch(e){continue;}}}return true;};var getIndex=function(_3fb){var _3fc=-1,i=0,found=false;while(i<_3fb.form.length&&_3fc==-1){if(_3fb.form[i]==_3fb){_3fc=i;}else{i++;}}return _3fc;};