
function checkformCreateAcct(formName){$(formName).name.value=$(formName).newAccountFirstName.value+" "+$(formName).newAccountLastName.value;Errors=$H({'_strip':['newAccountFirstName','newAccountLastName','emailAddress','confirmEmailAddress'],'newAccountFirstName':$H({"The First Name field is blank.":"!field('newAccountFirstName').present()","The First Name field appears to be incorrectly formed.":"!cf_isName($F(field('newAccountFirstName')))","We are unable to create a full username.":"!cf_set('name',$F(field('newAccountFirstName')) + ' ' + $F(field('newAccountLastName')))"}),'newAccountLastName':$H({"The Last Name field is blank.":"!field('newAccountLastName').present()","The Last Name field appears to be incorrectly formed.":"!cf_isName($F(field('newAccountLastName')))"}),'emailAddress':$H({"The Email Address field is blank.":"!field('emailAddress').present()","The Email Address field appears to be incorrectly formed.":"!cf_isEmailAddr($F(field('emailAddress')))"}),'confirmEmailAddress':$H({"The Email Address Confirmation field is blank.":"!field('confirmEmailAddress').present()","The Email Address Confirmation field appears to be incorrectly formed.":"!cf_isEmailAddr($F(field('confirmEmailAddress')))","The Email Address and Email Address Confirmation fields must match exactly.":"$F(field('emailAddress')) != $F(field('confirmEmailAddress'))"}),'password':$H({"The Password field is blank.":"!field('password').present()","A password may consist of 6-20 letters and/or numbers without spaces.":"!cf_isPassword($F(field('password')))"}),'confirmPassword':$H({"The Password Confirmation Field is blank.":"!field('confirmPassword').present()","A password may consist of 6-20 letters and/or numbers without spaces.":"!cf_isPassword($F(field('confirmPassword')))","The Password and Password Confirmation fields must match exactly.":"$F(field('password')) != $F(field('confirmPassword'))"})});return checkform(formName);}
function checkformCreateAcctLogin(formName){Errors=$H({'_strip':['loginemailAddress','loginpassword'],'loginemailAddress':$H({'The Email Address field is blank. ':"!field('loginemailAddress').present()",'The Email Address appears to be incorrectly formed. ':"!cf_isEmailAddr($F(field('loginemailAddress')))"}),'loginpassword':$H({'The Password field is blank. ':"!field('loginpassword').present()",'A password may consist of 6-20 letters and/or numbers without spaces. ':"!cf_isPassword($F(field('loginpassword')))"})});return checkform(formName);}
function checkformEditProfile(formName){Errors=$H({'_strip':['firstName','lastName','email'],'password':$H({'The Password field is blank. ':"!field('password').present()",'A password may consist of 6-20 letters and/or numbers without spaces. ':"!cf_isPasswordForCReps($F(field('password')))"}),'firstName':$H({'The First Name field appears to be incorrectly formed. ':"( !field('firstName').present() && field('lastName').present() ) || (field('firstName').present() && !cf_isName($F(field('firstName'))))"}),'lastName':$H({'The Last Name field appears to be incorrectly formed. ':"( field('firstName').present() && !field('lastName').present() ) || (field('lastName').present() && !cf_isName($F(field('lastName'))))"}),'email':$H({'The New Email Address field appears to be incorrectly formed. ':"field('email').present() && !cf_isEmailAddr($F(field('email')))"}),'newPassword':$H({'A password may consist of 6-20 letters and/or numbers without spaces. ':"field('newPassword').present() && !cf_isPassword($F(field('newPassword')))",'The New Password and New Password Confirmation fields must match exactly. ':"field('newPasswordConfirm').present() && $F(field('newPassword')) != $F(field('newPasswordConfirm'))"}),'newPasswordConfirm':$H({'The New Password Confirmation field is blank. ':"!field('newPasswordConfirm').present() && field('newPassword').present()"})});return checkform(formName);}
function checkformEmailPref(formName){Errors=$H({'_strip':['firstName','lastName','emailAddress','zipCode','birthMonth','birthDay','birthYear'],'firstName':$H({"The first Name field is blank.":"!field('firstName').present()","The first Name field appears to be incorrectly formed.":"!cf_isName($F(field('firstName')))"}),'lastName':$H({"The last Name field is blank.":"!field('lastName').present()","The last Name field appears to be incorrectly formed.":"!cf_isName($F(field('lastName')))"}),'emailAddress':$H({"The Email Address field is blank.":"!field('emailAddress').present()","The Email Address field appears to be incorrectly formed.":"!cf_isEmailAddr($F(field('emailAddress')))"}),'zipCode':$H({"The Zip Code field is blank.":"!field('zipCode').present()",'The Zip Code field appears to be incorrectly formed. ':"!cf_isZip($F(field('zipCode')))"}),'country':$H({'Please select a Country from the list. ':"field('country').selectedIndex == 0"}),'birthYear':$H({'The Birth Date appears to be incorrectly formed. ':"(field('birthMonth').selectedIndex == 0 || field('birthDay').selectedIndex == 0 || field('birthYear').selectedIndex == 0) && !(field('birthMonth').selectedIndex == 0 && field('birthDay').selectedIndex == 0 && field('birthYear').selectedIndex == 0)",'The Birth Date is invalid.':"!checkBirthDate(formName)"})});return checkform(formName);}
function checkBirthDate(formName){var birthYear=$('birthYear').value;var birthMonth=$('birthMonth').value;var birthDay=$('birthDay').value;var today=new Date();var myDate=new Date();myDate.setFullYear(birthYear,birthMonth-1,birthDay);if(birthMonth==2){var leepYear=(birthYear%4==0&&(birthYear%100!=0||birthYear%400==0));if(birthDay>29||(birthDay==29&&!leepYear)){return false;}}
if((birthMonth==4||birthMonth==6||birthMonth==9||birthMonth==11)&&birthDay==31){return false;}
if(myDate>=today){return false;}
return true;}
function checkformEmailFriend(formName){Errors=$H({'_strip':['fromName','fromAddress','to'],'fromName':$H({"The Your Name field is blank.":"!field('fromName').present()","The Your Name field appears to be incorrectly formed.":"!cf_isName($F(field('fromName')))"}),'fromAddress':$H({"The Your Email Address field is blank.":"!field('fromAddress').present()","The Your Email Address field appears to be incorrectly formed.":"!cf_isEmailAddr($F(field('fromAddress')))"}),'to':$H({"The Friend's Email Address field is blank.":"!field('to').present()","The Friend's Email Address field appears to be incorrectly formed.":"!cf_isEmailAddrList($F(field('to')))"})});return checkform(formName);}
function checkformEditPaymentOption(formName){Errors=$H({'_strip':['CCName'],'CCName':$H({"The Account Holder's Name field is blank. ":"!field('CCName').present()","The Account Holder's Name field appears to be incorrectly formed.":"!cf_isName($F(field('CCName')))"})});return checkform(formName);}