function doEditAccount(){var f=document.frmAccount;f.firstname.value=f.firstname.value.trim();f.lastname.value=f.lastname.value.trim();f.zipcode.value=f.zipcode.value.trim();f.province.value=f.province.value.trim();if(f.firstname.value==""||!chkName(f.firstname)){showError(f.firstname,'Bad first name. Value must be alphabetical.');return;}if(f.lastname.value==""||!chkName(f.lastname)){showError(f.lastname,'Bad last name. Value must be alphabetical.');return;}if(f.state.selectedIndex<1&&(f.province.value==""||f.country.selectedIndex<1)){showError(f.state,'<p><i>Note: For U.S. & Canada Residents.</i><br>You must choose a state and enter a zip code.</p><p><i>Note: For Non-U.S. & Canada Residents.</i><br>You must enter a province and select a country.</p>');return;}if(f.zipcode.value==""&&(f.province.value==""||f.country.selectedIndex<1)){showError(f.zipcode,'<p>Note: For U.S. & Canada Residents.</p><p>You must enter a zip code.</p>');return;}if(f.province.value==""&&(f.zipcode.value==""||f.state.selectedIndex<1)){showError(f.province,'<p>Note: For Non-U.S. & Canada Residents.</p><p>You must enter a province.</p>');return;}if(f.country.selectedIndex<1&&(f.zipcode.value==""||f.state.selectedIndex<1)){showError(f.country,'<p><i>Note: For Non-U.S. & Canada Residents.</i><br>You must enter a province and select a country.</p><p><i>Note: For U.S. & Canada Residents.</i><br>You must choose a state and enter a zip code.</p>');return;}if((f.state.selectedIndex>1||f.zipcode.value!="")&&(f.province.value!=""||f.country.selectedIndex>1)){showError(f.state,'You must fill out one area: State/zip or Province/country. Not both.');return;}if(f.gender.selectedIndex<1){showError(f.gender,'Gender required. Please select.');return;}if(f.month.selectedIndex<1){showError(f.month,'Birth Month required. Please select.');return;}if(f.day.selectedIndex<1){showError(f.day,'Birth Day required. Please select.');return;}if(f.year.selectedIndex<1){showError(f.year,'Birth Year required. Please select.');return;}if(f.status.selectedIndex<1){showError(f.status,'Status required. Please select.');return;}if(f.education.selectedIndex<1){showError(f.education,'Education Level required. Please select.');return;}if(f.job_industry.selectedIndex<1){showError(f.job_industry,'Job Industry required. Please select.');return;}if(f.occupation.selectedIndex<1){showError(f.occupation,'Occupation required. Please select.');return;}if(f.sshhh.value.trim()==""){showError(f.sshhh,'<p>Bad password.</p>');return;}document.getElementById("btnApply").style.background="#ffffff";document.getElementById("btnApply").style.border=0;f.btnApply.value="Updating Data...";f.submit();}function doUpdatePrefs(){var f=document.frmUserPrefs;if(f.timezone.selectedIndex<1){showError(f.timezone,'<p>Please select a timezone.</p>');return;}document.getElementById("btnSave").style.background="#ffffff";document.getElementById("btnSave").style.border=0;f.btnSave.value="Saving...";f.submit();}function doChangePwd(){var f=document.frmPwd;if(f.curr_sshhh.value==""){showError(f.curr_sshhh,'<p>Current password required.</p>');return;}if(f.new_sshhh.value==""){showError(f.new_sshhh,'<p>Bad password. You must choose a password which will be difficult for someone to guess.</p><p>NEVER, under any circumstances, should your password be the same as your username or your real name.</p>');return;}if(f.new_sshhh.value!=f.confirm_sshhh.value){showError(f.new_sshhh,'Your password does not match the confirmation password. Please try again.');f.confirm_sshhh.value='';return;}document.getElementById("btnPwd").style.background="#ffffff";document.getElementById("btnPwd").style.border=0;f.btnPwd.value="Updating...";f.submit();}