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)b?(d.style.display="block",d.style.visibility="visible",c.style.display=navigator.appName=="Microsoft Internet Explorer"?"block":"table-row",c.style.visibility="visible"):(d.style.visibility="hidden",d.style.display="none",c.style.visibility="hidden",c.style.display="none");return!1} function toggleTableRows(a){var b=document.getElementById(a);if(b)for(var a=0,c=b.rows;b=c.item(a++);)if(b.className.indexOf("register")<=-1)b.style.display=b.style.display==""?"none":""}function showHideTableRows(a,b){var c=document.getElementById(a),d="none";b&&(d="");if(c)for(var f=0,e=c.rows;c=e.item(f++);)if(c.className.indexOf("register")<=-1)c.style.display=d}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){var b=getNodeRef(a+"priceRow"),a=getNodeRef(a+"priceDiv");if(b&&a)b.style.visibility=="visible"?(b.style.visibility="hidden",b.style.display="none",a.style.visibility="hidden",a.style.display="none"):(b.style.visibility="visible",b.style.display="block",a.style.visibility="visible",a.style.display="block")}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;a+10>c&&(a=c-10);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&&theHTTTPObject.status==200){var a=theHTTTPObject.responseText;a.length>5?(setInnerHTML("idFeedback",a),document.newCust.rUserID.focus(),document.newCust.rUserID.select()):setInnerHTML("idFeedback","&nbsp;")}} function showPWResults(){if(theHTTTPObject.readyState==4&&theHTTTPObject.status==200){var a=theHTTTPObject.responseText;a.length>5?(setInnerHTML("pwFeedback",a),document.newCust.rPasswd.focus(),document.newCust.rPasswd.select()):setInnerHTML("pwFeedback","&nbsp;")}}function validateEnteredEmail(a){var b=a.reMail;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;b.length<8?e+="Passwords must be at least 8 characters long.<br />":b.length>20&&(e+="Passwords cannot be over 20 characters long.<br />");stringHasInvalidIDPWChars(b)&&(e+="Passwords can be made up of the characters A-Z, a-z, 0-9, and under_bar only.<br />");b.indexOf(d)>-1&&(e+="Password cannot have your first name in it.<br />"); 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++)if(d=a.rUserID.value.substr(g,5),b.indexOf(d.toLowerCase())>-1){e+="Password cannot have a big part of your user ID (&quot;"+d+"&quot;) in it.<br />";break}for(var d=c=0,i=f=1,h=1,g=0;g<b.length;g++){d=b.charCodeAt(g);d==c?(f++,i=h=1):d==c+1?(h=f=1,i++):(d== c-1?(f=1,h++):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 if(theHTTTPObject=createXMLHTTPRequest())b=encodeURIComponent(a.rPasswd.value.trim()),c=encodeURIComponent(a.rUserID.value.trim()),d=encodeURIComponent(a.rFirstName.value.trim()),f=encodeURIComponent(a.rLastName.value.trim()),tranType=encodeURIComponent(a.update_flag.value.trim()),theHTTTPObject.onreadystatechange=showPWResults,theHTTTPObject.open("GET","/cgi-bin/checkID.cgi?id="+c+"&pw="+b+"&first="+d+"&last="+ f+"&tranType="+tranType,!0),theHTTTPObject.send(null)} function checkIDforUsage(a){setInnerHTML("idFeedback","&nbsp;");var b="";a.rUserID.value.length<4?b+="User ids must be at least 4 characters long.<br />":a.rUserID.value.length>20&&(b+="User ids cannot be over 20 characters long.<br />");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,!0),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!=""&&(theHTTTPObject=createXMLHTTPRequest())){var c=encodeURIComponent(c),d=encodeURIComponent(a.product.value);theHTTTPObject.onreadystatechange=function(){if(theHTTTPObject.readyState==4&&theHTTTPObject.status==200){var a=theHTTTPObject.responseText;a.length>5?setInnerHTML(b,a):setInnerHTML(b,"&nbsp;")}};theHTTTPObject.open("GET","/cgi-bin/checkPromo.cgi?code="+c+"&prod="+d,!0);theHTTTPObject.send(null)}} function verifyNoRenew(a,b,c){confirm("Are you sure you want your "+b+" subscription to stop on "+c+"?")&&a.submit()};
