function isEmpty(f) {
 if(f==null) return true
 for(var i=0; i<f.length; i++) if(f.charAt(i) != ' ') return false
 return true
}
function checkForm(form) {
 if(isEmpty(form.value)) { alert("Hang on! You've missed an entry..."); form.focus(); return false }
 return true
}
function checkEmail(txt) {
 var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
 var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
 if(!reg1.test(txt.value) && reg2.test(txt.value)) return true
 alert("The email address you entered is not valid.\nPlease try again.")
 txt.focus()
 txt.select()
 return false
}
function menu(num,tot) {
 if(!document.getElementById) return
 for(i=1;i<=tot;i++) { if(i != num) document.getElementById('divSub'+i).style.display = "none" }
 divStyle = document.getElementById('divSub'+num).style
 if(divStyle.display == "none") divStyle.display = ""
 else divStyle.display = "none"
}
