function validateForm(form) {
	if(form.email.value == "" || form.name.value == "") {
		alert("You must fill in your name and email address.");
		return false;
	} else {
		email = form.email.value;
		if(isValidEmail(email)) {
			return true;
		} else {
			alert("The email address you have entered in invalid.");
			return false;
		}
	}
}

function isValidEmail(email) {
	var re = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	return(re.test(email));
}

// open window function
function openWindow(url,name,w,h,scroll,loc,menu,resize,status,toolbar) {
	if(w == null) w=600;
	if(h == null) h=400;
	if(name == "" || name == null) name = "spawnedWin";
	if(loc == null) loc=0;
	if(menu == null) menu=0;
	if(resize == null) resize=0;
	if(scroll == null) scroll='auto';
	if(status == null) status=0;
	if(toolbar == null) toolbar=0;
	var attr = "width=" + w + ",height=" + h + ",location=" + loc + ",menubar=" + menu + ",resizable=" + resize + ",scrollbars=" + scroll + ",status=" + status + ",toolbar=" + toolbar;
	newWin = window.open(url,name,attr);
	newWin.focus();
	return false;
}

function report_bug() {
	var url = "report_bug.php";
	var name = "report_bug";
	var w=430;
	var h=460;
	openWindow(url,name,w,h,1);
}
