var theDispLocation=getNodeRef("dataDisp"),topLocation=getTop("dataDisp")-5+"px",theHTTTPObject;function showNew(){var a=getNodeRef("newCustomer"),b=getNodeRef("currentCustomer");b.style.visibility="hidden";b.style.display="none";a.style.top=topLocation;a.style.display="block";a.style.visibility="visible"} function showHideInvoiceDetail(a,b){var c="detail"+a+"TR",d=getNodeRef("detail"+a);c=getNodeRef(c);if(d&&c)if(b){d.style.display="block";d.style.visibility="visible";c.style.display=navigator.appName=="Microsoft Internet Explorer"?"block":"table-row";c.style.visibility="visible"}else{d.style.visibility="hidden";d.style.display="none";c.style.visibility="hidden";c.style.display="none"}return false} function hideNew(){var a=getNodeRef("newCustomer");a.style.visibility="hidden";a.style.display="none"}function showCurrent(){var a=getNodeRef("newCustomer"),b=getNodeRef("currentCustomer");a.style.visibility="hidden";a.style.display="none";b.style.top=topLocation;b.style.display="block";b.style.visibility="visible"} function showHideModifyAccountDiv(a,b){var c=getNodeRef(a+"priceRow"),d=getNodeRef(a+"priceDiv");if(c&&d)if(b){c.style.visibility="visible";c.style.display="block";d.style.visibility="visible";d.style.display="block"}else{c.style.visibility="hidden";c.style.display="none";d.style.visibility="hidden";d.style.display="none"}}function showModifyAccountDivOnly(a){if(a=getNodeRef(a+"priceDiv")){a.style.visibility="visible";a.style.display="block"}} function showAccountInfo(){var a=getNodeRef("accountInfo"),b=getNodeRef("productList"),c=getNodeRef("downloadData"),d=getNodeRef("invoiceData");c.style.visibility="hidden";c.style.display="none";d.style.visibility="hidden";d.style.display="none";b.style.visibility="hidden";b.style.display="none";a.style.visibility="visible";a.style.display="block"} function showProductInfo(){var a=getNodeRef("accountInfo"),b=getNodeRef("productList"),c=getNodeRef("downloadData"),d=getNodeRef("invoiceData");c.style.visibility="hidden";c.style.display="none";d.style.visibility="hidden";d.style.display="none";a.style.visibility="hidden";a.style.display="none";b.style.visibility="visible";b.style.display="block"} function showDownloadInfo(){var a=getNodeRef("accountInfo"),b=getNodeRef("productList"),c=getNodeRef("downloadData"),d=getNodeRef("invoiceData");d.style.visibility="hidden";d.style.display="none";a.style.visibility="hidden";a.style.display="none";b.style.visibility="hidden";b.style.display="none";c.style.visibility="visible";c.style.display="block"} function showInvoiceInfo(){var a=getNodeRef("accountInfo"),b=getNodeRef("productList"),c=getNodeRef("downloadData"),d=getNodeRef("invoiceData");a.style.visibility="hidden";a.style.display="none";b.style.visibility="hidden";b.style.display="none";c.style.visibility="hidden";c.style.display="none";d.style.visibility="visible";d.style.display="block"} function showTerms(){window.open("/info/tosfull.htm","TOS","resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,width=500,height=300,top=10,left=10").focus()}function OpenCVVPage(){var a=590,b=650,c=screen.availWidth,d=screen.availHeight;if(a+10>c)a=c-10;if(b+10>d)b=d-10;window.open("/info/cvv.html","CVV","resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,width="+a+", height="+b+",top=10,left=10").focus()} function showIDResults(){if(theHTTTPObject.readyState==4)if(theHTTTPObject.status==200){var a=theHTTTPObject.responseText;if(a.length>5){setInnerHTML("idFeedback",a);document.newCust.rUserID.focus();document.newCust.rUserID.select()}else setInnerHTML("idFeedback","&nbsp;")}}function validateEnteredEmail(a){var b=a.reMail;if(!validateEmail(b.value)){alert(b.value+" does not seem to be a valid email address");setTimeout(function(){setFormFieldFocus(b);b=null},1)}} function stringHasInvalidIDPWChars(a){return a.match(/\W/)} function validatePW(a){var b=a.rPasswd.value.toLowerCase().trim(),c=a.rUserID.value.toLowerCase().trim(),d=a.rFirstName.value.toLowerCase().trim(),f=a.rLastName.value.toLowerCase().trim(),e="",g=0;if(b.length<8)e+="Passwords must be at least 8 characters long.<br />";else if(b.length>20)e+="Passwords cannot be over 20 characters long.<br />";if(stringHasInvalidIDPWChars(b))e+="Passwords can be made up of the characters A-Z, a-z, 0-9, and under_bar only.<br />";if(b.indexOf(d)>-1)e+="Password cannot have your first name in it.<br />"; if(b.indexOf(f)>-1)e+="Password cannot have your last name in it.<br />";if(b==c)e+="Password cannot be the same as your user ID.<br />";else if(b.indexOf(c)>-1)e+="Password cannot have your user ID in it.<br />";else for(g=0;g<c.length-6;g++){d=a.rUserID.value.substr(g,5);if(b.indexOf(d.toLowerCase())>-1){e+="Password cannot have a big part of your user ID (&quot;"+d+"&quot;) in it.<br />";break}}d=c=0;var i=f=1,h=1;for(g=0;g<b.length;g++){d=b.charCodeAt(g);if(d==c){f++;i=h=1}else if(d==c+1){h=f= 1;i++}else{if(d==c-1){f=1;h++}else h=f=1;i=1}if(f>=3){e+="Password cannot have more than 2 repeated characters in a row (&quot;"+a.rPasswd.value.substr(g-f+1,f)+"&quot;) in it.<br />";break}else if(h>=3){e+="Password cannot have more than 2 descending characters in a row (&quot;"+a.rPasswd.value.substr(g-h+1,h)+"&quot;) in it.<br />";break}else if(i>=3){e+="Password cannot have more than 2 ascending characters in a row (&quot;"+a.rPasswd.value.substr(g-i+1,i)+"&quot;) in it.<br />";break}c=d}if(!e== ""){var j=a.rPasswd;setInnerHTML("pwFeedback",e);setTimeout(function(){setFormFieldFocus(j);j=null},1)}else setInnerHTML("pwFeedback","&nbsp;")} function checkIDforUsage(a){setInnerHTML("idFeedback","&nbsp;");var b="";if(a.rUserID.value.length<4)b+="User ids must be at least 4 characters long.<br />";else if(a.rUserID.value.length>20)b+="User ids cannot be over 20 characters long.<br />";if(stringHasInvalidIDPWChars(a.rUserID.value))b+="User ids can be made up of the characters A-Z, a-z, 0-9, and under_bar only.<br />";if(b==""){if(theHTTTPObject=createXMLHTTPRequest()){a=encodeURIComponent(a.rUserID.value);theHTTTPObject.onreadystatechange= showIDResults;theHTTTPObject.open("GET","/cgi-bin/checkID.cgi?id="+a,true);theHTTTPObject.send(null)}}else{setInnerHTML("idFeedback",b);var c=a.rUserID;setTimeout(function(){setFormFieldFocus(c);c=null},1)}} function validatePromoCode(a,b){setInnerHTML(b,"&nbsp;");var c=a.promoCode.value.trim();if(c!="")if(theHTTTPObject=createXMLHTTPRequest()){c=encodeURIComponent(c);var d=encodeURIComponent(a.product.value);theHTTTPObject.onreadystatechange=function(){if(theHTTTPObject.readyState==4)if(theHTTTPObject.status==200){var f=theHTTTPObject.responseText;f.length>5?setInnerHTML(b,f):setInnerHTML(b,"&nbsp;")}};theHTTTPObject.open("GET","/cgi-bin/checkPromo.cgi?code="+c+"&prod="+d,true);theHTTTPObject.send(null)}} ;