1var WSM={'env':{'url':{'frontend':'https://duramaxtuner.com','frontend_secure':'https://duramaxtuner.com','admin':'https://duramaxtuner.com/admin','admin_secure':'https://duramaxtuner.com/admin','path_prefix':''},'tag':'cps','admin':!1},'config':{'item_display':'dealer'}};if(!this.JSON){JSON=function(){function f(n){return n<10?'0'+n:n} 2Date.prototype.toJSON=function(key){return this.getUTCFullYear()+'-'+f(this.getUTCMonth()+1)+'-'+f(this.getUTCDate())+'T'+f(this.getUTCHours())+':'+f(this.getUTCMinutes())+':'+f(this.getUTCSeconds())+'Z'};var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapeable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function quote(string){escapeable.lastIndex=0;return escapeable.test(string)?'"'+string.replace(escapeable,function(a){var c=meta[a];if(typeof c==='string'){return c} 3return'\\u'+('0000'+(+(a.charCodeAt(0))).toString(16)).slice(-4)})+'"':'"'+string+'"'} 4function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==='object'&&typeof value.toJSON==='function'){value=value.toJSON(key)} 5if(typeof rep==='function'){value=rep.call(holder,key,value)} 6switch(typeof value){case 'string':return quote(value);case 'number':return isFinite(value)?String(value):'null';case 'boolean':case 'null':return String(value);case 'object':if(!value){return'null'} 7gap+=indent;partial=[];if(typeof value.length==='number'&&!(value.propertyIsEnumerable('length'))){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||'null'} 8v=partial.length===0?'[]':gap?'[\n'+gap+partial.join(',\n'+gap)+'\n'+mind+']':'['+partial.join(',')+']';gap=mind;return v} 9if(rep&&typeof rep==='object'){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==='string'){v=str(k,value,rep);if(v){partial.push(quote(k)+(gap?': ':':')+v)}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value,rep);if(v){partial.push(quote(k)+(gap?': ':':')+v)}}}} 10v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+mind+'}':'{'+partial.join(',')+'}';gap=mind;return v}} 11return{stringify:function(value,replacer,space){var i;gap='';indent='';if(typeof space==='number'){for(i=0;i<space;i+=1){indent+=' '}}else if(typeof space==='string'){indent=space} 12rep=replacer;if(replacer&&typeof replacer!=='function'&&(typeof replacer!=='object'||typeof replacer.length!=='number')){throw new Error('JSON.stringify')} 13return str('',{'':value})},parse:function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==='object'){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}} 14return reviver.call(holder,key,value)} 15cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return'\\u'+('0000'+(+(a.charCodeAt(0))).toString(16)).slice(-4)})} 16if(/^[\],:{}\s]*$/.test(text.replace(/\\["\\\/bfnrtu]/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof reviver==='function'?walk({'':j},''):j} 17throw new SyntaxError('JSON.parse')}}}()} 18if(typeof WSM=='undefined'){WSM={}} 19WSM.Util={};WSM.Ajax={};WSM.Category={};WSM.Brand={};WSM.Interface={};WSM.Survey={};WSM.Widget={};WSM.Messages={};WSM.Tracking={};WSM.Locator={};WSM.Attribute={};WSM.Chart={};if(typeof WSM.Affirm=='undefined'){WSM.Affirm={}} 20WSM.Attribute.isSelected=function(match,callback){var attributes={'values':[]};var matchCount=0;for(var i in match){if(isNaN(parseInt(match[i]))){match[i]=match[i].toLowerCase()}} 21if(cookie=jQuery.parseJSON(jQuery.cookie('product_filter'))){for(var attributeGroupId in cookie.attributes){var labels=cookie.attributes[attributeGroupId];for(var labelId in labels){var matched=!1;var value=labels[labelId].name;var valueId=labels[labelId].id;var label=labels[labelId].label_name;if($.inArray(label.toLowerCase(),match)!==-1){matchCount++;matched=!0}else if($.inArray(parseInt(labelId),match)!==-1||$.inArray(labelId,match)!==-1){matchCount++;matched=!0} 22attributes.values.push({'valueId':valueId,'value':value,'label':label,'labelId':labelId,'matched':matched})}}}else if(cookie=jQuery.parseJSON(jQuery.cookie('ymm_sticky'))){if(optionsCookie=$.parseJSON(jQuery.cookie('options_sticky'))){for(var i in optionsCookie){cookie.push(optionsCookie[i])}} 23for(var attribute in cookie){for(var label in cookie[attribute])break;var matched=!1;var value=cookie[attribute][label];if($.inArray(label.toLowerCase(),match)!==-1){matchCount++;matched=!0} 24attributes.values.push({'value':value,'label':label,'matched':matched})}} 25attributes.isSelected=matchCount==match.length;if(typeof callback=='function'){callback(attributes)}else{return attributes.isSelected}} 26WSM.Util.floatToInt=function(price){if(!price){return'00'} 27decimal=price.toString().split('.')[1];number=price.toString().split('.')[0];if(!decimal){decimal='00'}else if(decimal.length==1){decimal=decimal+'0'} 28return number+decimal} 29WSM.Util.escapeHtml=function(text){return text.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/'/g,''').replace(/"/g,'"')} 30WSM.Util.getCookie=function(name,defaultValue){var cookie=document.cookie;var crumbs=cookie.split(/;[ ]?/);for(var i=0,e=crumbs.length;i!=e;++i){var data=crumbs[i].split('=',2);if(data[0]==name) 31return data[1]} 32return defaultValue} 33WSM.Util.setCookie=function(name,value,mins){document.cookie=name+'='+value+(!isNaN(parseFloat(mins))&&isFinite(mins)?'; expires='+new Date((new Date).getTime()+mins*60000).toUTCString():'')} 34WSM.Util.cookieDejaOverlay=function(cookieDejaOverlayData){jQuery(document).ready(function(){var cookie=document.cookie;var cookieCheck=/dejavu=alreadySeen/;if(cookieCheck.test(cookie)){$('#overlay').css('display','none')}else{$('#overlay').css('display','none');$('#dds_master_wrapper').append(cookieDejaOverlayData)}})} 35WSM.Util.cookieDeja=function(inputJHTML){jQuery(document).ready(function(){if(WSM.Util.cookieDejaOverlay(inputJHTML)){var cookie=document.cookie;var cookieCheck=/http/;if(cookieCheck.test(cookie)){$('#overlay').css({"height":"0px","width":"0px","display":"none","visibility":"hidden","top":"-10000px","left":"-10000px"});$('#overlay').hide()}else{alert('this section of the function was infact called.');jQuery(document).ready(function(){setTimeout(function(){$("#overlay").overlay({top:150,mask:{color:'#000',loadSpeed:500,opacity:0.8},closeOnClick:!0,load:!0})},3000)})}}})} 36WSM.Util.cookieDejaClick=function(){WSM.Util.setCookie('deja',window.location.href);WSM.Util.setCookie('dejavu','alreadySeen')} 37WSM.Util.maxChars=function(textObj,displayId,max){if(!max||max<0) 38max=200;if(textObj.value.length>max)
39textObj.value=textObj.value.substring(0,max);else if(displayId) 40$('#'+displayId).text(max-textObj.value.length);} 41WSM.Util.multiSelectToggle=function(){if($(this).parent().hasClass('disabled')) 42return!1;if($(this).parent().hasClass('selected')){$(this).parent().children('input').attr('checked',!1);$(this).parent().removeClass('selected')}else{$(this).parent().children('input').attr('checked',!0);$(this).parent().addClass('selected')} 43return} 44WSM.Util.isArray=function(value){return value&&(value instanceof Array||typeof value=='array')} 45WSM.Util.rot13=function(text){var A='A'.charCodeAt(0);var a='a'.charCodeAt(0);var Z='Z'.charCodeAt(0);var z='z'.charCodeAt(0);var result='';for(var i=0;i<text.length;++i){var c=text.charCodeAt(i);if(c>=A&&c<=Z){if(c-A>=13) 46result+=String.fromCharCode(c-13);else result+=String.fromCharCode(c+13)}else if(c>=a&&c<=z){if(c-a>=13) 47result+=String.fromCharCode(c-13);else result+=String.fromCharCode(c+13)}else{result+=text.charAt(i)}} 48return result} 49WSM.Util.addBookmark=function(title,url){if(!title) 50title=jQuery('head title').text();if(!url) 51url=document.location.href;if(window.sidebar){window.sidebar.addPanel(title,url,'')}else if(window.external){window.external.AddFavorite(url,title)}else if(window.opera&&window.print){var elem=document.createElement('a');elem.setAttribute('href',url);elem.setAttribute('title',title);elem.setAttribute('rel','sidebar');elem.click()}} 52WSM.Util.nice=function(str){str=str.replace(/\(tm\)/g,'\u2122');str=str.replace(/\(r\)/g,'\u00AE') 53str=str.replace(/\(sm\)/g,'\u2120');str=str.replace(/\(delta\)/g,'\u0394');str=str.replace(/\(gamma\)/g,'\u0393');str=str.replace(/\(epsilon\)/g,'\u0395');str=str.replace(/\(sigma\)/g,'\u03A3');return str} 54WSM.Util.numericOnly=function(obj,ev,decimals){var key=ev.keyCode;if(key>=65&&key<=90){return!1}else if((key>=106&&key<=109)||key==111){return!1}else if(key>=186&&key<=189){return!1}else if(key==191||key==192){return!1}else if(key>=219&&key<=222){return!1}else if(key==110||key==190){if(!decimals){return!1}else if(jQuery(obj).val().indexOf('.')!=-1){return!1}} 55return!0} 56WSM.Util.currency=function(amount){var currency=parseFloat(amount);return'$'+Math.abs(currency).toFixed(2)} 57WSM.Util.sign=function(amount){return(amount<0?'-':'+')} 58WSM.Survey.submitAnswers=function(surveyId){var survey=document.getElementById('wsm_survey_'+surveyId+'_form');var answers={'id':'','values':{}};for(var i=0;i<survey.elements.length;i++){var entry=survey.elements[i];if(entry.nodeName.toLowerCase()=='input'){if(!entry.value||entry.value=='') 59continue;switch(entry.getAttribute('type')){case 'radio':if(entry.checked) 60answers.values[entry.getAttribute('name')]=entry.value;break;case 'text':answers.values[entry.getAttribute('name')]=entry.value;break;case 'hidden':if(entry.getAttribute('name')=='wsm_survey_number') 61answers.id=entry.value;break;default:break}}else if(entry.nodeName.toLowerCase()=='select'){answers.values[entry.getAttribute('name')]=entry.value}} 62if(!answers.id){alert('Unable to access survey information.');return} 63var footer=document.getElementById('wsm_survey_'+answers.id+'_footer');var buttons=footer.getElementsByTagName('button');if(footer&&buttons){for(var i=0;i<buttons.length;i++) 64buttons[i].setAttribute('disabled',!0);} 65WSM.Ajax.request('Survey.submit',answers,function(response){var footer=document.getElementById('wsm_survey_'+response.id+'_footer');var survey=document.getElementById('wsm_survey_'+response.id+'_form');if(!survey){alert('Unable to access survey information.');return} 66var error=document.getElementById('wsm_survey_'+response.id+'_error');if(error.firstChild){error.removeChild(error.firstChild);error.style.display='none'} 67if(response.error){error.appendChild(document.createTextNode(response.error));error.style.display='';return} 68if(!response.response){error.appendChild(document.createTextNode('Invalid survey result information.'));error.style.display='';return} 69var list=document.getElementById('wsm_survey_'+response.id+'_list');if(!list){error.appendChild(document.createTextNode('Unable to access survey question listing.'));error.style.display='';return} 70while(l=list.firstChild) 71list.removeChild(l);for(var i=0;i<response.response.length;i++){var question=document.createElement('div');question.className='wsm_survey_question';var label=document.createElement('label');label.appendChild(document.createTextNode(response.response[i].text));question.appendChild(label);for(j=0;j<response.response[i].choices.length;
71j++){var choice=document.createElement('div');choice.className='wsm_survey_result';choice.appendChild(document.createTextNode(response.response[i].choices[j]));question.appendChild(choice)} 72list.appendChild(question)} 73while(c=footer.firstChild) 74footer.removeChild(c);footer.appendChild(document.createTextNode(response.total))})} 75WSM.Ajax._session=WSM.Util.getCookie('wsmsess');WSM.Ajax._csrf=null;WSM.Ajax.csrfToken=function(){if(WSM.Ajax._csrf===null){var meta=document.querySelector('meta[name="csrf-token"]');WSM.Ajax._csrf=meta?(meta.getAttribute('content')||''):''} 76return WSM.Ajax._csrf};WSM.Ajax._tokenFromRefusal=function(req){try{var body=JSON.parse(req.responseText);return(body&&typeof body.csrf_token=='string')?body.csrf_token:''}catch(e){return''}};WSM.Ajax.submit=function(request,params,callback,timeout,beforeReq,eh,form){WSM.Ajax.request(request,params,callback,timeout,beforeReq,eh,!0)} 77WSM.Ajax.request=function(request,params,callback,timeout,beforeReq,eh,form,retried){if(typeof form=='undefined'||!form){form=!1}else{form=!0} 78var str=JSON.stringify({'request':request,'session':WSM.Ajax._session,'csrf_token':WSM.Ajax.csrfToken(),'params':form?jQuery(params).serialize():params});var url;var https=window.location.protocol=='https:';if(WSM.env.admin) 79url=WSM.env.url.admin_secure+'?view=api.index&'+(new Date().format('yyyymmddHHMMss'));else url=(https?WSM.env.url.frontend_secure:WSM.env.url.frontend)+'/api?'+(new Date().format('yyyymmddHHMMss'));WSM.Ajax.requestObj=$.ajax({'async':!0,'cache':!1,'contentType':form?'application/x-www-form-urlencoded':'application/json','dataType':'json','data':str,'timeout':timeout,'beforeSend':function(){if(typeof beforeReq=='function'){beforeReq()}},'error':function(req,st,ex){if(st=='abort'){return} 80if(req&&req.status==403&&!retried){var fresh=WSM.Ajax._tokenFromRefusal(req);if(fresh){WSM.Ajax._csrf=fresh;return WSM.Ajax.request(request,params,callback,timeout,beforeReq,eh,form,!0)}} 81WSM.Ajax.closeMessageBox();if(req&&req.status==0&&req.readyState==4){return} 82if(eh){return eh(req,st,ex)} 83var error;if(st=='timeout'){error='request timed out'}else if(st=='parsererror'){error='malformed response from server'}else if(ex){error=ex.name+' ('+ex.message+')'}else{error=st} 84if(typeof console!="undefined"){console.log('An error occurred while processing a request: '+error)}else{alert('An error occurred while processing a request: '+error)} 85throw 'API HTTP Error: '+error},'success':function(result){WSM.Ajax.closeMessageBox();if(result.status=='error'){if(eh){return eh(WSM.Ajax.requestObj,'error',result.error)} 86if(typeof console!="undefined"){console.log('An error occurred while processing a request:\nREQUEST:'+request+'\nPARAMS:'+JSON.stringify(params)+'\nERROR:'+result.error)}else{alert('An error occurred while processing a request:\nREQUEST:'+request+'\nPARAMS:'+JSON.stringify(params)+'\nERROR:'+result.error)} 87throw 'API Exception: '+result.error}else if(callback){try{callback(result.result)}catch(e){if(typeof console!="undefined"){console.log('An error occurred while processing a request callback:\nREQUEST:'+request+'\nPARAMS:'+JSON.stringify(params)+'\nERROR:'+e)}else{alert('An error occurred while processing a request callback:\nREQUEST:'+request+'\nPARAMS:'+JSON.stringify(params)+'\nERROR:'+e)}}}},'type':'POST','url':url});return WSM.Ajax.requestObj} 88WSM.Ajax.messageInit=!1;WSM.Ajax.openMessageBox=function(message,timeout){const control=$('#wsm_ajax_message_box').length;if(!control){var container=document.createElement('div');jQuery(container).attr('id','wsm_ajax_message_box');jQuery(container).addClass('wsm_interface_ajax_loader');container.style.pointerEvents='none';jQuery(container).hide();var dialog=document.createElement('div');jQuery(dialog).html(message);jQuery(container).append(dialog);jQuery(container).css('top',($(window).scrollTop()+$(window).height()/2-$(dialog).height()/2)+'px');jQuery('body').prepend(container);jQuery(container).fadeIn();if(!WSM.Ajax.messageInit){jQuery(window).scroll(function(){var container=jQuery('#wsm_ajax_message_box');var dialog=jQuery('#wsm_ajax_message_box div');if(!container) 89return;container.css('top',($(window).scrollTop()+$(window).height()/2-dialog.height()/2)+'px')});WSM.Ajax.messageInit=!0} 90if(timeout) 91setTimeout(WSM.Ajax.closeMessageBox,timeout);}} 92WSM.Ajax.closeMessageBox=function(){var container=jQuery('#wsm_ajax_message_box');if(!container.length) 93return;container.remove()} 94WSM.Interface.FieldSet=function(){this.rules={};this.messages={};this.addField=function(name,rule,value,message){if(!this.rules[name]) 95this.rules[name]={};if(!this.messages[name]) 96this.messages[name]={};this.rules[name][rule]=value;this.messages[name][rule]=message}} 97WSM.Interface.GetFields=function(){var fields=new WSM.Interface.FieldSet();var elements=$('.wsm_interface_form :input[id][name]');for(var i=0;i<elements.length;++i){var match=/^form\[(\w+)\]$/.exec(jQuery(elements[i]).attr('name'));if(!match) 98continue;if(jQuery(elements[i]).hasClass('required')) 99fields.addField('form['+match[1]+']','required',!0,'Required');switch(match[1]){case 'email':break;case 'password':case 'password1':fields.addField('form['+match[1]+']','minlength',4,'Password must be at least 4 characters long');break;case 'password2':fields.addField('form['+match[1]+']','minlength',4,'Password must be at least 4 characters long');fields.addField('form['+match[1]+']','equalTo','#wsm_form_password1','Passwords do not match');break;default:break}} 100return fields} 101WSM.Interface.AddValidator=function(){jQuery(document).ready(function(){var fields=WSM.Interface.GetFields();jQuery('.wsm_interface_form').validate({errorElement:'div',errorClass:'wsm_interface_required',errorPlacement:function(error,element){jQuery('#'+element.attr('id')+'_error').empty();error.appendTo('#'+element.attr('id')+'_error')},rules:fields.rules,messages:fields.messages})})} 102WSM.Media={};WSM.Media.Fallback=function(media){while(media.firstChild){if(media.firstChild instanceof HTMLSourceElement){media.removeChild(media.firstChild)}else{media.parentNode.insertBefore(media.firstChild,media)}} 103media.parentNode.removeChild(media)};const WSM_CHART_COLORS_OPAQUE={GREEN:'rgba(0, 127, 0, 1.0)',BLUE:'rgba(0, 0, 127, 1.0)',RED:'rgba(127, 0, 0, 1.0)',BLACK:'rgba(0, 0, 0, 1.0)',BRIGHT_RED:'rgba(255, 0, 0, 1.0)',BRIGHT_GREEN:'rgba(0, 255, 0, 1.0)',BRIGHT_BLUE:'rgba(0, 0, 255, 1.0)',CYAN:'rgba(0, 127, 255, 1.0)',VIOLET:'rgba(127, 0, 255, 1.0)',GREY:'rgba(127, 127,127, 1.0)',WHITE:'rgba(255, 255, 255, 1.0)'};const WSM_CHART_COLORS_TRANSLUCENT={GREEN:'rgba(0, 127, 0, 0.5)',BLUE:'rgba(0, 0, 127, 0.5)',RED:'rgba(127, 0, 0, 0.5)',BLACK:'rgba(0, 0, 0, 0.5)',BRIGHT_RED:'rgba(255, 0, 0, 0.5)',BRIGHT_GREEN:'rgba(0, 255, 0, 0.5)',BRIGHT_BLUE:'rgba(0, 0, 255, 0.5)',CYAN:'rgba(0, 127, 255, 0.5)',V
103IOLET:'rgba(127, 0, 255, 0.5)',GREY:'rgba(127, 127,127, 0.5)',WHITE:'rgba(255, 255, 255, 0.5)'};const WSM_CHART_COLOR_CLEAR='rgba(255, 255, 255, 0)';WSM.Chart.Colors={};WSM.Chart.Colors.Opaque=WSM_CHART_COLORS_OPAQUE;WSM.Chart.Colors.Translucent=WSM_CHART_COLORS_TRANSLUCENT;WSM.Chart.Colors.CLEAR=WSM_CHART_COLOR_CLEAR;let currencyTickCallback=function(value){let options={style:'currency',currency:'USD',currencyDisplay:'symbol',minimumFractionDigits:0,maximumFractionDigits:0};let number=new Number(value);return number.toLocaleString('en-US',options)} 104let numericTickCallback=function(value){let number=new Number(value);return number.toLocaleString('en-US')} 105WSM.Chart.drawLineChart=function(config){let colorKeys=Object.keys(WSM.Chart.Colors.Opaque);for(let i=0;i<config.dataSets.length;i++){let currentColor=colorKeys[i%colorKeys.length];if(config.dataSets[i].borderColor===undefined){config.dataSets[i].borderColor=WSM.Chart.Colors.Opaque[currentColor]} 106if(config.dataSets[i].pointBackgroundColor===undefined){config.dataSets[i].pointBackgroun
106dColor=WSM.Chart.Colors.Opaque[currentColor]} 107config.dataSets[i].backgroundColor=config.dataSets[i].pointBackgroundColor;config.dataSets[i].borderWidth=0;config.dataSets[i].fill=!1} 108let settings={type:'line',data:{labels:config.axisLabels,datasets:config.dataSets},options:{maintainAspectRatio:config.maintainAspect,scales:{yAxes:[{ticks:{beginAtZero:!config.relativeYScale},}],xAxes:[{gridLines:{display:!0},ticks:{autoSkip:!1,minRotation:40}}]},tooltips:{mode:'index',intersect:!1,backgroundColor:WSM.Chart.Colors.Translucent.BLACK,bodySpacing:8,titleMarginBottom:15,callbacks:{label:function(tooltipItem,data){let label=data.datasets[tooltipItem.datasetIndex].label;let value=data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index];if(label!==undefined&&value!==undefined){if(config.yAxisFormat=='currency'){value=currencyTickCallback(value)}else if(config.yAxisFormat=='raw'){}else{value=groupDigitsTickCallback(value)}} 109if(!config.tipSuffix){config.tipSuffix=''} 110return label+': '+value+config.tipSuffix}}},elements:{line:{tension:0,borderWidth:2,backgroundColor:WSM.Chart.Colors.CLEAR},point:{radius:2,hitRadius:20}}}};switch(config.yAxisFormat){case 'currency':settings.options.scales.yAxes[0].ticks.callback=currencyTickCallback;break;case 'raw':break;default:settings.options.scales.yAxes[0].ticks.callback=groupDigitsTickCallback;break} 111if(!!config.yAxisLabel){settings.options.scales.yAxes[0].scaleLabel={display:!0,labelString:config.yAxisLabel}} 112if(!!config.xAxisLabel){settings.options.scales.xAxes[0].scaleLabel={display:!0,labelString:config.xAxisLabel}} 113let canvas=document.getElementById(config.canvasId);let chart=new Chart(canvas,settings)} 114WSM.Chart.drawBarChart=function(config){let colorKeys=Object.keys(WSM.Chart.Colors.Opaque);for(let i=0;i<config.dataSets.length;i++){let currentColor=colorKeys[i%colorKeys.length];if(config.dataSets[i].backgroundColor===undefined){config.dataSets[i].backgroundColor=WSM.Chart.Colors.Opaque[currentColor]} 115config.dataSets[i].borderColor=config.dataSets[i].backgroundColor;config.dataSets[i].borderWidth=0} 116let settings={type:'bar',data:{labels:config.axisLabels,datasets:config.dataSets},options:{maintainAspectRatio:config.maintainAspect,scales:{yAxes:[{ticks:{beginAtZero:!config.relativeYScale}}],xAxes:[{gridLines:{display:!1}}]},tooltips:{mode:'index',intersect:!1,backgroundColor:WSM.Chart.Colors.Translucent.BLACK,bodySpacing:8,titleMarginBottom:15,callbacks:{label:function(tooltipItem,data){let label=data.datasets[tooltipItem.datasetIndex].label;let value=data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index];if(label!==undefined&&value!==undefined){if(config.yAxisFormat=='currency'){value=currencyTickCallback(value)}else if(config.yAxisFormat=='raw'){}else{value=groupDigitsTickCallback(value)}} 117if(!config.tipSuffix){config.tipSuffix=''} 118return label+': '+value+config.tipSuffix}}}}};switch(config.yAxisFormat){case 'currency':settings.options.scales.yAxes[0].ticks.callback=currencyTickCallback;break;case 'raw':break;default:settings.options.scales.yAxes[0].ticks.callback=groupDigitsTickCallback;break} 119if(!!config.yAxisLabel){settings.options.scales.yAxes[0].scaleLabel={display:!0,labelString:config.yAxisLabel}} 120if(!!config.xAxisLabel){settings.options.scales.xAxes[0].scaleLabel={display:!0,labelString:config.xAxisLabel}} 121let canvas=document.getElementById(config.canvasId);let chart=new Chart(canvas,settings)} 122if(typeof Partslogic=='undefined'){Partslogic={}} 123Partslogic.FITMENT_KEY='sui-fitment-selector-v2';Partslogic.pushFitment=function(){const key=Partslogic.FITMENT_KEY;const value=localStorage.getItem(key)||'';let sent=null;try{sent=sessionStorage.getItem(key+'-sent')}catch(e){} 124if(!value&&sent===null){return} 125if(sent===value){return} 126try{sessionStorage.setItem(key+'-sent',value)}catch(e){} 127var req=WSM.Ajax.request('partslogic.setFitment',{fitment:value});
127if(req&&typeof req.fail==='function'){req.fail(function(){try{sessionStorage.removeItem(key+'-sent')}catch(e){}})}};Partslogic.syncFitmentToCookie=function(){window.addEventListener('storage',(event)=>{if(event.key===Partslogic.FITMENT_KEY){Partslogic.pushFitment()}});if(document.readyState==='loading'){document.addEventListener('DOMContentLoaded',Partslogic.pushFitment)}else{Partslogic.pushFitment()}} 128Partslogic.syncFitmentToCookie();WSM.Product={};WSM.Product.displayId=function(vars,fallback){var rs=!1;switch(WSM.config.item_display){case 'dealer':rs=vars.dealerid;break;case 'stock':rs=vars.stockid;break;case 'wsm':rs=vars.id;break;case 'stock - dealer':rs=vars.stockid+' - '+vars.dealerid;break;case 'wsm - stock':rs=vars.id+' - '+vars.stockid;break;case 'wsm - dealer':rs=vars.id+' - '+vars.dealerid;break;default:break} 129if(!rs&&fallback){rs=vars.id} 130return rs};WSM.Product.expandVariables=function(text,vars){if(vars=='undefined'&&window.product!='undefined'){vars=window.product} 131return text.replace('{name}',vars.title).replace('{wsmid}',vars.id).replace('{sku}',WSM.Product.displayId(vars,!1))};WSM.Product.toggleExtendedDetails=function(title,index){var link=document.getElementById('wsm_product_extra_control_'+index);var list=document.getElementById('wsm_product_extra_detail_'+index);if(!list||!link){return} 132while(l=link.firstChild){link.removeChild(l)} 133if(list.style.display!='block'){list.style.display='block';link.appendChild(document.createTextNode(title+' [-]'))}else{list.style.display='none';link.appendChild(document.createTextNode(title+' [+]'))}};WSM.Product.hideImagePop=function(){if(WSM.Product.currentImagePop){WSM.Product.currentImagePop.css('visibility','hidden');WSM.Product.currentImagePop=null}};WSM.Product.showImagePop=function(id){WSM.Product.hideImagePop();var pop=jQuery('#wsmImagePop'+id);if(!pop.length){return} 134pop.css('visibility','visible');WSM.Product.currentImagePop=pop};WSM.Product.showImageMain=function(id,number,alt_title){var img_number=number;var img_alt=alt_title;var img_title=alt_title;jQuery("#wsm-prod-rotate-image").html("<div id=\"wsm-prod-rotate-loader\"> </div><div class=\"wsm-prod-rotate\" style='display:none;'><a id=\"PopWindow\" href=\"#\" alt=\""+img_alt+"\" title=\""+img_title+"\" onclick=\"WSM.Product.showFirstImage(this); return false;\" rel=\""+number+"\" class='wsm-product-image-zoom'><img itemprop=\"image\" src=\""+WSM.env.url.path_prefix+"/images/M"+img_number+"\" id='new_img_"+img_number+"' border=\"0\" alt=\""+img_alt+"\" title=\""+img_title+"\" title=\""+img_title+"\" /></a></div>");jQuery("#new_img_"+img_number).attr('src',WSM.env.url.path_prefix+'/images/M'+img_number).load(function(){jQuery("#wsm-prod-rotate-loader").remove();jQuery("#wsm-prod-rotate-image > .wsm-prod-rotate").css({"display":"block"})});return!1};WSM.Product.showFirstImage=function(img){var imgClickObj_ImgID;if(img.getAttribute){imgClickObj_ImgID=img.getAttribute('rel')}else if(typeof($)=='function'&&$(img).attr('rel')){imgClickObj_ImgID=$(img).attr('rel')}else if(img.rel){imgClickObj_ImgID=img.rel}else{imgClickObj_ImgID=img.id} 135var imgObj=document.getElementById("hidden_"+imgClickObj_ImgID);myLytebox.start(imgObj,!1,!1);return!1};WSM.Chat={};WSM.Chat.open=function(){window.open(WSM.env.url.frontend+'/chat.html','wsm_chat_client','width=700,height=520,location=no,status=no,toolbar=no,scrollbars=yes,resizable=yes')} 136WSM.Chat.pingOnline=function(id,text,image_url){WSM.Ajax.request('chat.online',{},function(rs){if(rs.online){jQuery(function(){var outer=jQuery('#wsm_chat_'+id);var inner=jQuery('span',outer);outer.removeClass('wsm_chat_offline').addClass('wsm_chat_online');var link=jQuery('a',outer).click(function(){WSM.Chat.open();return!1});inner.empty();if(image_url){var img=jQuery('<img></img>');img.attr('src',image_url).attr('title',text).attr('alt',text);inner.append(img)}else{inner.text(text)}})}},10000)};WSM.Cart={};WSM.Cart.itemToggle=function(itemId){var control=jQuery('#wsm_cart_item_'+itemId+'_select');var row=jQuery('#wsm_cart_item_'+itemId+'_row');if(control.length==1&&row.length==1){if(control.attr('checked')){row.addClass('wsm_cart_item_highlight')}else{row.removeClass('wsm_cart_item_highlight')}}} 137WSM.Cart.quantityFocus=function(itemId){var control=jQuery('#wsm_cart_item_'+itemId+'_select');if(control.length!=0){control.attr('checked',!0);WSM.Cart.itemToggle(itemId)}} 138WSM.Cart.shippingEstimate=function(zip,cb){WSM.Ajax.request('Cart.estimateShipping',{'zip':zip},cb)} 139WSM.Cart.shippingQuote=function(){var zip=jQuery('#wsm_shipping_quote_zip');if(zip.length==1&&zip.val()!=''){jQuery('#wsm_cart_shipping_tool_wait').css('display','');jQuery('#wsm_cart_shipping_tool_controls').css('display','none');jQuery('#wsm_cart_shipping_tool_rates').css('display','none');WSM.Cart.shippingEstimate(zip.val(),function(rs){var list=jQuery('#wsm_cart_shipping_tool_rate_list');list.empty();if(rs.error){list.append('<li>
139'+rs.error+'</li>')}else{for(i=0;i!=rs.length;++i){if(rs[i].display_name){list.append('<li>'+WSM.Cart.encode(rs[i].display_name))}else{list.append('<li>'+WSM.Cart.encode(rs[i].name))}}} 140jQuery('#wsm_cart_shipping_tool_wait').css('display','none');jQuery('#wsm_cart_shipping_tool_controls').css('display','');jQuery('#wsm_cart_shipping_tool_rates').css('display','')})} 141return!1} 142WSM.Cart.encode=function(str){return str.replace(/\(r\)/g,'\u00AE').replace(/\(sm\)/g,'\u2120')} 143WSM.Cart.add=function(formObj,clearProduct){setYmmSticky();const partslogicFitment=window.localStorage.getItem("sui-fitment-selector-v2");const optionalQualifiers=window.localStorage.getItem("optional-qualifiers");if(optionalQualifiers){let qualifiersObject={};let stringQualifiers="";const qualifiersArray=JSON.parse(optionalQualifiers);for(const qualifiers of qualifiersArray){qualifiersObject={...qualifiersObject,...qualifiers}} 144stringQualifiers=JSON.stringify(qualifiersObject);const qualifiersInput=document.createElement('template');qualifiersInput.innerHTML=`<input id="optional-qualifiers" name="product[optional-qualifiers]" type="text" style="display: none;" value='${stringQualifiers}'/>`;formObj.appendChild(qualifiersInput.content.firstChild)} 145if(partslogicFitment){const plFitment=JSON.parse(partslogicFitment)[0].split("|");const plFitmentString=JSON.stringify(plFitment);const fitmentInput=document.createElement('template');fitmentInput.innerHTML=`<input id="partslogic-fitment" name="product[partslogic-fitment]" type="text" style="display: none;" value='${plFitmentString}'/>`;formObj.appendChild(fitmentInput.content.firstChild)} 146clearProduct=typeof clearProduct=='undefined'?false:!0;WSM.Ajax.submit((typeof WSM.Cart.addWishlist!='undefined'&&WSM.Cart.addWishlist?'cart.addwishlist':'cart.add'),formObj,function(result){$.colorbox({onCleanup:function(){if(clearProduct){product={}}},html:result.html,title:result.title});const oldOptionalQualifiers=document.querySelectorAll("#optional-qualifiers");oldOptionalQualifiers.forEach(element=>{element.remove()});const oldFitment=document.querySelectorAll("#partslogic-fitment");oldFitment.forEach(element=>{element.remove()});return!1});WSM.Cart.addWishlist=!1;return!1} 147const setYmmSticky=()=>{productSeriesOptionValues=[];productSeriesOptionForceDisplay=[];var ymmsLabels=['year','make','model','submodel'];var ignoreAttributeLabels=['sq','sxq','__fqor','__ax'];var cookie=jQuery.cookie('ymm_sticky')||[];uriHash=decodeURIComponent(window.location.hash);if(uriHash.indexOf('?')!==-1) 148uriHash=uriHash.substr(0,uriHash.indexOf('?'));if(uriHash.indexOf('&')!==-1) 149uriHash=uriHash.substr(0,uriHash.indexOf('&'));var uriHash=uriHash.replace(/^#!/,'').replace(/^#/,'').split('||');if(uriHash[0]){var uriValues=[];for(var i in uriHash){var split=uriHash[i].split('=');if($.inArray(split[0],ymmsLabels)!==-1){uriValues[i]={};uriValues[i][split[0]]=split[1]}} 150var uriJSON=JSON.stringify(uriValues);if(cookie!=uriJSON){jQuery.cookie('ymm_sticky',uriJSON,{expires:7})}} 151var uriHash=decodeURIComponent(window.location.hash).replace(/^#!/,'').replace(/^#/,'').split('||');if(uriHash[0]){for(var i in uriHash){var split=uriHash[i].split('=');if($.inArray(split[0],ymmsLabels)===-1&&$.inArray(split[0],ignoreAttributeLabels)===-1){if(typeof productSeriesOptionValues[split[0]]=='undefined'){productSeriesOptionValues[split[0]]=[]} 152productSeriesOptionValues[split[0]].push(split[1])}}} 153for(var label in productSeriesOptionValues){if(productSeriesOptionValues[label].length==1){productSeriesOptionForceDisplay.push(split[0])}}} 154WSM.Cart.setInstructions=function(text,cb){WSM.Ajax.request('Cart.setInstructions',{'instructions':text},cb)} 155WSM.Cart.onUpdateObj=[];WSM.Cart.onUpdate=function(callback){WSM.Cart.onUpdateObj.push(callback)} 156WSM.Cart.update=function(obj){for(i in WSM.Cart.onUpdateObj){WSM.Cart.onUpdateObj[i](obj)}} 157WSM.Cart.getInstructions=function(cb){WSM.Ajax.request('Cart.getInstructions',{},function(rs){if(cb)cb(rs.instructions);})} 158WSM.LiveSearch={};WSM.LiveSearch.GetCookie=function(){var cookie=null;try{cookie=JSON.parse(jQuery.cookie('product_filter'))}catch(e){} 159if(typeof cookie!='object'||!cookie){cookie={'brand':null,'attributes':{}}} 160return cookie};WSM.LiveSearch.SetCookie=function(cookie){jQuery.cookie('product_filter',JSON.stringify(cookie),{path:'/'})};WSM.LiveSearch.ClearCookie=function(){jQuery.cookie('product_filter',null,{path:'/'})};WSM.LiveSearch.SetBrand=function(brandId,brandName){var cookie=WSM.LiveSearch.GetCookie();cookie.brand={id:brandId,name:brandName};WSM.LiveSearch.SetCookie(cookie)} 161WSM.LiveSearch.RemoveBrand=function(brandid){var cookie=WSM.LiveSearch.GetCookie();delete cookie.brand;WSM.LiveSearch.SetCookie(cookie);window.location.reload()} 162WSM.LiveSearch.AddAttributeValue=function(attributeId,labelId,labelName,valueId,valueName){var cookie=WSM.LiveSearch.GetCookie();if(!attributeId||!labelId||!valueId){return} 163if(!cookie.attributes[attributeId]){cookie.attributes[attributeId]={}} 164cookie.attributes[attributeId][labelId]={id:valueId,name:valueName,label_name:labelName};WSM.LiveSearch.SetCookie(cookie)} 165WSM.LiveSearch.RemoveAttributeValue=function(valueId){var cookie=WSM.LiveSearch.GetCookie();var found=!1;for(var l in cookie.attributes){var label=cookie.attributes[l];for(var v in label){if(label[v].id==valueId){delete cookie.attributes[l][v];found=!0;break}} 166if(found){break}} 167if(found){WSM.LiveSearch.SetCookie(cookie);window.location.reload()}};WSM.LiveSearch.RemoveAttributeValues=function(){var cookie=WSM.LiveSearch.GetCookie();for(var l in cookie.attributes){delete cookie.attributes[l]} 168WSM.LiveSearch.SetCookie(cookie);window.location.reload()} 169WSM.Chat={};WSM.Chat.open=function(){window.open(WSM.env.url.frontend+'/chat.html','wsm_chat_client','width=700,height=520,location=no,status=no,toolbar=no,scrollbars=yes,resizable=yes')} 170WSM.Chat.pingOnline=function(id,text,image_url){WSM.Ajax.request('chat.online',{}
170,function(rs){if(rs.online){jQuery(function(){var outer=jQuery('#wsm_chat_'+id);var inner=jQuery('span',outer);outer.removeClass('wsm_chat_offline').addClass('wsm_chat_online');var link=jQuery('a',outer).click(function(){WSM.Chat.open();return!1});inner.empty();if(image_url){var img=jQuery('<img></img>');img.attr('src',image_url).attr('title',text).attr('alt',text);inner.append(img)}else{inner.text(text)}})}},10000)};if(!WSM.Locator){WSM.Locator={}} 171WSM.Locator={'Page':{'Current':0}};WSM.Locator.Init=function(){jQuery("#wsmLocatorNextPage").click(function(){if(WSM.Locator.Page.Current==0){return!1} 172WSM.Locator.Page.Change(WSM.Locator.Page.Current-1)});jQuery("#wsmLocatorPrevPage").click(function(){WSM.Locator.Page.Change(WSM.Locator.Page.Current+1)});WSM.Locator.Page.Change(WSM.Locator.Page.Currnet)};WSM.Locator.Page.Change=function(direction){var page=WSM.Locator.Page.Current+direction;if($("#wsm_locator_page"+page).length){WSM.Locator.Page.Current=page;$('.wsm_locator_page').hide();$('#wsm_locator_page'+page).show();$('#wsm_locator_pagertop_num').text(page);$('#wsm_locator_pagerbottom_num').text(page)}};$().ready(function(){$("span[id^='wsm_news_article_show_post_']").click(function(){var ids=$(this).attr('id').toString().split("_");if(ids[5]){$("#wsm_news_article_post_form_"+ids[5]).removeClass("wsm_news_post_hidden")}})});jQuery.fn.absTop=function(){var el=this.get(0);var ret=0;while(el){ret+=el.offsetTop;el=el.offsetParent} 173return ret} 174jQuery.fn.absLeft=function(){var el=this.get(0);var ret=0;while(el){ret+=el.offsetLeft;el=el.offsetParent} 175return ret} 176function wsmShowHelpBox(text,x,y,width){var body=(document.body?document.body:document.documentElement);var helpBox=document.createElement('div');helpBox.setAttribute('id','wsm_help_box');helpBox.style.width=width+'px';helpBox.style.position='absolute';helpBox.style.top=y;helpBox.style.left=x;helpBox.style.display='none';helpBox.innerHTML=text;body.appendChild(helpBox);$('#wsm_help_box').fadeIn()} 177function wsmHideHelpBox(){$('#wsm_help_box').fadeOut(function(){var body=(document.body?document.body:document.documentElement);var helpBox=document.getElementById('wsm_help_box');body.removeChild(helpBox)})} 178function getFrameContent(id){var frame=document.getElementById(id);if(!frame) 179return!1;var content=frame.contentWindow||frame.contentDocument;if(content.document) 180content=content.document;return content} 181function MAX(a,b){return a>b?a:b} 182function MIN(a,b){return a<b?a:b} 183function postJSON(mod,act,data,cb,err){var str=JSON.stringify({"mod":mod,"act":act,"data":data});if(!err) 184err=function(req,msg,ex){var loc='/ajax?mod='+escape(mod)+'&act='+escape(act)+'&data='+escape(data);if(req.status==200) 185alert('Parse Error: '+loc+': '+ex);else alert('AJAX Error: '+loc+': '+req.status+' '+req.statusText+"\n"+req.responseText)};$.ajax({"async":!0,"contentType":"text/javascript","data":str,"error":err,"success":function(data){cb(JSON.parse(data))},"type":"POST","url":"/ajax"})} 186function cm_bwcheck(){this.ver=navigator.appVersion 187this.agent=navigator.userAgent.toLowerCase() 188this.dom=document.getElementById?1:0 189this.ns4=(!this.dom&&document.layers)?1:0;this.op=window.opera 190this.moz=(this.agent.indexOf("gecko")>-1||window.sidebar) 191this.ie=this.agent.indexOf("msie")>-1&&!this.op 192if(this.op){this.op5=(this.agent.indexOf("opera 5")>-1||this.agent.indexOf("opera/5")>-1) 193this.op6=(this.agent.indexOf("opera 6")>-1||this.agent.indexOf("opera/6")>-1) 194this.op7=this.dom&&!this.op5&&!this.op6}else if(this.moz)this.ns6=1 195else if(this.ie){this.ie4=!this.dom&&document.all 196this.ie5=(this.agent.indexOf("msie 5")>-1) 197this.ie55=(this.ie5&&this.agent.indexOf("msie 5.5")>-1) 198this.ie6=this.dom&&!this.ie4&&!this.ie5&&!this.ie55} 199this.mac=(this.agent.indexOf("mac")>-1) 200this.bw=(this.ie6||this.ie5||this.ie4||this.ns4||this.ns6||this.op5||this.op6||this.op7) 201this.usedom=this.ns6||this.op7 202this.reuse=this.ie||this.op7||this.usedom 203this.px=this.dom&&!this.op5?"px":"" 204return this} 205var bw=new cm_bwcheck() 206var cmpage 207function cm_message(txt){alert(txt);return!1} 208function cm_makeObj(obj,nest,o,doc){if(!doc)doc=document 209if(bw.usedom&&o)this.evnt=o 210else{nest=(!nest)?"doc.":'doc.layers.'+nest+'.' 211this.evnt=bw.dom?doc.getElementById(obj):bw.ie4?doc.all[obj]:bw.ns4?eval(nest+"layers."+obj):0} 212if(!this.evnt)return cm_message('The layer does not exist ('+obj+')'+'- \nIf your using Netscape please check the nesting of your tags (on the entire page)\nNest:'+nest) 213this.css=bw.dom||bw.ie4?this.evnt.style:this.evnt;this.ok=0 214this.ref=bw.dom||bw.ie4?doc:this.css.document;this.obj=obj+"Object";eval(this.obj+"=this");this.x=0;this.y=0;this.w=0;this.h=0;this.vis=0;return this} 215cm_makeObj.prototype.moveIt=function(x,y){this.x=x;this.y=y;this.css.left=x+bw.px;this.css.top=y+bw.px} 216cm_makeObj.prototype.showIt=function(o){this.css.visibility="visible";this.vis=1;if(bw.op5&&this.arr){this.arr.showIt()}} 217cm_makeObj.prototype.hideIt=function(no){this.css.visibility="hidden";this.vis=0} 218cm_makeObj.prototype.clipTo=function(t,r,b,l,setwidth){this.w=r;this.h=b;if(bw.ns4){this.css.clip.top=t;this.css.clip.right=r;this.css.clip.bottom=b;this.css.clip.left=l}
218else{if(t<0)t=0;if(r<0)r=0;if(b<0)b=0;if(b<0)b=0;this.css.clip="rect("+t+bw.px+","+r+bw.px+","+b+bw.px+","+l+bw.px+")";if(setwidth){if(bw.op5||bw.op6){this.css.pixelWidth=r;this.css.pixelHeight=b}else{this.css.width=r+bw.px;this.css.height=b+bw.px}}}} 219function cm_active(on,h){if(this.o.arr)on?this.o.arr.hideIt():bw.op5?this.o.arr.showIt():this.o.arr.css.visibility="inherit" 220if(bw.reuse||bw.usedom){if(!this.img2)this.o.evnt.className=on?this.cl2:this.cl 221else this.o.ref.images["img"+this.name].src=on?this.img2.src:this.img1.src;if(on&&bw.ns6){this.o.hideIt();this.o.css.visibility='inherit'}}else{if(!this.img2){if(on)this.o.over.showIt();else this.o.over.hideIt()}else this.o.ref.images["img"+this.name].src=on?this.img2.src:this.img1.src}this.isactive=on?1:0} 222function cm_page(frame){if(!frame)return;this.x=0;this.x2=(!bw.ie)?frame.innerWidth:frame.document.body.offsetWidth-20;this.y=0;this.orgy=this.y2=(!bw.ie)?frame.innerHeight:frame.document.body.offsetHeight-6;this.x50=this.x2/2;this.y50=this.y2/2;return this} 223function cm_cp(num,w,minus){if(num){if(num.toString().indexOf("%")!=-1){var t=w?cmpage.x2:cmpage.y2;num=parseInt((t*parseFloat(num)/100)) 224if(minus)num-=minus}else num=eval(num);}else num=0;return num} 225function cm_makeLevel(){var c=this,a=arguments;c.width=a[0]||null;c.height=a[1]||null;c.regClass=a[2]||null;c.overClass=a[3]||null;c.borderX=a[4]>-1?a[4]:null;c.borderY=a[5]>-1?a[5]:null;c.borderClass=a[6]||null;c.rows=a[7]>-1?a[7]:null;c.align=a[8]||null;c.offsetX=a[9]||null;c.offsetY=a[10]||null;c.arrow=a[11]||null;c.arrowWidth=a[12]||null;c.arrowHeight=a[13]||null;c.roundBorder=a[14]||null;return c} 226function makeCM(name){var c=this;c.mc=0;c.name=name;c.m=new Array();c.scrollY=-1;c.level=new Array();c.l=new Array();c.tim=100;c.isresized=0;c.isover=0;c.zIndex=100;c.frameStartLevel=1;c.bar=0;c.z=0;c.totw=0;c.toth=0;c.maxw=0;c.maxh=0;cmpage=new cm_page();c.constructed=0;return this} 227makeCM.prototype.onshow="";makeCM.prototype.onhide="";makeCM.prototype.onconstruct="";function cm_divCreate(id,cl,txt,w,c,app,ex,txt2){if(bw.usedom){var div=document.createElement("DIV");div.className=cl;div.id=id;if(txt)div.innerHTML=txt;if(app){app.appendChild(div);return div} 228if(w)document.body.appendChild(div);return div}else{var dstr='<div id="'+id+'" class="'+cl+'"' 229if(ex&&bw.reuse)dstr+=" "+ex;dstr+=">"+txt;if(txt2)dstr+=txt2;if(c)dstr+='</div>';if(w)document.write(dstr);else return dstr}return""} 230function cm_getLayerStr(m,app,name,fill,clb,arrow,ah,aw,root){var no=m.nolink,arrstr='',l=m.lev,str='',txt=m.txt,ev='',id=name+'_'+m.name,d1;if(app)d1=app 231if((!bw.reuse||l==0)&&!no){ev=' onmouseover="'+name+'.showsub(\''+m.name+'\')"'+' onmouseout="'+name+'.mout(\''+m.name+'\')"'+' onclick="'+name+'.onclck(\''+m.name+'\'); return false" '} 232if(bw.reuse&&l!=0)txt='';if(l==0)str+=d1=cm_divCreate(id+'_0',clb,'');str+=m.d2=cm_divCreate(id,m.cl,txt,0,0,d1,ev) 233if(l==0&&bw.usedom){m.d2.onclick=new Function(name+'.onclck("'+m.name+'")');m.d1=d1;m.d2.onmouseover=new Function(name+'.showsub("'+m.name+'")');m.d2.onmouseout=new Function(name+'.mout("'+m.name+'")')}if(!bw.reuse&&!m.img1&&!no){str+=cm_divCreate(id+'_1',m.cl2,txt,0,1) 234str+=cm_divCreate(id+'_3',"clCMAbs",'<a href="#" '+ev+'><img alt="" src="'+root+fill+'" width="'+m.w+'" height="'+m.h+'" border="0" /></a>',0,1)}str+='</div>';if(l==0){if(arrow)str+=m.d3=cm_divCreate(id+'_a','clCMAbs','<img alt="" height="'+aw+'" width="'+ah+'" src="'+root+arrow+'" />',0,1,d1);str+="</div>"} 235str+="\n";if(!bw.reuse){m.txt=null;m.d2=null;m.d3=null} 236if(bw.usedom){if(l==0)document.body.appendChild(d1);str=''} 237return str} 238function cm_checkalign(a){switch(a){case "right":return 1;break;case "left":return 2;break;case "bottom":return 3;break;case "top":return 4;break;case "righttop":return 5;break;case "lefttop":return 6;break;case "bottomleft":return 7;break;case "topleft":return 8;break}return null} 239makeCM.prototype.makeMenu=function(name,parent,txt,lnk,targ,w,h,img1,img2,cl,cl2,align,rows,nolink,onclick,onmouseover,onmouseout){var c=this;if(!name)name=c.name+""+c.mc;var p=parent!=""&&parent&&c.m[parent]?parent:0;if(c.mc==0){if(bw.op7&&this.frames)bw.usedom=0 240var tmp=location.href;if(tmp.indexOf('file:')>-1||tmp.charAt(1)==':')c.root=c.offlineRoot;else c.root=c.onlineRoot 241if(c.useBar){if(!c.barBorderClass)c.barBorderClass=c.barClass;c.bar1=cm_divCreate(c.name+'bbar_0',c.barClass,'',0,1);c.bar=cm_divCreate(c.name+'bbar',c.barBorderClass,'',1,1,0,0,c.bar1);if(bw.usedom)c.bar.appendChild(c.bar1);}}var create=1,img,arrow;var m=c.m[name]=new Object();m.name=name;m.subs=new Array();m.parent=p;m.arnum=0;m.arr=0 242var l=m.lev=p?c.m[p].lev+1:0;c.mc++;m.hide=0;if(l>=c.l.length){var p1,p2=0;if(l>=c.level.length)p1=c.l[c.level.length-1];else p1=c.level[l];c.l[l]=new Array();if(!p2)p2=c.l[l-1] 243if(l!=0){if(isNaN(p1.align))p1.align=cm_checkalign(p1.align) 244for(var i in p1){if(i!="str"&&i!="m"){if(p1[i]==null)c.l[l][i]=p2[i];else c.l[l][i]=p1[i]}}}else{c.l[l]=c.level[0];c.l[l].align=cm_checkalign(c.l[l].align)} 245c.l[l].str='';c.l[l].m=new Array();if(!c.l[l].borderClass)c.l[l].borderClass=c.l[l].regClass 246c.l[l].app=0;c.l[l].max=0;c.l[l].arnum=0;c.l[l].o=new Array();c.l[l].arr=new Array() 247c.level[l]=p1=p2=null 248if(l!=0)c.l[l].str=c.l[l].app=cm_divCreate(c.name+'_'+l+'_0',c.l[l].borderClass,'')}if(p){p=c.m[p];p.subs[p.subs.length]=name;if(p.subs.length==1&&c.l[l-1].arrow){p.arr=1;if(p.parent){c.m[p.parent].arnum++ 249if(c.m[p.parent].arnum>c.l[l-1].arnum){c.l[l-1].str+=c.l[l-1].arr[c.l[l-1].arnum]=cm_divCreate(c.name+'_a'+(l-1)+'_'+c.l[l-1].arnum,'clCMAbs','<img height="'+c.l[l-1].arrowHeight+'" width="'+c.l[l-1].arrowWidth+'" src="'+c.root+c.l[l-1].arrow+'" alt="" />',0,1,c.l[l-1].app);c.l[l-1].arnum++}}}if(bw.reuse)if(p.subs.length>c.l[l].max)c.l[l].max=p.subs.length;else create=0}m.rows=rows>-1?rows:c.l[l].rows;m.w=cm_cp(w||c.l[l].width,1);m.h=cm_cp(h||c.l[l].height,0);m.txt=txt;
249m.lnk=lnk;if(align)align=cm_checkalign(align);m.align=align||c.l[l].align;m.cl=cl=cl||c.l[l].regClass;m.targ=targ;m.cl2=cl2||c.l[l].overClass;m.create=create;m.mover=onmouseover;m.mout=onmouseout;m.onclck=onclick;m.active=cm_active;m.isactive=0;m.nolink=nolink 250if(create)c.l[l].m[c.l[l].m.length]=name 251if(img1){m.img1=new Image();m.img1.src=c.root+img1;if(!img2)img2=img1;m.img2=new Image();m.img2.src=c.root+img2;m.cl="clCMAbs";m.txt='';if(!bw.reuse&&!nolink)m.txt='<a href="#" onmouseover="'+c.name+'.showsub(\''+name+'\')" onmouseout="'+c.name+'.mout(\''+name+'\')" onclick="'+c.name+'.onclck(\''+name+'\'); return false">';m.txt+='<img alt="" src="'+c.root+img1+'" width="'+m.w+'" height="'+m.h+'" id="img'+m.name+'" ' 252if(bw.dom&&!nolink)m.txt+='style="cursor:pointer; cursor:hand"';if(!bw.reuse){if(!bw.dom)m.txt+='name="img'+m.name+'"';m.txt+=' border="0"'};m.txt+=' />';if(!bw.reuse&&!nolink)m.txt+='</a>'}else{m.img1=0;m.img2=0};if(l==0||create)c.l[l].str+=cm_getLayerStr(m,c.l[l].app,c.name,c.fillImg,c.l[l].borderClass,c.l[l].arrow,c.l[l].arrowWidth,c.l[l].arrowHeight,c.root) 253if(l==0){if(m.w>c.maxw)c.maxw=m.w;if(m.h>c.maxh)c.maxh=m.h;c.totw+=c.pxBetween+m.w+c.l[0].borderX;c.toth+=c.pxBetween+m.h+c.l[0].borderY} 254if(lnk&&!onmouseover){var path=lnk.indexOf("mailto:")>-1||lnk.indexOf("http://")>-1?"":c.root 255m.mover="self.status='"+path+m.lnk+"'" 256if(!m.mout)m.mout="";m.mout+=";self.status='';"}} 257makeCM.prototype.getcoords=function(m,bx,by,x,y,maxw,maxh,ox,oy){var a=m.align;x+=m.o.x;y+=m.o.y 258switch(a){case 1:x+=m.w+bx;break;case 2:x-=maxw+bx;break;case 3:y+=m.h+by;break;case 4:y-=maxh+by;break;case 5:x-=maxw+bx;y-=maxh-m.h;break;case 6:x+=m.w+bx;y-=maxh-m.h;break;case 7:y+=m.h+by;x-=maxw-m.w;break;case 8:y-=maxh+by;x-=maxw-m.w+bx;break} 259if(m.lev==this.frameStartLevel-1&&this.frames){switch(a){case 1:x=0;break;case 2:x=this.cmpage.x2-maxw;break;case 3:y=0;break;case 4:y-=maxh+by;break;case 5:x-=maxw+bx;y-=maxh-m.h;break;case 6:x+=m.w+bx;y-=maxh-m.h;break;case 7:y+=m.h+by;x-=maxw-m.w;break;case 8:y-=maxh+by;x-=maxw-m.w+bx;break}} 260m.subx=x+ox;m.suby=y+oy} 261makeCM.prototype.showsub=function(el){var c=this,pm=c.m[el],m,o,nl 262if(!pm.b||(c.isresized&&pm.lev>0))pm.b=c.l[pm.lev].b;c.isover=1 263clearTimeout(c.tim);var ln=pm.subs.length,l=pm.lev+1 264if(c.l[pm.lev].a==el&&l!=c.l.length&&!c.openOnClick){if(c.l[pm.lev+1].a)c.hidesub(l+1,el);return} 265c.hidesub(l,el);if(pm.mover)eval(pm.mover);if(!pm.isactive)pm.active(1);c.l[pm.lev].a=el;if(ln==0)return;if(c.openOnClick&&!c.clicked)return 266if(!c.l[l].b)return 267var b=c.l[l].b,bx=c.l[l].borderX,by=c.l[l].borderY,rows=pm.rows 268var rb=c.l[l].roundBorder;var x=bx+rb,y=by+rb,maxw=0,maxh=0,cn=0;b.hideIt() 269for(var i=0;i<c.l[l].m.length;i++){if(!bw.reuse)m=c.m[c.l[l].m[i]] 270else m=c.m[c.m[el].subs[i]] 271if(m&&m.parent==el&&!m.hide){if(!bw.reuse)o=m.o;else o=m.o=c.l[l].o[i] 272if(x!=o.x||y!=o.y)o.moveIt(x,y);nl=m.subs.length 273if(bw.reuse){if(o.w!=m.w||o.h!=m.h)o.clipTo(0,m.w,m.h,0,1) 274if(o.evnt.className!=m.cl){m.isactive=0;o.evnt.className=m.cl 275if(bw.ns6){o.hideIt();o.css.visibility='inherit'}}if(bw.ie6)b.showIt() 276o.evnt.innerHTML=m.txt;if(bw.ie6)b.hideIt() 277if(!m.nolink){o.evnt.onmouseover=new Function(c.name+".showsub('"+m.name+"')") 278o.evnt.onmouseout=new Function(c.name+".mout('"+m.name+"')") 279o.evnt.onclick=new Function(c.name+".onclck('"+m.name+"')") 280if(o.oldcursor){o.css.cursor=o.oldcursor;o.oldcursor=0}}else{o.evnt.onmouseover='';o.evnt.onclick='';if(o.css.cursor=='')o.oldcursor=bw.ns6?"pointer":"hand";else o.oldcursor=o.css.cursor;o.css.cursor="auto"}}if(m.arr){o.arr=c.l[l].arr[cn];o.arr.moveIt(x+m.w-c.l[l].arrowWidth-3,y+m.h/2-(c.l[l].arrowHeight/2));o.arr.css.visibility="inherit";cn++}else o.arr=0 281if(!rows){y+=m.h+by;if(m.w>maxw)maxw=m.w;maxh=y}else{x+=m.w+bx;if(m.h>maxh)maxh=m.h;maxw=x} 282o.css.visibility="inherit";if(bw.op5||bw.op6)o.showIt()}else{o=c.m[c.l[l].m[i]].o;o.hideIt()}} 283if(!rows)maxw+=bx*2+rb;else maxh+=by*2+rb;if(rb){maxw+=rb;maxh+=rb} 284b.clipTo(0,maxw,maxh,0,1) 285if(c.chkscroll)c.chkscroll() 286if(c.chkscroll||!pm.subx||!pm.suby||c.scrollY>-1||c.isresized)c.getcoords(pm,c.l[l-1].borderX,c.l[l-1].borderY,pm.b.x,pm.b.y,maxw,maxh,c.l[l-1].offsetX,c.l[l-1].offsetY) 287x=pm.subx;
287if(c.chkscroll&&l==c.frameStartLevel)pm.suby+=c.scrollY;y=pm.suby;b.moveIt(x,y);if(c.onshow)eval(c.onshow);b.showIt()} 288makeCM.prototype.hidesub=function(l,el){var c=this,tmp,m,i,j,hide 289if(!l){l=1;hide=1;c.clicked=0} 290for(i=l-1;i<c.l.length;i++){if(i>0&&i>l-1)if(c.l[i].b)c.l[i].b.hideIt() 291if(c.l[i].a&&c.l[i].a!=el){m=c.m[c.l[i].a];m.active(0,1);if(m.mout)eval(m.mout);c.l[i].a=0 292if(i>0&&i>l-1)if(bw.op5||bw.op6)for(j=0;j<c.l[i].m.length;j++)c.m[c.l[i].m[j]].o.hideIt()}if(i>l){for(j=0;j<c.l[i-1].arnum;j++){c.l[i-1].arr[j].hideIt();if(bw.op6)c.l[i-1].arr[j].moveIt(-1000,-1000)}}}if(hide&&c.onhide)eval(c.onhide)} 293makeCM.prototype.makeObjects=function(nowrite,fromframe){var c=this,oc,name,bx,by,w,h,l,no,ar,id,nest,st=0,en=c.l.length,bobj,o,m,i,j 294if(fromframe){st=this.frameStartLevel 295this.body=fromframe.document.body 296this.doc=fromframe.document 297this.deftarget=fromframe 298this.cmpage=new cm_page(fromframe)}else{this.body=document.body 299this.doc=document 300if(this.frames)en=this.frameStartLevel 301this.deftarget=self} 302if(!nowrite){for(i=st;i<en;i++){if(!bw.usedom)this.doc.write(c.l[i].str) 303else if(i>0)this.body.appendChild(c.l[i].app) 304if(!this.frames)c.l[i].str=null}}c.z=c.zIndex+2 305for(i=st;i<en;i++){oc=0 306if(i!=0){bobj=c.l[i].b=new cm_makeObj(c.name+"_"+i+"_0","",c.l[i].app,this.doc);bobj.css.zIndex=c.z;if(bw.dom)bobj.css.overflow='hidden'};bx=c.l[i].borderX;by=c.l[i].borderY;c.l[i].max=0;for(j=0;j<c.l[i].m.length;j++){m=c.m[c.l[i].m[j]];name=m.name;w=m.w;h=m.h;l=m.lev;no=m.nolink;if(i>0){m.b=bobj;nest=i}else{m.b=new cm_makeObj(c.name+"_"+name+"_0","",m.d1,this.doc);m.b.css.zIndex=c.z;m.b.clipTo(0,w+bx*2,h+by*2,0,1);nest=name} 307id=c.name+"_"+name;nest=c.name+"_"+nest;if(m.create){o=m.o=new cm_makeObj(id,nest+"_0",m.d2,this.doc);o.z=o.css.zIndex=c.z+1;if(bw.reuse){c.l[l].o[oc]=o;oc++};if(l==0&&m.img1)o.css.visibility='inherit';if(bw.op5)o.showIt();o.arr=0}if(!bw.reuse||l==0)o.clipTo(0,w,h,0,1);o.moveIt(bx,by);o.z=o.css.zIndex=c.z+2 308if(j<c.l[i].arnum){c.l[i].arr[j]=new cm_makeObj(c.name+"_a"+i+"_"+j,nest+"_0",nowrite?0:c.l[i].arr[j],this.doc) 309c.l[i].arr[j].css.zIndex=c.z+30+j}else if(l==0&&m.arr==1){o.arr=new cm_makeObj(id+"_a",nest+"_0",m.d3,this.doc) 310o.arr.moveIt(bx+m.w-c.l[i].arrowWidth-3,by+m.h/2-(c.l[i].arrowHeight/2));o.arr.css.zIndex=c.z+20}if(!no&&!bw.reuse&&!m.img1){o.over=new cm_makeObj(c.name+"_"+name+"_1",nest+"_0"+".document.layers."+id,"",this.doc) 311o.over.moveIt(0,0);o.over.hideIt();o.over.clipTo(0,w,h,0,1);o.over.css.zIndex=c.z+3 312img=new cm_makeObj(c.name+"_"+name+"_3",nest+"_0"+".document.layers."+id,"",this.doc);img.moveIt(0,0) 313img.css.visibility="inherit";img.css.zIndex=c.z+4;if(bw.op5)img.showIt()}c.z++}} 314if(fromframe){c.chkscroll=function(){if(bw.ie&&!bw.ie6)this.scrollY=this.body.scrollTop;else if(bw.ie6||bw.op7){if(this.doc.compatMode&&document.compatMode!="BackCompat")this.scrollY=this.doc.documentElement.scrollTop 315else this.scrollY=this.body.scrollTop}else this.scrollY=this.deftarget.pageYOffset}}} 316makeCM.prototype.mout=function(){var c=this;clearTimeout(c.tim);c.isover=0;var f="if(!"+c.name+".isover)"+c.name+".hidesub()" 317if(!c.closeOnClick)c.tim=setTimeout(f,c.wait) 318else{if(bw.ns4){document.captureEvents("Event.MOUSEDOWN");document.onmousedown=new Function(f)}else document.onclick=new Function(f);if(this.frames){if(bw.ns4){this.doc.captureEvents("Event.MOUSEDOWN");this.doc.onmousedown=new Function(f)}else this.doc.onclick=new Function(f)}}} 319makeCM.prototype.construct=function(nowrite){var c=this;if(!c.l[0]||c.l[0].m.length==0)return cm_message('No menus defined');if(!nowrite){for(var i=1;i<c.l.length;i++){c.l[i].str+="</div>"}} 320c.makeObjects(nowrite);cmpage=new cm_page();var mpa,o,maxw=c.maxw,maxh=c.maxh,i,totw=c.totw,toth=c.toth,m,px=c.pxBetween 321var bx=c.l[0].borderX,by=c.l[0].borderY,x=c.fromLeft,y=c.fromTop,mp=c.menuPlacement,rows=c.rows 322if(rows){toth=maxh+by*2;totw=totw-px+bx}else{totw=maxw+bx*2;toth=toth-px+by} 323switch(mp){case "center":x=cmpage.x2/2-totw/2;if(bw.ns4)x-=9;break;case "right":x=cmpage.x2-totw;break;case "bottom":case "bottomcenter":y=cmpage.y2-toth;if(mp=="bottomcenter")x=cmpage.x2/2-totw/2;break;default:if(mp.toString().indexOf(",")>-1)mpa=1;break}for(var i=0;i<c.l[0].m.length;i++){m=c.m[c.l[0].m[i]];o=m.b;if(mpa)rows?x=cm_cp(mp[i]):y=cm_cp(mp[i],0,0,1);o.moveIt(x,y);o.showIt();if(m.arr)m.o.arr.showIt();o.oy=y;if(!mpa)rows?x+=m.w+px+bx:y+=m.h+px+by}if(c.useBar==1){var bbx=c.barBorderX,bby=c.barBorderY;var bar1=c.bar1=new cm_makeObj(c.name+'bbar_0',c.name+'bbar',nowrite?0:c.bar1,document) 324var bar=c.bar=new cm_makeObj(c.name+'bbar','',nowrite?0:c.bar,document);bar.css.zIndex=c.zIndex+1 325var barx=c.barX=="menu"?c.m[c.l[0].m[0]].b.x-bbx:cm_cp(c.barX,1);var bary=c.barY=="menu"?c.m[c.l[0].m[0]].b.y-bby:cm_cp(c.barY);var barw=c.barWidth=="menu"?totw:cm_cp(c.barWidth,1,bbx*2);var barh=c.barHeight=="menu"?toth:cm_cp(c.barHeight,0,bby*2);bar1.clipTo(0,barw,barh,0,1);bar1.moveIt(bbx,bby);bar1.showIt();bar.clipTo(0,barw+bbx*2,barh+bby*2,0,1);bar.moveIt(barx,bary);bar.showIt()}if(c.resizeCheck){if(bw.ns4||bw.op5||bw.op6)setTimeout('window.onresize=new Function("'+c.name+'.resized()")',500) 326else window.onresize=new Function(c.name+".resized()") 327c.resized=cm_resized;if(bw.op5||bw.op6)document.onmousemove=new Function(c.name+".resized()")}if(c.onconstruct)eval(c.onconstruct) 328c.constructed=1 329return!0} 330var cm_inresize=0 331function cm_resized(){if(cm_inresize)return 332page2=new cm_page();var off=(bw.op6||bw.op5)?20:5 333if(page2.x2<cmpage.x2-off||page2.y2<cmpage.orgy-off||page2.x2>cmpage.x2+off||page2.y2>cmpage.orgy+off){if(bw.ie||bw.ns6||bw.op7||bw.ns4){cmpage=page2;this.isresized=1;if(this.onresize)eval(this.onresize);this.construct(1);if(this.onafterresize)eval(this.onafterresize);}else{cm_inresize=1;location.reload()}}} 334makeCM.prototype.onclck=function(m){m=this.m[m] 335if(m.onclck)eval(m.onclck);if(this.openOnClick&&m.subs.length>0){this.clicked=1;this.showsub(m.name);return} 336var lnk=m.lnk,targ=m.targ 337if(lnk){if(lnk.indexOf("mailto")!=0&&lnk.indexOf("http")!=0)lnk=this.root+lnk 338if(String(targ)=="undefined"||targ==""||targ==0||targ=="_self"){if(this.frames){if(this.l[0].a){this.m[this.l[0].a].active(0,1) 339this.l[0].a=0} 340for(i=this.frameStartLevel;i<this.l.length;i++){if(this.l[i].b){this.l[i].b.hideIt() 341this.l[i].b=null 342for(j=0;j<this.l[i].m.length;j++){this.m[this.l[i].m[j]].b=null}}} 343this.isover=0} 344this.deftarget.location.href=lnk}else if(targ=="_blank")window.open(lnk) 345else if(targ=="_top"||targ=="window")top.location.href=lnk 346else if(top[targ])top[targ].location.href=lnk 347else if(parent[targ])parent[targ].location.href=lnk}else return!1} 348var dateFormat=function(){var token=/d{1,4}|m{1,4}
348|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,timezone=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,timezoneClip=/[^-+\dA-Z]/g,pad=function(val,len){val=String(val);len=len||2;while(val.length<len)val="0"+val;return val};return function(date,mask,utc){var dF=dateFormat;if(arguments.length==1&&(typeof date=="string"||date instanceof String)&&!/\d/.test(date)){mask=date;date=undefined} 349date=date?new Date(date):new Date();if(isNaN(date))throw new SyntaxError("invalid date");mask=String(dF.masks[mask]||mask||dF.masks["default"]);if(mask.slice(0,4)=="UTC:"){mask=mask.slice(4);utc=!0} 350var _=utc?"getUTC":"get",d=date[_+"Date"](),D=date[_+"Day"](),m=date[_+"Month"](),y=date[_+"FullYear"](),H=date[_+"Hours"](),M=date[_+"Minutes"](),s=date[_+"Seconds"](),L=date[_+"Milliseconds"](),o=utc?0:date.getTimezoneOffset(),flags={d:d,dd:pad(d),ddd:dF.i18n.dayNames[D],dddd:dF.i18n.dayNames[D+7],m:m+1,mm:pad(m+1),mmm:dF.i18n.monthNames[m],mmmm:dF.i18n.monthNames[m+12],yy:String(y).slice(2),yyyy:y,h:H%12||12,hh:pad(H%12||12),H:H,HH:pad(H),M:M,MM:pad(M),s:s,ss:pad(s),l:pad(L,3),L:pad(L>99?Math.round(L/10):L),t:H<12?"a":"p",tt:H<12?"am":"pm",T:H<12?"A":"P",TT:H<12?"AM":"PM",Z:utc?"UTC":(String(date).match(timezone)||[""]).pop().replace(timezoneClip,""),o:(o>0?"-":"+")+pad(Math.floor(Math.abs(o)/60)*100+Math.abs(o)%60,4),S:["th","st","nd","rd"][d%10>3?0:(d%100-d%10!=10)*d%10]};return mask.replace(token,function($0){return $0 in flags?flags[$0]:$0.slice(1,$0.length-1)})}}();dateFormat.masks={"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"};dateFormat.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};Date.prototype.format=function(mask,utc){return dateFormat(this,mask,utc)};WSM.CountryList=[{'id':'1','code':'US','name':'United States','reqzip':!0,'states':[{'id':'2','code':'AL','name':'Alabama','tax':'0.040000','tax_shipping':!1},{'id':'1','code':'AK','name':'Alaska','tax':'0.000000','tax_shipping':!1},{'id':'78','code':'AS','name':'American Samoa','tax':'0.000000','tax_shipping':!1},{'id':'5','code':'AZ','name':'Arizona','tax':'0.056000','tax_shipping':!1},{'id':'3','code':'AR','name':'Arkansas','tax':'0.060000','tax_shipping':!0},{'id':'73','code':'AE','name':'Armed Forces Africa','tax':'0.000000','tax_shipping':!1},{'id':'72','code':'AA','name':'Armed Forces Americas (except Canada)','tax':'0.000000','tax_shipping':!1},{'id':'74','code':'AE','name':'Armed Forces Canada','tax':'0.000000','tax_shipping':!1},{'id':'75','code':'AE','name':'Armed Forces Europe','tax':'0.000000','tax_shipping':!1},{'id':'76','code':'AE','name':'Armed Forces Middle East','tax':'0.000000','tax_shipping':!1},{'id':'77','code':'AP','name':'Armed Forces Pacific','tax':'0.000000','tax_shipping':!1},{'id':'6','code':'CA','name':'California','tax':'0.075000','tax_shipping':!1},{'id':'7','code':'CO','name':'Colorado','tax':'0.029000','tax_shipping':!1},{'id':'8','code':'CT','name':'Connecticut','tax':'0.060000','tax_shipping':!0},{'id':'13','code':'DE','name':'Delaware','tax':'0.000000','tax_shipping':!1},{'id':'10','code':'DC','name':'District of Columbia','tax':'0.058000','tax_shipping':!1},{'id':'79','code':'FM','name':'Federated States of Micronesia','tax':'0.000000','tax_shipping':!1},{'id':'14','code':'FL','name':'Florida','tax':'0.060000','tax_shipping':!1},{'id':'15','code':'GA','name':'Georgia','tax':'0.070000','tax_shipping':!0},{'id':'80','code':'GU','name':'Guam','tax':'0.000000','tax_shipping':!1},{'id':'17','code':'HI','name':'Hawaii','tax':'0.040000','tax_shipping':!0},{'id':'20','code':'ID','name':'Idaho','tax':'0.060000','tax_shipping':!1},{'id':'21','code':'IL','name':'Illinois','tax':'0.062500','tax_shipping':!1},{'id':'22','code':'IN','name':'Indiana','tax':'0.060000','tax_shipping':!0},{'id':'18','code':'IA','name':'Iowa','tax':'0.050000','tax_shipping':!1},{'id':'23','code':'KS','name':'Kansas','tax':'0.053000','tax_shipping':!1},{'id':'24','code':'KY','name':'Kentucky','tax':'0.060000','tax_shipping':!0},{'id':'25','code':'LA','name':'Louisiana','tax':'0.040000','tax_shipping':!0},{'id':'32','code':'ME','name':'Maine','tax':'0.050000','tax_shipping':!1},{'id':'81','code':'MH','name':'Marshall Islands','tax':'0.000000','tax_shipping':!1},{'id':'29','code':'MD','name':'Maryland','tax':'0.060000','tax_shipping':!1},{'id':'27','code':'MA','name':'Massachusetts','tax':'0.062500','tax_shipping':!1},{'id':'33','code':'MI','name':'Michigan','tax':'0.060000','tax_shipping':!1},{'id':'34','code':'MN','name':'Minnesota','tax':'0.068800','tax_shipping':!0},{'id':'35','code':'MS','name':'Mississippi','tax':'0.070000','tax_shipping':!0},{'id':'37','code':'MO','name':'Missouri','tax':'0.042000','tax_shipping':!1},{'id':'38','code':'MT','name':'Montana','tax':'0.000000','tax_shipping':!0},{'id':'41','code':'NE','name':'Nebraska','tax':'0.055000','tax_shipping':!0},{'id':'46','code':'NV','name':'Nevada','tax':'0.065000','tax_shipping':!1},{'id':'43','code':'NH','name':'New Hampshire','tax':'0.000000','tax_shipping':!1},{'id':'44','code':'NJ','name':'New Jersey','tax':'0.070000','tax_shipping':!0},{'id':'45','code':'NM','name':'New Mexico','tax':'0.050000','tax_shipping':!0},{'id':'47','code':'NY','name':'New York','tax':'0.040000','tax_shipping':!0},{'id':'39','code':'NC','name':'North Carolina','tax':'0.057500','tax_shipping':!0},{'id':'40','code':'ND','name':'North Dakota','tax':'0.050000','tax_shipping':!0},{'id':'82','code':'MP','name':'Northern Mariana Islands','tax':'0.000000','tax_shipping':!1},{'id':'49','code':'OH','name':'Ohio','tax':'0.055000','tax_shipping':!0},{'id':'50','code':'OK','name':'Oklahoma','tax':'0.045000','tax_shipping':!1},{'id':'52','code':'OR','name':'Oregon','tax':'0.000000','tax_shipping':!1},{'id':'83','code':'PW','name':'Palau','tax':'0.000000','tax_shipping':!1},{'id':'53','code':'PA','name':'Pennsylvania','tax':'0.060000','tax_shipping':!0},{'id':'84','code':'PR','name':'Puerto Rico','tax':'0.000000','tax_shipping':!1},{'id':'54','code':'RI','name':'Rhode Island','tax':'0.070000','tax_shipping':!0},{'id':'55','code':'SC','name':'South Carolina','tax':'0.060000','tax_shipping':!0},{'id':'56','code':'SD','name':'South Dakota','tax':'0.040000','tax_shipping':!0},{'id':'57','code':'TN','name':'Tennessee','tax':'0.070000','tax_shipping':!0},{'id':'58','code':'TX','name':'Texas','tax':'0.062500','tax_shipping':!0},{'id':'601','code':'VI','name':'U.S. Virgin Islands','tax':'0.000000','tax_shipping':!1},{'id':'62','code':'UT','name':'Utah','tax':'0.067500','tax_shipping':!1},{'id':'65','code':'VT','name':'Vermont','tax':'0.060000','tax_shipping':!0},{'id':'63','code':'VA','name':'Virginia','tax':'0.050000','tax_shipping':!1},{'id':'67','code':'WA','name':'Washington','tax':'0.065000','tax_shipping':!0},{'id':'69','code':'WV','name':'West Virginia','tax':'0.060000','tax_shipping':!0},{'id':'68','code':'WI','name':'Wisconsin','tax':'0.050000','tax_shipping':!0},{'id':'70','code':'WY','name':'Wyoming','tax':'0.000000','tax_shipping':!1}]},{'id':'2','code':'CA','name':'Canada','reqzip':!0,'states':[{'id':'71','code':'AB','name':'Alberta','tax':'0.050000','tax_shipping':!0},{'id':'142','code':'BC','name':'British Columbia','tax':'0.120000','tax_shipping':!0},{'id':'211','code':'MB','name':'Manitoba','tax':'0.130000','tax_shipping':!0},{'id':'243','code':'NB','name':'New Brunswick','tax':'0.130000','tax_shipping':!0},{'id':'294','code':'NL','name':'Newfoundland and Labrador','tax':'0.130000','tax_shipping':!0},{'id':'313','code':'NT','name':'Northwest Territories','tax':'0.050000','tax_shipping':!0},{'id':'316','code':'NS','name':'Nova Scotia','tax':'0.150000','tax_shipping':!0},{'id':'312','code':'NU','name':'Nunavut','tax':'0.050000','tax_shipping':!0},{'id':'568','code':'ON','name':'Ontario','tax':'0.130000','tax_shipping':!0},{'id':'355','code':'PE','name':'Prince Edward Island','tax':'0.140000','tax_shipping':!0},{'id':'388','code':'QC','name':'Quebec','tax':'0.149750','tax_shipping':!0},{'id':'359','code':'SK','name':'Saskatchewan','tax':'0.100000','tax_shipping':!0},{'id':'386','code':'YT','name':'Yukon','tax':'0.050000','tax_shipping':!0}]}]
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.