function show(layer) {
	showhide(layer, 'block');
}
function hide(layer) {
	showhide(layer, 'none');
}

function showhide(layer_ref, state) {
	if (document.all) { //IS IE 4 or 5 (or 6 beta)
		eval( "document.all." + layer_ref + ".style.display = state");
	}
	if (document.layers) { //IS NETSCAPE 4 or below
		document.layers[layer_ref].display = state;
	}
	if (document.getElementById && !document.all) {
		element = document.getElementById(layer_ref);
		element.style.display = state;
	}
}

function secure_confirmation(url, text) {

	if (confirm(text)) {
		location.href = url;
	}
	return false;
}

function secure_kurs_confirmation(url, text) {

	if (confirm(text)) {
		confirmation = Math.floor(Math.random()*10000);
		check = prompt(text+" Zum löschen des Kurses geben Sie bitte die Zahl '"+confirmation+"' ein ", "");
		if (confirmation != check) {
			alert('Kurs nicht gelöscht');
		}
		else {
			location.href = url;
		}
	}
	return false;
}

