function findit() {
	
	findtext = document.find.vyraz.value;

	url = "http://www.google.com/search?hl=cs&inlang=cs&ie=ISO-8859-2&filter=0&as_sitesearch=ikos.cz&as_q="+findtext
	
	location.replace(url);

}

function Kontrola () {

	error = 0;

    if ( document.formCalc.vyska.value < 1 ) {
		document.formCalc.ErrorMessage.value = "Nesprvn� v�ka etikety!";
    	error = 1;
	}
	
    if ( document.formCalc.mezera.value < 1 ) {
		document.formCalc.ErrorMessage.value = "Nespr�vn� v�ka mezery!";
    	error = 1;    
	}
	
    if ( document.formCalc.delka.value > 999 ) {
		document.formCalc.ErrorMessage.value = "D�lka barvic� p�sky m�e b�t nejv�e 999 metr�!";
    	error = 1;   
	}
	
	if (error == 1) {
		document.formCalc.pocet.napasce = 0;
    	document.formCalc.pocet.pasek = 0;
    	return 0;
    }	
	
	document.formCalc.ErrorMessage.value = "";
	return 1;
 }
	

function Calc1() {

  	if (Kontrola() == 0) {
  		return;
  	}
  	
  	pocet = document.formCalc.pocet.value;
    vyska = document.formCalc.vyska.value;
    mezera = document.formCalc.mezera.value;
	delka = document.formCalc.delka.value;
	
	napasce = Math.round(delka * 1000 / ( vyska * 1 + mezera * 1 ));
	pasek = Math.round(pocet / napasce * 100)/100;
	// kotoucu = Math.round(sLN * ( sLH + sSH ) / 10 / sRL) /100;

    // document.formCalc.NumberOfLabels.value = 10 * Math.round( sNL / 10 ) ;
    document.formCalc.napasce.value = napasce ;
    document.formCalc.pasek.value = pasek;


}
  


