function submitForm() {
	document.modsearch.submit();
}

function displayStatus(mode) {
	if (mode == "out") {
		document.getElementById('status').innerHTML = "";
	} else if (mode == "search") {
		document.getElementById('status').innerHTML = "Search completed.";
	}
}

function displayPrereq(code, modules) {
	document.getElementById('status').innerHTML = "Pre-requisite for " + code + " unfulfilled: " + modules;
}

function showModule() {
	var shortlist = document.getElementById('mshortlist');
	
	for (var i = 0; i < shortlist.options.length; i++) {
		if (shortlist.options[i].selected) {
			var code = shortlist.options[i].value;
		}
	}
	
	window.open("module.php?code=" + code);
}

function showModule2() {
	var shortlist = document.getElementById('mavailable');
	
	for (var i = 0; i < shortlist.options.length; i++) {
		if (shortlist.options[i].selected) {
			var code = shortlist.options[i].value;
		}
	}
	
	window.open("module.php?code=" + code);
}

function showModule3(code) {
	window.open("module.php?code=" + code);
}