
function confirmDelete(UID, text, page){
	var answer = confirm ("Are you sure you want to delete " + text + "?")
	if (answer) {
		window.location="" + page + "?view=delete&text=" + text + "&UID=" + UID + "";
		return;
	}else{
		return;
	}	
}






function numbersonly(e){
	var unicode=e.charCode? e.charCode : e.keyCode
	if (unicode!=8){ //if the key isn't the backspace key (which we should allow)
		if (unicode<48||unicode>57) //if not a number
		return false //disable key press
	}
}


/* CHECKS */
function formCheckMisc() {
	var validEmail = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	if(!document.forms['event_form_misc'].event_email.value.match(validEmail)) {
		alert("Please enter a valid email.");
		document.forms['event_form_misc'].event_email.focus();
		return false;
	}
	alert("All good, please continue");	
	//return true;
}

