// JavaScript Document

function MM_openBrWindow(theURL,winName,features) { //v2.0
  newwindow = window.open(theURL,winName,features);
  if (window.focus) {newwindow.focus()}
}


var testresults
function checkemail(str){
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
if (filter.test(str))
testresults=true
else{

testresults=false
}
return (testresults)
}
function checkscript(){
if (document.form1.realname.value == "") {
		// something is wrong
		alert('Please fill in your name');
		return false;
	}
	
	else if (document.form1.email.value == "") {
	// something else is wrong
		alert('Please fill in your email address');
		return false;
	}
	else if (checkemail(document.form1.email.value) == false) {
	// something else is wrong
		alert('There is something wrong with your email address');
		return false;
	}
	else if (!document.form1.mailingList.checked && document.form1.comments.value == ""){
		alert ('Please either sign up for the mailing list or submit comments');
		return false;
	}
	// If the script makes it to here, everything is OK,
	// so you can submit the form
	return true;
	
}