function writeswf(myswf){
	if(myswf==1){
		document.write('<OBJECT classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="800" height="600" id="index" align="middle">' +
		'<p style="font-family:Arial,Verdana,Sans-Serif;font-size:70%;color:white;">If the movie below is not visible your browser does not have the latest Flash plugin. <a href="http://www.macromedia.com/go/getflashplayer" target="_blank" style="color:white;">Please visit the Macromedia website to update.</a></p>' +
		'<PARAM name="allowScriptAccess" value="sameDomain">' +
		'<PARAM name="movie" value="index.swf">' +
		'<PARAM name="quality" value="high">' +
		'<PARAM name="bgcolor" value="#000000">' +
		'<EMBED src="index.swf" quality="high" bgcolor="#000000" width="800" height="600" name="index" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">' +
		'</OBJECT>');
	}else if(myswf==2){
		document.write('<OBJECT classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="780" height="586" id="index" align="middle">' +
		'<p style="font-family:Arial,Verdana,Sans-Serif;font-size:70%;color:white;">If the movie below is not visible your browser does not have the latest Flash plugin. <a href="http://www.macromedia.com/go/getflashplayer" target="_blank" style="color:white;">Please visit the Macromedia website to update.</a></p>' +
		'<PARAM name="allowScriptAccess" value="sameDomain">' +
		'<PARAM name="movie" value="tour.swf">' +
		'<PARAM name="quality" value="high">' +
		'<PARAM name="bgcolor" value="#000000">' +
		'<EMBED src="tour.swf" quality="high" bgcolor="#000000" width="780" height="586" name="index" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">' +
		'</OBJECT>');
	}
}

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

