var minQuantity=1;var restrictByAccountFlag=false;var armadilloHardwareFlag=false;function buynow(a){f=document.tdForm;f.contractId.value=a;f.submitAction.value="buynow";f.submit()}function showVolumeDiscount(a,d,i,e,h,j){var g=300;var b=400;var c="";if(a&&"null"!=a){c+="&contractId="+a}if(d&&"null"!=d){c+="&bCur="+d}if(i&&"null"!=i){c+="&currency="+i}if(e&&"null"!=e){c+="&language="+e}if(h&&"null"!=h){c+="&pricePerUnit="+h}if(j&&"null"!=j){c+="&unitType="+j}var k=window.open("buynow_volume_discount.jsp?"+c+"&dummy="+new Date().getTime(),"volumeDiscount","width="+g+",height="+b+",screenx="+(screen.width-g)/2+",screeny="+(screen.height-b)/2+",toolbar=no,resizable=yes,scrollbars=yes,left="+(screen.width-g)/2+",top="+(screen.height-b)/2);k.focus()}function showSecCodes(d){var c=610;var b=445;if(typeof(d)=="undefined"){d="ENGLISH"}var a=window.open("../jsp/sec_codes.jsp?language="+d,"test","width="+c+",height="+b+",screenx="+(screen.width-c)/2+",screeny="+(screen.height-b)/2+",toolbar=no,resizable=yes,scrollbars=yes,left="+(screen.width-c)/2+",top="+(screen.height-b)/2);a.focus()}function showIssueNumber(){var c=610;var b=330;var a=window.open("../html/issue_number.html","test","width="+c+",height="+b+",screenx="+(screen.width-c)/2+",screeny="+(screen.height-b)/2+",toolbar=no,resizable=yes,scrollbars=yes,left="+(screen.width-c)/2+",top="+(screen.height-b)/2);a.focus()}function showStartDate(){var c=610;var b=445;var a=window.open("../html/start_date.html","test","width="+c+",height="+b+",screenx="+(screen.width-c)/2+",screeny="+(screen.height-b)/2+",toolbar=no,resizable=yes,scrollbars=yes,left="+(screen.width-c)/2+",top="+(screen.height-b)/2);a.focus()}function showEcpHelp(){var c=610;var b=330;var a=window.open("../html/ecp.html","test","width="+c+",height="+b+",screenx="+(screen.width-c)/2+",screeny="+(screen.height-b)/2+",toolbar=no,resizable=yes,scrollbars=yes,left="+(screen.width-c)/2+",top="+(screen.height-b)/2);a.focus()}function doesPaymentMethodSupportLocalCurrency(a){if(a==null||a==""||a=="step2"){return true}return false}function updateShippingStates(a){if(a!="ca"&&a!="us"){document.tdForm.shippingState.selectedIndex=0;document.tdForm.shippingState.disabled=true}else{document.tdForm.shippingState.disabled=false}}function enableStateSelect(){if(document.getElementById("state")!=null){document.tdForm.state.disabled=false}if(document.getElementById("shippingState")!=null){document.getElementById("shippingState").disabled=false}}function checkMaestroSoloDisplay(a){if(a=="MAESTR_UK"||a=="SOLO"){document.getElementById("IssueNumberRow").style.display="";document.getElementById("StartDateRow").style.display=""}else{document.getElementById("IssueNumberRow").style.display="none";document.getElementById("StartDateRow").style.display="none"}}function handleRefreshOnCardTypeChange(e,a,b){if(document.tdForm.cardCompany==null){return false}var c=document.tdForm.cardCompany;if(c.value==e){return false}checkMaestroSoloDisplay(c.value);if((e!="VISA"&&e!="MASTERCARD"&&e!="AMEX")||(c.value!="VISA"&&c.value!="MASTERCARD"&&c.value!="AMEX")){if(!a){var h=false;var g=false;for(var d in cardsSupportingLocalCurrency){if(cardsSupportingLocalCurrency[d]==c.value){h=true}if(cardsSupportingLocalCurrency[d]==e){g=true}}if(!g||!h){if(b){doPopup=false}document.tdForm.submitAction.value="changeCurrency";document.tdForm.submit()}}else{alert("Currency cannot be changed in preview mode.")}}return true}function PlimusStates(){this.usStates=[];this.caProvince=[]}var plimusStates=new PlimusStates();function initStates(){try{var b=document.getElementById("state");var g=plimusStates.usStates;b.removeChild(b.childNodes[1]);var a=b.childNodes.length-1;for(var c=1;c<a;c++){if(b.childNodes[c].tagName&&(b.childNodes[c].tagName=="OPTGROUP")){b.removeChild(b.childNodes[c]);c--;g=plimusStates.caProvince}else{g[g.length]=new Option(b.childNodes[c].text,b.childNodes[c].value)}}}catch(d){}}function updateStates(g){if(plimusStates.usStates.length==0){initStates()}try{var b=document.getElementById("state");var c=b.value;b.options.length=1;var a;switch(g){case"us":document.getElementById("pli_statesText").innerHTML=stateTranslation;a=plimusStates.usStates;break;case"ca":document.getElementById("pli_statesText").innerHTML=provinceTranslation;a=plimusStates.caProvince;break}for(var d in a){b.options[b.options.length]=new Option(a[d].text,a[d].value)}b.disabled=(b.options.length==1);if(b.disabled){document.getElementById("pli_states").style.display="none"}else{b.value=c;document.getElementById("pli_states").style.display=""}}catch(h){}};