var browser=navigator.appName
var b_version=navigator.appVersion
var version=parseFloat(b_version)
//if (browser=="Microsoft Internet Explorer"){
//	alert("Op Internet Explorer ziet alles er nog crappy uit.\nDit omdat Internet Explorer crap is.\nGebruik Firefox voor juiste weergave.");
//	document.location = "http://getfirefox.com/";
//}

/*
window.onresize = function(){
	window.location.reload(false);
}
*/
function showForm(){
	document.getElementById("commentForm").style.visibility="visible";
	document.getElementById("commentFooter").style.visibility="hidden";
}
function checkRegisterForm(){
	var username = document.registerForm.newusername.value;
	var email = document.registerForm.email.value;
	var password = document.registerForm.password.value;
	var password2 = document.registerForm.password2.value;
	
	if(username != "" && password  != "" && password2 != "" && email != ""){
		if(password == password2){
			document.registerForm.submit();
		}else{
		alert("Je wachtwoorden komen niet overeen. Probeer nog eens.");
		}
	}else{
		alert("Je hebt niet alles ingevuld.");
	}
}
function checkContactForm(){
	var name = document.contactForm.contactname.value;
	var email = document.contactForm.email.value;
	var message = document.contactForm.contactmessage.value;
	var subject = document.contactForm.subject.value;
	
	if(name != "" && message != "" && email != "" && subject != "Selecteer..."){
	
			document.contactForm.submit();
		
	}else{
		alert("Je hebt niet alles ingevuld.");
	}
}
function checkCommentForm(){
	var username = document.commentForm.username.value;
	var password = document.commentForm.password.value;
	var content = document.commentForm.content.value;
	
	if(username != "" && password  != "" && content != ""){
		document.commentForm.submit();
	}else{
		alert("Je hebt niet alles ingevuld.");
	}
}
function showComments(id){
	document.getElementById("commentbox" + id).style.visibility = "visible";
	document.getElementById("commentfooter" + id).style.visibility = "hidden";
}
function hideComments(id){
	document.getElementById("commentbox" + id).style.visibility = "hidden";
	document.getElementById("commentfooter" + id).style.visibility = "visible";
}