function simplePreload(){ 
	var args = simplePreload.arguments;
	document.imageArray = new Array(args.length);
	for(var i=0; i<args.length; i++){
		document.imageArray[i] = new Image;
		document.imageArray[i].src = args[i];
	}
}

function ChangeImage(strImageUrl,strImageName){
	objImage = document.getElementById('largeImage');
	objImage.style.display = 'none';
	objImage.src = strImageUrl;
	new Effect.Appear('largeImage');


	objImageCap = document.getElementById('imagecaption');
	if(strImageName==""){strImageName="&nbsp;";}
	objImageCap.innerHTML = "<p>"+strImageName+"</p>";




	
}

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;
	}
}

