var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS"},searchString:function(d){for(var c=0;c<d.length;c++){var a=d[c].string;var b=d[c].prop;this.versionSearchString=d[c].versionSearch||d[c].identity;if(a){if(a.indexOf(d[c].subString)!=-1){return d[c].identity}}else{if(b){return d[c].identity}}}},searchVersion:function(a){var b=a.indexOf(this.versionSearchString);if(b==-1){return}return parseFloat(a.substring(b+this.versionSearchString.length+1))},dataBrowser:[{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"SeaMonkey",identity:"SeaMonkey"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};BrowserDetect.init();function SetLabelText(a,d){var c=document.getElementById(a);if(c!=null&&d!=null){var b=(document.getElementsByTagName("body")[0].innerText!=undefined)?true:false;if(b){c.innerText=d}else{c.textContent=d}}}function SetLabelTextFromLabel(e,b){var c=document.getElementById(e),d=document.getElementById(b);if(c!=null&&d!=null){var a=(document.getElementsByTagName("body")[0].innerText!=undefined)?true:false;if(a){c.innerText=d.innerText}else{c.textContent=d.textContent}}}function ClearAndHideTextBox(a){var b=document.getElementById(a);if(b){b.value="";b.style.display="none"}}function FillTextBox(c,b){var a=document.getElementById(c);if(a){a.value=b}}function FillTextBoxFromAnother(d,c){var a=document.getElementById(d),b=document.getElementById(c);if(b&&a){b.value=a.value}}function EnableTextBox(b){var a=document.getElementById(b);if(a){a.readOnly=false}else{a.setAttribute("readonly","false")}}function DisableTextBox(b){var a=document.getElementById(b);if(a){a.readOnly=true}else{a.setAttribute("readonly","true")}}function ClickButton(a){var b=document.getElementById(a);if(b){b.click()}}function SwapPanels(c,d){var b=document.getElementById(c),a=document.getElementById(d);if(b!=null&&a!=null){b.style.display="block";a.style.display="none"}}function ToggleCheckBox(d,b){var c=document.getElementById(d),a=document.getElementById(b);if(c&&a){if(a.checked==true){c.checked=false}}}function UnCheckCheckBox(b){var a=document.getElementById(b);if(a){a.checked=false}}function CheckCheckBox(b){var a=document.getElementById(b);if(a){a.checked=true}}String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};String.prototype.ltrim=function(){return this.replace(/^\s+/,"")};String.prototype.rtrim=function(){return this.replace(/\s+$/,"")};String.prototype.startsWith=function(a){return(this.match("^"+a)==a)};function isDigit(a){return((a>="0")&&(a<="9"))}function isEmpty(a){return((a==null)||(a.length==0))}function contact_us(b,a){window.open("/CustomerService/ContactUS_window.aspx?Location="+b+"&Popup=Y","ContactWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=478,height="+a)}function ValidateCartQuantity(b){var e;if(b==null){return false}else{var a=document.getElementById(b).value;if(isEmpty(a)){return false}else{if(a.length>8){return false}for(e=0;e<a.length;e++){var d=a.charAt(e);if(!isDigit(d)){return false}}if(a<0){return false}return true}}}function DecimalsOnly(f,c){if(typeof f!="undefined"){var a=window.event?f.keyCode:f.which;if(a==8){return true}if(a==190){var g=c.value,b;b="no";for(var d=0;d<g.length;d++){if(g.charAt(d)=="."){b="yes"}}if(b=="yes"){return false}else{return true}}if(a==32||a==9||a==13){return true}if(a<48||a>57){return false}else{return true}}}function NumbersOnly(b){if(typeof b!="undefined"){var a=window.event?b.keyCode:b.which;if(a==8||a==0){return true}if(a==118){return true}if(a==32||a==9||a==13){return true}if(a<48||a>57){return false}else{return true}}}function NumbersAndCommas(b){if(typeof b!="undefined"){var a=window.event?b.keyCode:b.which;if(a==8||a==0){return true}if(a==32||a==9||a==13||a==44){return true}if(a<48||a>57){return false}else{return true}}}function IsEnterKeyPressed(b){if(typeof b!="undefined"){var a=window.event?b.keyCode:b.which;if(a==13){return true}}return false}function NumbersOnly_OnKeyDown(b){if(typeof b!="undefined"){var a=window.event?b.keyCode:b.which;if(a==8||a==0){return true}if(a==32||a==9||a==13){return true}if((a<48||a>57)&&(a<96||a>105)){return false}else{return true}}}function AlphaNumericOnly(h){var n=8,l=9,j=32,m=45,b=46,k=48,c=57,f=65,i=90,g=97,d=122,a;if(window.event){a=window.event.keyCode}else{if(h){a=h.which}else{return true}}if((a>0&&a<n)||(a>l&&a<j)||(a>j&&a<m)||(a>b&&a<k)||(a>c&&a<f)||(a>i&&a<g)||(a>d)){return false}else{return true}}function AlphaNumericOnlyWithAllowedKey(i,n){var o=8,m=9,k=32,j=45,b=46,l=48,c=57,f=65,h=90,g=97,d=122,a;if(window.event){a=window.event.keyCode}else{if(i){a=i.which}else{return true}}if((a>0&&a<o)||(a>m&&a<k)||(a>k&&a<j)||(a>b&&a<l)||(a>c&&a<f)||(a>h&&a<g)||(a>d)){if(a!=n){return false}else{return true}}else{return true}}function AlphaOnly(b){var a;if(window.event){a=window.event.keyCode}else{if(b){a=b.which}else{return true}}if(!((a>47)&&(a<58))||(a==8)){return true}else{return false}}function DisableValidator(a){var b=document.getElementById(a);if(b){ValidatorEnable(b,false)}}function EnableValidator(a){var b=document.getElementById(a);if(b){ValidatorEnable(b,true)}}function ClearValidatorIfDisplayed(a){if(a!=null){if(a.style.display!="none"){a.style.display="none"}}}function ClearValidator(a){if(a!=null){a.style.display="none"}}function LimitTextField(b,c){var a=document.getElementById(b);if(a){if(a.value.length>=c){a.value=a.value.substring(0,c-1)}}}function ClearTextField(a){if(a!=null){a.value=""}}function textAreaCharsCounter(a,b,c){if(a.value.length>c){a.value=a.value.substring(0,c)}else{document.getElementById(b).value=c-a.value.length}}function CurrencyOnly(f,c){if(typeof f!="undefined"){var a=window.event?f.keyCode:f.which;if(a==46){var g=c.value,b;b="no";for(var d=0;d<g.length;d++){if(g.charAt(d)=="."){b="yes"}}if(b=="yes"){return false}else{return true}}if(a<48||a>57){return false}else{return true}}}function NoDimensionsEntered(f,d,g,j,b,h){var i=document.getElementById(j),a=document.getElementById(b),c=document.getElementById(h),k=document.getElementById(g);if(i.value==""&&a.value==""&&c.value==""){k.style.display="block";return false}else{k.style.display="none";return true}}function ValidDimensions(g,j,h){var a,d;var c=document.getElementById(h);c.style.display="none";if(typeof g!="undefined"){var b=window.event?g.keyCode:g.which;if(b==8||b==32||b==0||b==13){return true}if(b==46){d=j.value;var k;k="no";for(a=0;a<d.length;a++){if(d.charAt(a)=="."){k="yes"}}if(k=="yes"){c.style.display="block";return false}else{return true}}if(b==47){d=j.value;var f;f="no";for(a=0;a<d.length;a++){if(d.charAt(a)=="/"){f="yes"}}if(f=="yes"){c.style.display="block";return false}else{return true}}if(b<48||b>57){c.style.display="block";return false}else{return true}}}function chkDateBox(b){if(typeof b!="undefined"){var a=window.event?b.keyCode:b.which;if(a<47||a>57){return false}else{return true}}else{return true}}function showHelp(b,a,c){window.open("/HelpPopUp.aspx?HelpID="+b,"HelpWin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width="+a+",height="+c)}function display_help(a){window.open("/HelpPopUp.aspx?HelpID="+a,"HelpWin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=410,height=415")}function showHideCalculator(b){var a=document.getElementById("divCalculator");if(a.style.display=="none"){show=true}else{show=false}if(a){if(show){document.getElementById("toggleImage1").src="/images/buttons/button_right.gif";a.style.display="block";a.style.visibility="visible";if(b=="bubble"){document.getElementById("txtWidth").focus()}else{if(b=="tubing"){document.getElementById("txtDiameter").focus()}}}else{document.getElementById("toggleImage1").src="/images/buttons/button_down_right.gif";a.style.display="none";a.style.visibility="hidden"}}}function showHideContent(a){var c,d,b=document.getElementById("foldout");if(b.style.visibility=="visible"){show=false}else{show=true}if(b){if(show){document.getElementById("toggleImage1").src="/images/buttons/button_left.gif";b.style.display="block";b.style.visibility="visible";for(c=2;c<=a;c++){d=document.getElementById("foldout"+c);d.style.display="block";d.style.visibility="visible"}}else{document.getElementById("toggleImage1").src="/images/buttons/button_down.gif";b.style.display="none";b.style.visibility="hidden";for(c=2;c<=a;c++){d=document.getElementById("foldout"+c);d.style.display="none";d.style.visibility="hidden"}}}}function resize_trans_gif(ImageID,TransImageID){if(document.all&&!document.getElementById){eval("document.all."+TransImageID+".width=document.all."+ImageID+".width;");eval("document.all."+TransImageID+".height=document.all."+ImageID+".height;")}else{if(document.getElementById){document.getElementById(TransImageID).width=document.getElementById(ImageID).width;document.getElementById(TransImageID).height=document.getElementById(ImageID).height;if((BrowserData.BrowserType=="IE7"&&BrowserData.BrowserMajorVersion=="7")||(BrowserData.BrowserType=="IE6"&&BrowserData.BrowserMajorVersion=="6")){document.getElementById(TransImageID).parentNode.style.marginLeft="-"+document.getElementById(ImageID).width/2+"px"}}}}var txtWidthID,txtLengthID,txtThicknessID,spanResultMessageTextID,lengthFactor,widthFactor,valWidthID,rfvWidthID,valLengthID,rfvLengthID,valThicknessID,rfvThicknessID,valSummaryID;function ClearBubbleMailerFields(){ClearTextField(document.getElementById(txtLengthID));ClearTextField(document.getElementById(txtThicknessID));ClearTextField(document.getElementById(txtWidthID));ClearValidator(document.getElementById(valWidthID));ClearValidator(document.getElementById(rfvWidthID));ClearValidator(document.getElementById(valLengthID));ClearValidator(document.getElementById(rfvLengthID));ClearValidator(document.getElementById(valThicknessID));ClearValidator(document.getElementById(rfvThicknessID));ClearValidator(document.getElementById(valSummaryID));var a=document.getElementById(spanResultMessageTextID);if(a!=null){a.style.display="none"}}var clientRedirectClicked=false,clientRedirected=false;function ClientRedirect(d,c){try{if(clientRedirectClicked==false&&clientRedirected==false){var a=(window.navigator.userAgent.indexOf("MSIE")>0),b=document.getElementById(c);if(a){if(b){clientRedirectClicked=true;clientRedirected=true;b.href=d;b.click()}}else{clientRedirectClicked=true;clientRedirected=true;window.location.href=d}}if(clientRedirected==true){clientRedirected=false}}finally{clientRedirectClicked=false}}function ConfirmDelete(a){if(confirm(a)){return true}else{return false}}function SearchLinkFromGoButtonKey(g,d,a,f,b,h){var c=document.getElementById(a);if(c!=null){SearchLinkFromKey(g,d,c.value,f,b,h)}}var searchClicked=false,globalSearchPath,globalSearchEntry,globalLinkClientID,globalNoDataPath,globalSearchNotFoundPath;function AutoCompleteSearchLink(b,a,c,d){globalSearchPath=b;globalSearchEntry=escape(a);globalNoDataPath=c;globalSearchNotFoundPath=d;try{if(searchClicked==false){window.setTimeout("SearchLinkFromKeyWithTimeout()",20);return false}else{return true}}finally{searchClicked=false}}function SearchLinkFromKeyWithTimeout(){var b=globalSearchPath,a=globalSearchEntry,c=globalNoDataPath,d=globalSearchNotFoundPath;if(a.trim().length==1){searchClicked=true;window.location.href=d+a}else{if(a.trim()!=""){searchClicked=true;window.location.href=b+a}else{searchClicked=true;window.location.href=c}}}function SearchLinkFromKey(g,k,a,f,h,d){a=escape(a);globalSearchPath=k;globalSearchEntry=a;globalLinkClientID=f;globalNoDataPath=h;globalSearchNotFoundPath=d;try{if(searchClicked==false){if(typeof g!="undefined"){var b=window.event?g.keyCode:g.which;if(b==13){var j=(window.navigator.userAgent.indexOf("MSIE")>0),i=document.getElementById(f);var c=(BrowserData.BrowserName=="Opera");if(j||c){if(a.trim().length==1){searchClicked=true;i.href=d+a;i.click()}else{if(a.trim()!=""){searchClicked=true;i.href=k+a;i.click()}else{searchClicked=true}}}else{window.setTimeout("SearchLinkFromKeyWithTimeout()",20)}return false}else{return true}}else{return true}}else{return true}}finally{searchClicked=false}}function SearchLinkFromButton(g,d,c,e,f){try{if(searchClicked==false){var a=document.getElementById(d),b=document.getElementById(g);if(b!=null&&b.value.trim()!=""){if(b.value.trim().length==1){a.href=f+escape(b.value)}else{a.href=c+escape(b.value)}searchClicked=true}else{}}}finally{searchClicked=false}}var processed=false;function ProcessSearchInput(c,e,d,b){if(!processed){processed=true;var a=document.getElementById(b);if(ValidateCartQuantity(c)==true){a.style.display="none";UpdateViewCartQueryString(c,e,d)}else{a.style.display="block";if(c!=null){document.getElementById(c).focus()}processed=false}}}var viewCartClicked=false;function UpdateViewCartQueryString(b,d,c){var a=(window.navigator.userAgent.indexOf("MSIE")>0);if(viewCartClicked==false&&a){if(document.getElementById(b)!=null){c=c+"&txtQuantity="+document.getElementById(b).value;window.location=c}viewCartClicked=true}else{if(!a){if(document.getElementById(b)!=null){c=c+"&txtQuantity="+document.getElementById(b).value;window.location=c}}}}function SetupExtCalendar(d,g,a,b,h){var i=document.getElementById("associatedcontrolid"+g),f=document.getElementById("associatedcontroltype"+g),c=document.getElementById("associatedcontrolclientid"+g);i.value=a;f.value=b;c.value=h}function ShowHideExtCalender(f,a,b,j){var k=document.getElementById("visiblecalendarid").value,c=document.getElementById(k),h=document.getElementById("calendarvisible"+k),i=document.getElementById("associatedcontrolid"+k),g=document.getElementById("associatedcontroltype"+k),d=document.getElementById("associatedcontrolclientid"+k);i.value=a;g.value=b;d.value=j;h.value="";if(c.style.display=="none"||c.style.display==""){h.value=h.value+"block";c.style.display="block"}else{h.value=h.value+"none";c.style.display="none";f.cancelBubble=true;return false}}function ShowHideCalender(h,n,a,b,m){var d=document.getElementById(n),j=document.getElementById("calendarvisible"+n),g=document.getElementById("calendarleft"+n),k=document.getElementById("calendartop"+n),l=document.getElementById("associatedcontrolid"+n),i=document.getElementById("associatedcontroltype"+n),f=document.getElementById("associatedcontrolclientid"+n);l.value=a;i.value=b;f.value=m;j.value="";if(d.style.display=="none"||d.style.display==""){j.value=j.value+"block";d.style.display="block"}else{j.value=j.value+"none";d.style.display="none";h.cancelBubble=true;return false}var c={x:0,y:0};h=h||window.event;if(h.pageX||h.pageY){c.x=h.pageX;c.y=h.pageY}else{c.x=h.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)-document.documentElement.clientLeft;c.y=h.clientY+(document.documentElement.scrollTop||document.body.scrollTop)-document.documentElement.clientTop}c.y=c.y+10;d.style.left=c.x+"px";d.style.top=c.y+"px";g.value=d.style.left;k.value=d.style.top;h.cancelBubble=true}function SwapCalendars(a,b){HideCalendar(b);ShowCalendar(a);document.getElementById("visiblecalendarid").value=a}function ShowCalendar(a){var c=document.getElementById(a),b=document.getElementById("calendarvisible"+a);c.style.display="block";b.value="block"}function HideCalendar(a){var c=document.getElementById(a),b=document.getElementById("calendarvisible"+a);if(c){c.style.display="none"}if(b){b.value="none"}}function FillData(b,e){var a=(window.navigator.userAgent.indexOf("MSIE")>0),c=document.getElementById("associatedcontrolclientid"+e),f=document.getElementById(c.value),d=document.getElementById("associatedcontroltype"+e);if("textContent" in f){f.textContent=b}else{if("innerText" in f){if(!a){if(d.value.toLowerCase()=="label"){f.innerText=b}else{f.textContent=b}}else{f.innerText=b}}}if("value" in f){f.value=b}HideCalendar(e)}var OPEN_WINDOW_URL,WINDOW_NAME,TOOL_BAR,LOCATION,STATUS,MENU_BAR,SCROLL_BARS,RESIZABLE,WIDTH,HEIGHT;function OpenNewWindowWithDelay(i,j,d,k,b,h,c,e,l,g,a,f){FillWindowProperties(j,d,k,b,h,c,e,l,g,a,f);window.setTimeout("OpenNewWindow()",i)}function FillWindowProperties(i,d,h,k,g,c,b,j,f,a,e){OPEN_WINDOW_URL=i;WINDOW_NAME=d;TOOL_BAR=h;LOCATION=k;DIRECTORIES=g;STATUS=c;MENU_BAR=b;SCROLL_BARS=j;RESIZABLE=f;WIDTH=a;HEIGHT=e}function OpenNewWindow(){var a=window.open(OPEN_WINDOW_URL,WINDOW_NAME,"toolbar="+TOOL_BAR+", location="+LOCATION+", directories="+DIRECTORIES+", status="+STATUS+", menubar="+MENU_BAR+", scrollbars="+SCROLL_BARS+", resizable="+RESIZABLE+", width="+WIDTH+", height="+HEIGHT+"");a.focus()}function ScrollToFirstItem(d,c){var b=document.getElementById(d),a=window.event?c.keyCode:c.which;if(a==40){if(b!=null&&b.length>0&&b.style.display=="block"){b.focus();SelectByIndex(b,0)}}}function FindInArray(h,o,b,p,l,k){var c;var d=document.getElementById(h),m=document.getElementById(o),n=d.value.trim().toUpperCase(),g=document.getElementById(l);c=window.event?k.keyCode:k.which;if(c==13||c==9){keyedChoice=1}if(keyedChoice==0){if(n!=""){m.options.length=0;var j=0;for(var a in b){var f=b[a].trim().toUpperCase();if(f.indexOf(n)==0){AddItemToListBox(o,b[a],a);j++}}if(j>0){if(j>p){m.size=p}else{m.size=j}m.style.display="block";g.style.display="none"}else{m.options.length=0;m.style.display="none";g.style.display="block"}}else{m.style.display="none";g.style.display="block"}}else{keyedChoice=0;m.style.display="none";g.style.display="block"}if(m.options&&m.options.length==1){SelectByIndex(m,0)}}function AddItemToListBox(c,d,a){var b=document.getElementById(c);b.options[b.options.length]=new Option(d,a)}function SelectByIndex(a,c){if(a[c]!=null){try{a.options[c].selected=true}catch(b){a.options[c].setAttribute("selected",true)}}}function FocusOnSearchBox(a,b){if(a!=null&&a.length>0){if(a.selectedIndex==-1){document.getElementById(b).focus();a.selectedIndex=-1}}}var keyedChoice=0;function FillSearchBoxByKey(b,f,h,g,a,c){var d=window.event?g.keyCode:g.which;if(d==13||d==9){FillSearchBox(b,f,h,a,c);keyedChoice=1;document.getElementById(f).focus()}}function FillSearchBox(b,f,g,a,c){var d=document.getElementById(f),e=document.getElementById(g);hdnSearchBox=document.getElementById(c);d.defaultValue=b.options[b.selectedIndex].text;d.value=d.defaultValue;hdnSearchBox.value=d.defaultValue;e.value=b.options[b.selectedIndex].value;e.defaultValue=e.value;d.focus();b.style.display="none";document.getElementById(a).style.display="block"}function UpdatePage(b,k,f,n,h){if(b){var l=b.options[b.selectedIndex].value,d=k[l],c=d.split(n);for(var a=0;a<c.length;a++){var m=c[a].split(h),j=m[0],g=m[1],e=f[j];document.getElementById(e).value=g}}}function ToggleCSS(a,b){document.getElementById(a).href=b}function getCookieValue(b){var a=document.cookie.match(new RegExp("("+b+"=[^;]*)(;|$)"));return a?a[1]:null}function getCookieSubValue(b,c){var d=getCookieValue(b);if(d){var a=d.match(new RegExp("[&=]"+c+"=([^&;]*)"));return a?a[1]:null}}function setCookieSubValue(g,c,d,f){var e=getCookieValue(g),a="",i=new Date();i.setTime(i.getTime());if(f){f=f*1000*60*60*24}var b=new Date(i.getTime()+(f));if(f){a="; expires="+b.toGMTString()}a+="; path=/";if(d!=null){var h=c+"="+d;if(e){if(new RegExp("="+c).test(e)){document.cookie=e.replace(new RegExp("="+c+"=[^&;]*"),"="+h)+a}else{if(new RegExp("&"+c).test(e)){document.cookie=e.replace(new RegExp("&"+c+"=[^&;]*"),"&"+h)+a}else{document.cookie=e.replace(new RegExp("("+g+"=[^;]*)(;|$)"),"$1&"+h)+a}}}else{document.cookie=g+"="+h+a}}else{if(new RegExp("&"+c).test(e)){document.cookie=e.replace(new RegExp("&"+c+"=[^&;]*"),"")+a}}}function replaceAll(c,a,b){var d=c.indexOf(a);while(d>-1){c=c.replace(a,b);d=c.indexOf(a)}return c}function EmailFeedback(a,b,c){window.open("/Ordering/EmailFeedback.aspx?PageID="+a+"&Q="+b+"&a="+c+"","Feedback","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=500,height=500")}function ReplaceContent(a,b){document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"');document.write('width="936" height="1008" id="CustomTags" align="middle">');document.write('<PARAM NAME=FlashVars VALUE="'+a+'">');document.write('<PARAM NAME=movie VALUE="CustomDesigner.swf?ver='+b+'"> <PARAM NAME=loop VALUE=false> <PARAM NAME=menu VALUE=false> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF><PARAM NAME="allowScriptAccess" VALUE="sameDomain" />');document.write('<EMBED src="CustomDesigner.swf?ver='+b+'" FlashVars="'+a+'" loop=false menu=false quality=high allowScriptAccess=sameDomain bgcolor=#FFFFFF  WIDTH="936" HEIGHT="1008" NAME="CustomTags" ALIGN=""');document.write('allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></EMBED>');document.write("</OBJECT>")}function MM_swapImgRestore(){var d,b,c=document.MM_sr;for(d=0;c&&d<c.length&&(b=c[d])&&b.oSrc;d++){b.src=b.oSrc}}function MM_swapImage(){var d,e=0,b,c=MM_swapImage.arguments;document.MM_sr=new Array;for(d=0;d<(c.length-2);d+=3){if((b=MM_findObj(c[d]))!=null){document.MM_sr[e++]=b;if(!b.oSrc){b.oSrc=b.src}b.src=c[d+2]}}}function MM_findObj(a,c){var f,b,e;if(!c){c=document}if((f=a.indexOf("?"))>0&&parent.frames.length){c=parent.frames[a.substring(f+1)].document;a=a.substring(0,f)}if(!(e=c[a])&&c.all){e=c.all[a]}for(b=0;!e&&b<c.forms.length;b++){e=c.forms[b][a]}for(b=0;!e&&c.layers&&b<c.layers.length;b++){e=MM_findObj(a,c.layers[b].document)}if(!e&&document.getElementById){e=document.getElementById(a)}return e}function highlight(a){var b=document.getElementById(a);b.style.textDecoration="underline"}function lolight(a){var b=document.getElementById(a);b.style.textDecoration="none"}function MaxCharacters(c,a){var b=new Number(a);if(c.value.length>b){c.value=c.value.substring(0,b);alert("Only "+a+" characters allowed.")}}function insertInvalidQuantityRow(b,g,a,d){var f,c,e;f=b.lastChild.insertRow(g);for(e=0;e<=a;e++){c=f.insertCell(e)}c.innerHTML=d;c.className="errortext";c.colSpan="5";c.align="left"}function RedirectToPageFromLinkClick(c,b){var a=document.getElementById(c);a.href=b}function RedirectToPageFromLinkKeyEnterNonIE(){window.location.href=RedirPath}var RedirPath;function RedirectToPageFromLinkKeyEnter(g,f,d){if(typeof g!="undefined"){var c=window.event?g.keyCode:g.which;if(c==13){var a=(window.navigator.userAgent.indexOf("MSIE")>0),b=document.getElementById(f);if(a){b.href=d;b.click()}else{RedirPath=d;window.setTimeout("RedirectToPageFromLinkKeyEnterNonIE()",20)}return false}else{return true}}else{return true}}function RedirectToPageByAnyBrowser(b){var a=(window.navigator.userAgent.indexOf("MSIE")>0);if(a){window.location.href=b}else{RedirPath=b;window.setTimeout("RedirectToPageFromLinkKeyEnterNonIE()",10)}}function HandleDimensionSearchFromClick(f,a,d,i,g,c){if(AreDimensionsFilled(f,a,d)){var e="/Product/AdvSearchResult.aspx",k=document.getElementById(a).value.trim(),b=document.getElementById(f).value.trim(),h=document.getElementById(d).value.trim(),j="?Length="+k+"&Width="+b+"&Height="+h,l=e+j+i;RedirectToPageFromLinkClick(c,l)}else{RedirectToPageFromLinkClick(c,g)}}function HandleDimensionSearchFromKeyEnter(i,f,d,c,j,g,b){if(AreDimensionsFilled(f,d,c)){var m="/Product/AdvSearchResult.aspx",l=document.getElementById(d).value.trim(),a=document.getElementById(f).value.trim(),h=document.getElementById(c).value.trim(),k="?Length="+l+"&Width="+a+"&Height="+h,n=m+k+j;return RedirectToPageFromLinkKeyEnter(i,b,n)}else{return RedirectToPageFromLinkKeyEnter(i,b,g)}}function AreDimensionsFilled(d,e,g){var f=false;if(d&&e&&g){if(document.getElementById(d)&&document.getElementById(e)&&document.getElementById(g)){var b=document.getElementById(e).value,c=document.getElementById(d).value,a=document.getElementById(g).value;if(b.trim()!=""||c.trim()!=""||a.trim()!=""){f=true}}}return f}function MaintainBubbleScrollPosition(d,c){if(document.getElementById(d)!=null){var b=document.getElementById(d),a=(window.navigator.userAgent.indexOf("MSIE")>0);if(a){b.href=c;b.click()}else{RedirPath=c;window.setTimeout("RedirectToPageFromLinkKeyEnterNonIE()",20)}}}function HandleBubbleMailerCalc(b,e,j,c,h){var i=document.getElementById(e).value.trim(),a=document.getElementById(b).value.trim(),g=document.getElementById(j).value.trim(),f="&PreValLength="+i+"&PreValWidth="+a+"&PreValThick="+g,d=c+f;RedirectToPageFromLinkClick(h,d)}function HandleBubbleMailerCalcFromKey(j,b,f,l,c,i){var k=document.getElementById(f).value.trim(),a=document.getElementById(b).value.trim(),h=document.getElementById(l).value.trim(),g="&PreValLength="+k+"&PreValWidth="+a+"&PreValThick="+h,d=c+g;return RedirectToPageFromLinkKeyEnter(j,i,d)}function noenter(){return !(window.event&&window.event.keyCode==13)}function SetNoEnterKey(){var b,a;if(BrowserDetect.browser=="Safari"){a=document.getElementsByTagName("input");for(b=0;b<a.length;b++){if(a[b].type=="text"){a[b].onkeypress=function(){return noenter()}}}}}function CheckCreditCardNumber(b,c,a){txtCardNumber=a.Value;a.IsValid=false;if(txtCardNumber.length>12){if(b=="Add"){CheckCreditCardPrefix(c,a)}else{if(b=="Edit"){if(txtCardNumber.substr(1,8)!="********"){txtCardNumber=GetDigits(txtCardNumber);CheckCreditCardPrefix(c,a)}else{a.IsValid=true}}}}}function CheckCreditCardPrefix(b,a){txtCardNumber=a.Value;a.IsValid=false;if(Luhn(txtCardNumber)==true){if(a.Value.substr(0,2)=="34"||a.Value.substr(0,2)=="37"){a.IsValid=true}if(txtCardNumber.substr(0,1)=="4"){a.IsValid=true}if(txtCardNumber.substr(0,2)>="51"&&txtCardNumber.substr(0,2)<="55"){a.IsValid=true}if(txtCardNumber.substr(0,2)=="30"||txtCardNumber.substr(0,2)=="36"||txtCardNumber.substr(0,2)=="38"){a.IsValid=true}if(txtCardNumber.substr(0,4)=="6011"||(txtCardNumber.value.substr(0,4)>="6440"&&txtCardNumber.value.substr(0,4)<="6599")){a.IsValid=true}}}function Luhn(b){var c=0,a;if(b.length<13){return false}for(a=b.length-2;a>=0;a-=2){c+=Array(0,2,4,6,8,1,3,5,7,9)[parseInt(b.charAt(a),10)]}for(a=b.length-1;a>=0;a-=2){c+=parseInt(b.charAt(a),10)}if((c%10)==0){return true}else{return false}}function GetDigits(a){return a.replace(/[^\d]/g,"")}function GetElementOffset(a,b){elementOffset=b.name.indexOf(a);tblElement=b.name.substring(0,elementOffset);tblElement2=tblElement.replace(/\$/g,"_")}function GetRealId(d){var e=new RegExp(d,"g"),a=document.getElementsByTagName("*"),c=0,b;while(b=a[c++]){if(b.id.match(e)){return(b.id)}}return("")}function SetCreditCardType(b,a){if(Luhn(b)){if(b.substr(0,4)!="****"){if(b.substr(0,2)=="34"||b.substr(0,2)=="37"){showCardType("Amex");return 3}if(b.substr(0,1)=="4"){if(b.substr(0,4)=="4486"||b.substr(0,4)=="4614"||b.substr(0,4)=="4716"){if(a&&(a!="en-US")){showCardType("");return 0}showCardType("GSA");return 99}else{showCardType("Visa");return 4}}if(b.substr(0,2)>="51"&&b.substr(0,2)<="55"){if(b.substr(0,4)=="5564"||b.substr(0,4)=="5568"||b.substr(0,4)=="5565"){if(a&&(a!="en-US")){showCardType("");return 0}showCardType("GSA");return 99}else{showCardType("MasterCard");return 5}}if(b.substr(0,4)=="6011"||(b.substr(0,4)>="6440"&&b.substr(0,4)<="6599")||b.substr(0,2)=="30"||b.substr(0,2)=="36"||b.substr(0,2)=="38"||b.substr(0,2)=="35"){if(a&&(a!="en-US")){showCardType("");return 0}showCardType("Discover");return 6}else{showCardType("");return 0}}else{showCardType("");return 0}}}function hidePanel(a){if(a){a.style.display="none"}}function showPanel(b,a){if(b&&a){a.style.display="none"}if(b&&b.checked){a.style.display=""}}function maskCreditCardNumber(e,c){var b="************",d=e.value;if(d!=""){var a=d.substring(d.length-4,d.length);e.value=b+a}}function saveCreditCardDetails(a,b,c){if(a&&a.value!=""){b.value=a.value;if(c&&c.value!=""){c.value=SetCreditCardType(a.value)}}maskCreditCardNumber(a,c)}function ValidateWithLuhn(c,a){if(a.Value!=""&&a.Value.substring(0,1)!="*"){c.innerText="Invalid Credit Card #";a.Value=a.Value.split(" ").join("");var b=getCulture();if(SetCreditCardType(a.Value,b)=="0"){a.IsValid=false}}}function CheckSelectedRB(c,e,a){var d=document.getElementsByTagName("input");for(var b=0;b<d.length;b++){if(d.item(b).type=="radio"){if(d.item(b).id!=c.id){d.item(b).checked=false}else{d.item(b).checked=true;showCreditCardDetails(c)}}}if(e){selectCheckbox()}if(a){clearCardDetails()}}function CheckSelectedRBNew(e,g,a,c){var f=document.getElementsByTagName("input");for(var d=0;d<f.length;d++){if(f.item(d).type=="radio"){if(f.item(d).id!=e.id){f.item(d).checked=false}else{f.item(d).checked=true;showCreditCardDetails(e)}}}if(Page_Validators!=undefined&&Page_Validators!=null){for(var b=0;b<Page_Validators.length;b++){if(c==null||Page_Validators[b].id!=c.id){document.getElementById(Page_Validators[b].id).style.visibility="hidden"}else{if(!document.getElementById(Page_Validators[b].id).IsValid){document.getElementById(Page_Validators[b].id).style.visibility="visible"}}}}if(g){selectCheckbox()}if(a){clearCardDetails()}}function updateStyle(a){a.className="creditCardImage"}function validatePolyTubingCalc(g){var a=0;var b=0;if(document.getElementById("__SCROLLX")){a=document.getElementById("__SCROLLX").value}if(document.getElementById("__SCROLLY")){b=document.getElementById("__SCROLLY").value}var d=window.location.href,h="d=",e="r",c="i",f="";if(d.indexOf("?")>0){d=d.substring(0,d.indexOf("?"))}if(document.getElementById("txtDiameter").value==""){h+=e}if(h.length==2){if(isNaN(document.getElementById("txtDiameter").value)){h+=c}}if(h.length>2){f+=h}if(f.length>0){d+="?"+f+"&xPos="+a+"&yPos="+b}else{d+="?d="+document.getElementById("txtDiameter").value+"&xPos="+a+"&yPos="+b}window.location.href=d}function validateBubbleMailerCalc(g){var d=window.location.href,h="w=",f="l=",b="t=",e="r",c="i",a="";if(d.indexOf("?")>0){d=d.substring(0,d.indexOf("?"))}if(document.getElementById("txtWidth").value==""){h+=e}if(document.getElementById("txtLength").value==""){f+=e}if(document.getElementById("txtThickness").value==""){b+=e}if(h.length==2&&f.length==2&&b.length==2){if(isNaN(document.getElementById("txtWidth").value)){h+=c}if(isNaN(document.getElementById("txtLength").value)){f+=c}if(isNaN(document.getElementById("txtThickness").value)){b+=c}}if(h.length>2){a+=h}if(f.length>2){if(a.length>0){a+="&"+f}else{a+=f}}if(b.length>2){if(a.length>0){a+="&"+b}else{a+=b}}if(a.length>0){d+="?"+a}else{d+="?w="+document.getElementById("txtWidth").value+"&l="+document.getElementById("txtLength").value+"&t="+document.getElementById("txtThickness").value}window.location.href=d}function submitenter(a,f,b,c){var d;if(window.event){d=window.event.keyCode}else{if(f){d=f.which}else{return true}}if(d==13){if(c=="poly"){validatePolyTubingCalc(b)}else{if(c=="bubble"){validateBubbleMailerCalc(b)}}return false}else{return true}}function DisplayLoadingWindow(){DisplayModalWindow("processMessage")}function DisplayModalWindow(b){ControlSELECTItems("disable");var d=$(".progressBackgroundFilter:first");if(d.length==0){d=$("<div/>");d.addClass("progressBackgroundFilter");$("form").append(d)}d.css("display","");var c=document.getElementById(b);if(c==null){c=document.createElement("div");c.id=b;var a=document.createElement("img");a.setAttribute("src","/images/loading.gif");a.setAttribute("style","vertical-align: middle");a.setAttribute("alt","Processing");a.setAttribute("title","Processing");c.appendChild(a);c.appendChild(document.createTextNode(" Updating ..."));document.forms[0].appendChild(c)}c.style.zIndex="1001";c.setAttribute("class","modalPopup");c.style.display=""}function HideLoadingWindow(){HideModalWindow("processMessage")}function HideModalWindow(a){$(".progressBackgroundFilter").css("display","none");$("#"+a).css("display","none");ControlSELECTItems("enable")}function ControlSELECTItems(a){var b=(BrowserData.BrowserName=="IE"&&BrowserData.BrowserVersion<7);if(b){if(a=="disable"){$("SELECT").css({visibility:"hidden"})}else{$("SELECT").css({visibility:"visible"})}}}function GetQueryStringCollection(){var b={},d=decodeURI(location.search);if(!d){return{}}d=d.substring(1);var a=d.split("&");for(var e=0;e<a.length;e++){var c=a[e].split("=");b[c[0]]=c[1]}b.toString=function(){if(b.length==0){return""}var g="?";for(var f in b){g+=f+"="+b[f]}return g};return b}function UlineScroll_Saver_GetPosition(){var a,b;if(document.all){if(!document.documentElement.scrollLeft){a=document.body.scrollLeft}else{a=document.documentElement.scrollLeft}if(!document.documentElement.scrollTop){b=document.body.scrollTop}else{b=document.documentElement.scrollTop}}else{a=window.pageXOffset;b=window.pageYOffset}document.getElementById("__SCROLLX").value=a;document.getElementById("__SCROLLY").value=b}function UlineScroll_Saver_SetPosition(){var a=document.getElementById("__SCROLLX").value;var b=document.getElementById("__SCROLLY").value;if(b>0){window.scrollTo(a,b)}}function Uline_SetScrollPosition(a,b){window.scrollTo(a,b)}function FormatUSPhone(d,c){if(typeof c!="undefined"){if(DetectAndroid()){return}var b=window.event?c.keyCode:c.which;if(b==9||b==16||(32<b&&41>b)){return}}var e=d.value.replace(/\D/g,"");var a=e.length;if(a==0){d.value=""}else{if(a==1||a==2){d.value="("+e}else{if(a==3){d.value="("+e.substring(0,3)+") "}else{if(a<=5){d.value="("+e.substring(0,3)+") "+e.substring(3)}else{if(a==6){d.value="("+e.substring(0,3)+") "+e.substring(3)+"-"}else{if(a<=10){d.value="("+e.substring(0,3)+") "+e.substring(3,6)+"-"+e.substring(6)}else{if(a>10){d.value="("+e.substring(0,3)+") "+e.substring(3,6)+"-"+e.substring(6,10)}}}}}}}}function DetectAndroid(){return navigator.userAgent.match(/Android/i)==null?false:true}function PhoneBackspaceHandler(d,c){if(typeof c!="undefined"){var b=window.event?c.keyCode:c.which;var a=d.value.length;if(b==8&&a>3){if(d.value.substring(a-2)==") "){d.value=d.value.substring(0,a-2)}else{if(d.value.substring(a-1)=="-"){d.value=d.value.substring(0,a-1)}}}}}function IsNumberPhone(b){if(typeof b!="undefined"){var a=window.event?b.keyCode:b.which;if(b.ctrlKey){return true}if(a==8||a==9||a==17||(32<a&&41>a)||a==46){return true}if((a<48||a>57)&&(a<96||a>105)){return false}else{return true}}}function SetDefaultFocus(a){var b=$("#"+a);if(b!=null&&b.length>0&&$(window).scrollTop()<=b.offset().top){b.focus()}}function DisplaySiteSelection(a){var b=$("#ClientIPAddress").val();var c=$("#CountryCode").val();if(c=="US"){$.ajax({type:"POST",url:"/WebServices/CommonWebService.asmx/DisplayCountrySelection",data:'{IPAddress:"'+b+'",CountryCode:"'+c+'"}',contentType:"application/json; charset=utf-8",dataType:"json",success:function(g){if(g.d=="True"){var d=$("#"+a);var f=$(window).height();var e=$(document).width();d.css({left:e/2-(d.width()/2),top:f/2-(d.height()/2)});DisplayModalWindow(d.attr("id"))}}})}}function SubmitCartToPunchout(a){theForm.action=a;theForm.submit();return false}function PasteFromClipboard(a){var c=document.getElementById(a);c.focus();if(c.createTextRange){var b=c.createTextRange();b.execCommand("paste")}}function CheckMaxRows(f,c,a,b){var d=window.event?f.keyCode:f.which;var g=c.value.replace(/\n\n/g,"\n").split("\n");if(g.length>a||(g.length==a&&d==13)){if(typeof b=="function"){b(a)}else{alert("Max "+a+" rows")}c.value=g.slice(0,a).join("\n").trim();f.returnValue=false;return false}return true}function ClearValidators(){for(var a=0;a<Page_Validators.length;a++){Page_Validators[a].style.display="none"}}function TrackEvent(a){if(typeof _gaq!="undefined"){_gaq.push(["_trackPageview",a])}}function TrackPageEvent(c,b,a){if(typeof _gaq!="undefined"){_gaq.push(["_trackEvent",c,b,a])}}function initializeHelpPopup(a){$(".help-popup a").hover(function(){var e=$(this).children().offset();var f=$(this).parent().find("#divImage2");var k=$(this).parent().find("#divImage3");var g=$(this).parent().find("#divImage4");var j=$(this).parent().find("#shadowContainer");var c=j[0];var o=16;var n=16;var l="L";var h="T";var i=j;var p;var d;var b;if(a==true){b="350"}else{b=j.width()}b=parseInt(b)-3;e.top=e.top-3;e.left=e.left-3;if((e.left+b)-$(window).scrollLeft()<$(window).width()&&(e.top+j.height())-$(window).scrollTop()<$(window).height()){l="L";h="T"}else{if((e.left+b)-$(window).scrollLeft()>$(window).width()){if(e.left+n-b-$(window).scrollLeft()<0){l="L"}else{popupHeight=$(this).next("em").children(0).width();e.left=e.left+n-b+7;l="R"}}if((e.top+j.height())-$(window).scrollTop()>$(window).height()){if(e.top+o-j.height()-$(window).scrollTop()<0){h="T"}else{e.top=e.top+o-j.height()+6;h="B"}}}var m=0;if($("[id$=container]").hasClass("MasterContainer")){m=$(".MasterContainer").offset().left}if(l=="L"&&h=="T"){$(f).css("visibility","visible");$(f).children().css("visibility","visible");$(f).css("margin-left","0px");$(f).show();$(k).css("visibility","hidden");$(k).children().css("visibility","hidden");e.left=(e.left+1-(n-$(f).children().find("img").attr("width"))/2)-m;e.top=e.top+1;$(g).css("visibility","hidden");$(g).children().css("visibility","hidden")}else{if(l=="L"&&h=="B"){$(g).children().css("visibility","hidden");$(g).css("visibility","hidden");$(f).children().css("visibility","hidden");$(f).css("visibility","hidden");$(k).css("visibility","visible");$(k).children().css("visibility","visible");$(k).css("margin-left","3px");e.left=(e.left+1-(n-$(g).children().find("img").attr("width"))/2)-m;e.top=e.top+1;$(k).show()}else{if(l=="R"){if(h=="B"){$(g).children().css("visibility","hidden");$(g).css("visibility","hidden");$(f).children().css("visibility","hidden");$(f).css("visibility","hidden");$(k).css("visibility","visible");$(k).children().css("visibility","visible");$(k).css("margin-left",(b-20));e.top=e.top+1;e.left=(e.left-1-(n-$(g).children().find("img").attr("width"))/2)-m;$(k).show()}else{$(f).children().css("visibility","hidden");$(f).css("visibility","hidden");$(k).children().css("visibility","hidden");$(k).css("visibility","hidden");$(g).css("height","16px");$(g).css("visibility","visible");$(g).children().css("visibility","visible");e.top=e.top+1;e.left=(e.left-1-(n-$(g).children().find("img").attr("width"))/2)-m;$(g).show()}}}}i.css("top",e.top);i.css("left",e.left);i.fadeIn()},function(){$(this).parent().find("#shadowContainer").stop(true,true).hide()});$(".help-popup a").parent().find("#shadowContainer").hover(function(){$(this).delay(300);var b=500;$(this).fadeIn(b)},function(){$(this).stop(true,true).hide()})}$(document).ready(function(){$("#toggleImage1").click(function(){$(".ll_left").toggleClass("ll_center");$(".ll_left_indent").toggleClass("ll_center")});$("#toggleImage2").click(function(){$(".ll_left").toggleClass("ll_center");$(".ll_left_indent").toggleClass("ll_center")})});function SetUpPopup(){$(".breadcrumbs").css("display","none");$("a[href]").attr("href",function(){var a=$(this).attr("href").toLowerCase();if(a.indexOf("ordering")==-1&&a.indexOf("product")==-1){return"#"}else{return a}});$("a[href]").attr("href",function(){var a=$(this).attr("href");if(a.indexOf("#")!=-1||a.indexOf("javascript")!=-1||a.indexOf("(")!=-1){return a}else{if(a.indexOf("?")>0){return a+"&popup=yes"}else{return a+"?popup=yes"}}})}function ToggleFoldOut(a){$("#"+a).toggle()}function chat(){window.open("/CustomerService/chat_window.aspx","custclient","width=600,height=310,scrollbars=0")}function nochat(){window.open("/CustomerService/ContactUS_window.aspx?Location=chatunavailable&Popup=Y","ContactWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=478,height=600")};
