function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 } 
}
window.onload = externalLinks;

function test(what) {
		return confirm(what);
	}

function zkontroluj_prispevek(theForm){
	if (theForm.jmeno.value == "" || theForm.jmeno.value.length < 2){
		alert("Prosím zadejte jméno.");
		theForm.jmeno.focus();
		return false;
	}
	if (theForm.email.value == "" || theForm.email.value.indexOf('@',1)== -1 || theForm.email.value.indexOf('.',2)==-1){
		alert("Prosím zadejte emailovou adresu.");
		theForm.email.focus();
		return false;
	}
	if (theForm.text.value == "" || theForm.text.value.length < 2){
		alert("Prosím zadejte text.");
		theForm.text.focus();
		return false;
	}
	if (theForm.kontrola.value != 2){
		alert("Prosím zadejte správný součet.");
		theForm.kontrola.focus();
		return false;
	}


return true;
}

function openwin(url,name,width,height) 
{
	window.open(url,name,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizeable=no,width="+width+",height="+height);
}
