function confirmDelete() {
	if (confirm('Are you sure you want to delete this?')) {
		return true;
	} else {
		return false;
	}
}

function allowExt(what,allowed) {
	var strExtension = what.value.substr(what.value.length-3, 3)
	if (allowed.indexOf(strExtension) < 0) {
		alert("The file type you have selected is not allowed. Please select a different file.\n\nIf the file is a 'jpeg', please rename the extension to 'jpg'.");
		return false;
	} else {
		return true;
	}
}

function disallowExt(what,disallowed) {
	var strExtension = what.value.substr(what.value.length-3, 3)
	if (disallowed.indexOf(strExtension) >= 0) {
		alert("The file type you have selected is not allowed. Please select a different file.\n\nIf the file is a 'jpeg', please rename the extension to 'jpg'.");
		return false;
	} else {
		return true;
	}
}

function validateNewsSearch(what) {
	if (what.q.value == '') {
		alert("Please enter a keyword and submit again");
		what.q.select();
		return false;
	} else {
		return true;
	}
}

function validateTeamSearch(what) {
	if (what.forename.value == '' && what.surname.value == '') {
		alert("Please enter a forename and/or surname and submit again");
		what.forename.select();
		return false;
	} else {
		return true;
	}
}

function dropjump(what) {
	window.location.href = 'default.php?cat=' + what.value;
}

function checkUncheckAll(theElement) {
	var theForm = theElement.form, z = 0;
	alert(theForm[z].name);
	while (theForm[z].type == 'checkbox' && theForm[z].name != 'checkall') {
		theForm[z].checked = theElement.checked;
		z++;
	}
}

function validateSiteSearch(what) {
	if (what.keyword.value == '') {
		alert("Please enter a search term and submit again.");
		what.keyword.select();
		return false;
	} else {
		return true;
	}
}

