window.onload = contentHeight;
window.onresize = contentHeight;

function contentHeight(){
	el = document.getElementsByTagName("body");
	el[0].style.overflow = "hidden";
	if(window.innerHeight){
		workplaceHeight = window.innerHeight;
	}else if(document.documentElement && document.documentElement.clientHeight){
 		workplaceHeight = document.documentElement.clientHeight;
	}else{
		workplaceHeight = document.body.clientHeight;
	}
	document.getElementById("content").style.height = workplaceHeight - 176 + "px";;
}

function checkForm(){
	el = document.getElementById("kontakt");
	if (el.dotaz.value == "") {
		alert("Nezadali jste žádný dotaz.");
		return false;
	}
	if (el.osoba.value == ""){
		alert("Prosíme vyplňte položku Kontaktní osoba.");
		return false;
	}
	if (el.mail.value == "") {
		alert("Prosíme vyplňte položku E-mail.");
		return false;
	}
	if (email_test(el.mail.value) == false) {
		alert("Zadaná e-mailová adresa nemá platný formát.");
		return false;
	}
	function email_test(adresa) {
    		re = /^[^.]+(\.[^.]+)*@([^.]+[.])+[a-z]{2,3}$/;
    		return adresa.search(re) == 0;
	}
	return true;
}
