function numOnly() {
	if (event.keyCode < 48 || event.keyCode > 57)
	event.returnValue= false;
}

function wrongParameters(param){
	switch (param) {
		case "D":
			if (document.comments.comment.value == "") {
				window.alert("Nelze přispět prázdným textem ... ");
				return false;
			}
		     if (document.comments.author.value == "") {
				window.alert("Prosím, vyplňte jméno!");
				return false;
			}
		break;
		case "Q":
			var str = "";
			var bad = true;
			if (document.quest.txt.value == "") {
				str = "Nelze zaslat prázdný dotaz...\n";
				bad = false;
			}
			if (document.forms[0].phone.value == "") {
				str = str + "Prosím, zadejte svůj telefon!\n";
				bad = false;
			}
			if ((document.forms[0].email.value.indexOf("@") < 1) || (document.forms[0].email.value.indexOf('.') < 3) ||
				(document.forms[0].email.value.indexOf(' ') > 0) || (document.forms[0].email.value.length < 6)) {
				str = str + "Špatně zadaný e-mail.";
				bad = false;
			}
			if (!bad) {
				window.alert(str);
			}
			return bad;
		break;
	}
}

function action_taken(par) {
	document.refresh.action.value = par;
}

