// clears the default value of an input field if it has a new value
function clearDefault(el) {
	if (el.defaultValue==el.value) {
		el.value = ""
	}
}

function checkDefault(el) {
	if(el.value=="") {
		el.value = el.defaultValue;
	}
}

function swapVisibility(id)
{
	if(document.getElementById(id).className == "invisible" ){
		document.getElementById(id).className = "visible";
	}
	else{
		document.getElementById(id).className = "invisible";
	}
}

function confirmLink(message, link) {
	if(confirm(message)) {
		window.location=link;
	}
}