<!--
function submitform()
			{
				var i=0;
				var withoutspaces = document.sitesearch.searchquery.value.replace(/^\s*|\s(?=\s)|\s*$/g, "");
				if (withoutspaces == '') {
 					//window.alert("Enter text to search");
				} else {
					document.sitesearch.searchquery.value = '';
					document.sitesearch.searchquery.value = withoutspaces;
					document.sitesearch.submit();
				}
			}
			
function submitnewsform()
			{
				var i=0;
				var withoutspaces = document.search.query.value.replace(/^\s*|\s(?=\s)|\s*$/g, "");
				if (withoutspaces == '') {
 					//window.alert("Enter text to search");
				} else {
					document.search.query.value = withoutspaces;
					document.search.submit();
				}
			}

function outputform()
		{
			var ni = document.getElementById('errorelement');
			ni.innerHTML = " ";
			value = "<div style=\"padding:14px; font-size:8pt;\">";
			if (document.depsearch.did.value == 0){
				valid = false;
				value += "<b>Please select a department</b><br/>";
			} else {
				valid = true;
				document.depsearch.submit();
			}
			value += "</div>";
			if (valid == false){
				ni.innerHTML = value;
			}
		}
		
function downloadbut(A,B,C,mode){
	var down = document.getElementById('download');
	down.innerHTML = " ";
	value = "&nbsp;<a href=\"downloadoutput.php?out=" + A + "&dept=" + B + "&year=" + C + "&mode=" + mode + "\"><img src=\"images/save.gif\" height=\"20\" width=\"20\" border=\"0\" align=\"top\" alt=\"Download\"></a>";
	down.innerHTML = value;
}

function getSelected(mode){
	var down = document.getElementById('download');
	down.innerHTML = " ";
	out = document.depsearch.output.options[document.depsearch.output.selectedIndex].value;
	try {
		dept = document.depsearch.did.options[document.depsearch.did.selectedIndex].value;
	} catch(err) {
		dept = document.depsearch.did.value;	
	}
	year = document.depsearch.year.options[document.depsearch.year.selectedIndex].value;
	error = false;
	if (out != 0){
		if (dept != 0){
			if (year != 0)	{
				return downloadbut(out,dept,year,mode)
			} else {
				error = true;
			}
		} else {
			error = true;
		}
	} else {
		error = true;
	}
	
	if (error == true){
		value = " ";
		down.innerHTML = value;	
	}
	
}

function preloadImages() {
  var d=document; if(d.images){ if(!d.p) d.p=new Array();
    var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
}
-->