var count=0;function SubmitOnce(){if(count==0){count++;return true}else{return false}}function contactUs(dept){contact=document.getElementById(dept);contact.checked=true;window.location=contact.value}function setInitCountry(country){countryList=document.getElementById('country');for(i=0;i<countryList.length;i++){if(countryList.options[i].value==country){countryList.selectedIndex=i}}}function changeLocale(){country=document.getElementById('country');zip=document.getElementById('zip');if(country.value=="US"){zip.disabled=false;zip.value="";zip.setAttribute('maxlength',10)}else if(country.value=="CA"){zip.disabled=false;zip.value="";zip.setAttribute('maxlength',7)}else{zip.value="";zip.disabled=true}return}function verifyForm(){email1=document.getElementById('email1').value;email2=document.getElementById('email2').value;country=document.getElementById('country').value;zip=document.getElementById('zip').value;var error="";if(email1+email2==""){var error="\n- Enter your email address twice (for verification)"}else{var validemail=/^([a-zA-Z0-9_'+*$%\^&!\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9:]{2,4})+$/;if((email1=="")||(email2=="")){var error="\n- Re-enter your email address (for verification)"}else if(email1!=email2){var error="\n- Check that your email address is entered correctly"}else if(validemail.test(email1)!=true){var error="\n- Enter a valid email address"}}if(country=="US"){var validzip=/^\d{5}([\-]?\d{4})?$/;if(zip==""){var error=error+"\n- Enter your zip code"}else if(validzip.test(zip)!=true){var error=error+"\n- Enter a valid U.S. ZIP code"}}else if(country=="CA"){var validzip=/^[AaBbCcEeGgHhJjKkLlMmNnPpRrSsTtVvXxYy]\d[A-Za-z]\s?\d[A-Za-z]\d$/;if(zip==""){var error=error+"\n- Enter your postal code"}else if(validzip.test(zip)!=true){var error=error+"\n- Enter a valid Canadian postal code"}}else if(country==""){var error=error+"\n- Select your country"}if(error==""){return true}else{var error="Before continuing, please:\n"+error;alert(error);return false}}if(window.attachEvent)window.attachEvent("onload",setListeners);function setListeners(){inputList=document.getElementsByTagName("INPUT");for(i=0;i<inputList.length;i++){inputList[i].attachEvent("onpropertychange",restoreStyles);inputList[i].style.backgroundColor=""}selectList=document.getElementsByTagName("SELECT");for(i=0;i<selectList.length;i++){selectList[i].attachEvent("onpropertychange",restoreStyles);selectList[i].style.backgroundColor=""}}function restoreStyles(){if(event.srcElement.style.backgroundColor!="")event.srcElement.style.backgroundColor=""}