function makeActive(menuItem) {
	
	str = menuItem.src;
	str = str.replace(/normal/, "over");
	menuItem.src = str;
	
}

function makeInactive(menuItem) {
	
	str = menuItem.src;
	str = str.replace(/over/, "normal");
	menuItem.src = str;
	
}

function goActive(virtualLink) {
	
	virtualLink.style.color = "rgb(190,90,40)";
	
}

function goInactive(virtualLink) {
	
	virtualLink.style.color = "rgb(90,90,40)";
	
}

function showPhoto(fileName, width, height) {
	
	document.getElementById("PhotoViewerCloseButton").style.display = "block";
	document.getElementById("PhotoViewer").style.display = "block";
	document.getElementById("PhotoViewer").innerHTML = "<img src='photos/" + fileName + "' width='" + width + "' height='" + height + "' alt='' /><img src='photos/" + fileName + "' width='" + width + "' height='" + height + "' alt='' /><img src='photos/" + fileName + "' width='" + width + "' height='" + height + "' alt='' /><img src='photos/" + fileName + "' width='" + width + "' height='" + height + "' alt='' /><br /><img src='photos/" + fileName + "' width='" + width + "' height='" + height + "' alt='' /><img src='photos/" + fileName + "' width='" + width + "' height='" + height + "' alt='' /><img src='photos/" + fileName + "' width='" + width + "' height='" + height + "' alt='' /><img src='photos/" + fileName + "' width='" + width + "' height='" + height + "' alt='' />";

}

function hidePhoto() {
	
	document.getElementById("PhotoViewer").style.display = "none";
	document.getElementById("PhotoViewerCloseButton").style.display = "none";
	
}

function validateForm(lang) {

	if(document.getElementById("message").value == "") {
		if(lang == "en") {
			alert("Please write something...");
		} else {
			alert("Vennligst skriv noe...");
		}
		document.getElementById("message").focus();
	} else if(document.getElementById("humanValue").value == "") {
		if(lang == "en") {
			alert("Please answer the control question. Thanks. (In order to verify that you're not a spambot)");
		} else {
			alert("Vennligst svar på spørsmålet. Takk. (For å verifisere at du ikke er en spambot)");
		}
		document.getElementById("humanValue").focus();
	} else {
		document.getElementById("ContactForm").submit();
	}
	
}