function calculate()
{
	var theform = document.calculator;
	var currencyFrom    = toFloat(theform.currencyFrom.value);
	var currencyTo		= toFloat(theform.currencyTo.value);
	var ammount			= theform.ammount.value;
	var currencyValue;
	if(ammount!='' && isFloat(ammount)) 
	{
		ammount		  = toFloat(ammount);
		currencyValue = Number(ammount) * (Number(currencyTo)/Number(currencyFrom));
		currencyValue = currencyValue * 10000;
		currencyValue = Math.round(currencyValue);
		currencyValue = currencyValue / 10000;
		
		theform.currencyValue.value = toCurrency(currencyValue);
		return true;
	}
	else
	{
		alert ('Bertrag: Bitte einen gültigen Wert eingeben!');
	  	theform.ammount.focus();
	   	return false;
	}

}
