function openLink(link){
	window.open(link);
	}
	
function visPrint(link){
	window.open("print.php?side=" + link, 'print', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=0,width=770,height=715,left = 100,top = 20');
	}

function sjekk_komm(){
	if(document.kommentar.navn.value == ""){
		alert("Navnet må fylles ut!");
		return false;
	}
	else if(document.kommentar.tekst.value == ""){
		alert("Du må skrive en kommentar!");
		return false;
	}
	else if(document.kommentar.epost.value != ""){
		if(document.kommentar.epost.value.indexOf("@") == -1){
			if(document.kommentar.epost.value.indexOf("http://") == -1){
				document.kommentar.epost.value = "http://" + document.kommentar.epost.value;
				return true
			}
		}
	}
	else{
		return true;
	}
}

function sjekkepost(epost){
	if(epost.indexOf("@") == -1){
		alert("E-postadressen er ikke gyldig. Prøv på nytt!");
		return false;
	}
}