function changeMenuStyle(n) {
	document.getElementById('m'+n).className="menuon";
}


function resetMenuStyle(n) {
	document.getElementById('m'+n).className="menuoff";
}


function changeVisibilityStyle(n,action) {
	switch(action) {
		case 0 :
			document.getElementById(n).style.visibility = "hidden";
			document.getElementById(n).style.display = "none";
			break;
		case 1 :
			document.getElementById(n).style.visibility = "visible";
			document.getElementById(n).style.display = "block";
			break;
	}
}


function selectVykonnost(n) {
	document.getElementById(n).checked = "true";
}


function Validate() {
	var sForm = document.frm;

	var sElm1 = sForm.hrajete_golf;
	var iGolf = sElm1.length;

	var sElm2 = sForm.vykonnost;
	var iVyko = sElm2.length;


	for (i = 0; i < iGolf; i++) {
		if(sElm1[i].checked && sElm1[i].value == 1) {
			for (j = 0; j < iVyko; j++) {
				if (sElm2[j].checked) {
					switch (eval(sElm2[j].value)) {
						case 1 : 
							if (sForm.handi.value.length == 0) {
								alert('Chyba : nebylo vyplněno pole "Handicap"');
								sForm.handi.focus();
								return false;
							} 
							break;
						case 2 : 
							if (sForm.green.value.length == 0) {
								alert('Chyba : nebylo vyplněno pole "č. Zelené karty"');
								sForm.green.focus();
								return false;
							} 
							break;
						case 3 : 
							if (sForm.golfc.value.length == 0) {
								alert('Chyba : nebylo vyplněno pole "Golfový klub"');
								sForm.golfc.focus();
								return false;
							} 
							break;
					}
				}
			}
		}
	} 
	return true;
}










