//vypocet pro numbers
function vypocet()
{
 var from2, to2, pom, vstup, vysl;
 with (document.f1)
  {
	 from2=from.value;
	 to2=to.value;
	 if (edit1.value==""){vstup="0"}
	  else {vstup=edit1.value};
  }
 vstup=vstup.toUpperCase();
 for(x=0;x<vstup.length;x++)
   {
     code=vstup.charCodeAt(x);
	 if ((code>57)&&(code<65)) {code=91;};
	 if (code>64) {code=code-7;}
	 code=code-48;
	 if (code>=from2) {
						with (document.f1)
						  {
							cislo=from.selectedIndex;
							url=from.options[cislo].text;
							for(y=url.length-1;y>-1;y--)
							  {if (url.charCodeAt(y)!=160) {break;}}
							url=url.substring(0,y+1);
							edit2.value="invalid "+url+" number";
							return;
						  }	  
					 }
   }
 pom=parseInt(vstup,from2);
 za=new Number(pom);
 vysl=(za.toString(to2));
 document.f1.edit2.value=vysl.toUpperCase();
}