<!--

// overenie toho, ci su vyplnene policka meno a heslo
function over_login() {
	var m = (document.getElementById) ? document.getElementById('prihlasenie_meno') : ((document.all) ? document.all['prihlasenie_meno'] : null);
	var h = (document.getElementById) ? document.getElementById('prihlasenie_heslo') : ((document.all) ? document.all['prihlasenie_heslo'] : null);
	var meno = new String( m.value );
	var heslo = new String( h.value );
	if( meno.length < 1 ) { window.alert('Zadajte prihlasovacie meno.'); m.focus(); return; };
	if( heslo.length < 1 ) { window.alert('Zadajte prihlasovacie heslo.'); h.focus(); return; };
	send();
};

// porovnanie novych hesiel a overenie jeho skladby
function over_heslo( dlzka_hesla ) {
	var h1 = (document.getElementById) ? document.getElementById('prihlasenie_heslo1') : ((document.all) ? document.all['prihlasenie_heslo1'] : null);
	var h2 = (document.getElementById) ? document.getElementById('prihlasenie_heslo2') : ((document.all) ? document.all['prihlasenie_heslo2'] : null);
	var heslo = (document.getElementById) ? document.getElementById('prihlasenie_chpwd') : ((document.all) ? document.all['prihlasenie_chpwd'] : null);
	var heslo1 = new String( h1.value );
	var heslo2 = new String( h2.value );
	if( heslo1.length < 1 ) { window.alert('Zadajte nove heslo.'); h1.focus(); return; };
	if( heslo2.length < 1 ) { window.alert('Zadajte potvrdenie noveho hesla.'); h2.focus(); return; };
	if( heslo1.length > 0 ) {
		if( heslo1.length == heslo2.length && h1.value == h2.value ) {
			// skontroluj, ci dlzka hesla je >= ako minimalna
			var dlzka = new Number(dlzka_hesla);
			if( dlzka > heslo1.length ) { 
				window.alert( 'Zadané heslo nemá požadovanú minimálnu dĺžku: ' + dlzka + ' znakov.' );
				return -1;
			}; //end if dlzka
			// skontroluj este ci sa v hesle nachadza aspon jedno cislo
			var pocet_cisiel = new Number(0);
			for( i = 0; i < heslo1.length; i++ ) { cislo = new Number(heslo1.charAt(i)); if( isNaN(cislo) ) pocet_cisiel++; };
			if( pocet_cisiel == heslo1.length ) {
				window.alert( 'Zadané heslo neobsahuje žiadnu číslicu.' );
				return -1;
			}; //end if
			heslo.value = heslo1;
			send();
		}
		else { 
			window.alert('Heslo a potvrdenie hesla nie sú totožné. Zadajte ich prosím ešte raz.'); 
			return -1;
		}; //end if
	return 0;
	}; // end if
};


//-->
