// Script to validate form before submission
// Version 1.3.1.0; Created 11-Aug-2005; Latest:  
document.WWW.bypassValidateForm = false;
document.WWW.doValidateForm = 'validateForm()';

function validateForm() {//20050811
	var f;
	f=MM_findObj('bbf_Booklist_Email'); if (f==null) return true;//fail +ve
	if (f.value==''){
		alert('Please enter the email address you saved your list to.');
		f.focus(); return false;
	}
	if (!WWW_isValidEmail(f.value)){
		alert('Please check and correct the spelling of your email address');
		f.focus(); return false;
	}
	f=MM_findObj('bbf_Booklist_Password'); if (f==null) return true;//fail +ve
	if (f.value==''){
		alert('Please enter the unique password for the list you want to retrieve.\nYou can find this in the email we sent you.\n\nIf you cannot find your password click \'forgotten password\',');
		f.focus(); return false;
	}
return true;
}

document.WWW.bypassValidateLogin = false;
document.WWW.doValidateLogin = 'validateLogin()';

function validateLogin() {//20050811
	var f;
	f=MM_findObj('bbf_Login_Email'); if (f==null) return true;//fail +ve
	if (f.value==''){
		alert('Please enter the email address you registered with.');
		f.focus(); return false;
	}
	if (!WWW_isValidEmail(f.value)){
		alert('Please check and correct the spelling of your email address');
		f.focus(); return false;
	}
	f=MM_findObj('bbf_Login_Password'); if (f==null) return true;//fail +ve
	if (f.value==''){
		alert('Please enter the your password for the list you want to retrieve.\n\nIf you cannot find your password click \'forgotten password\'');
		f.focus(); return false;
	}
return true;
}

