function checkForm(f) {
var err='' ;
if (f.message.value == '')
	err+="You must type a message\n" ;
if (f.name.value == '')
	err+="You must enter your name\n" ;
if (!checkMail(f.email.value))
	err+="Your email address is blank or invalid\n" ;
if (parseInt(f.subject.options[f.subject.selectedIndex].value) == 0)
	err+="You must pick a subject" ;
if (err) {
	alert(err) ;
	return false ;
	}
else
	return true ;
}

function checkMail(m) {
var regex = /^.+@.+\..+$/i ;
return regex.test(m) ;
}

function confirmUrl(u,msg) {
if (confirm(msg))
	document.location.replace(u) ;
}