function calcCredit()
{
	var annual_rate = document.getElementById('procent').value;
//alert(annual_rate);
	var amount = document.getElementById('credit_amount').value;
//alert(amount);
	var period = document.getElementById('credit_period').value;
//alert(period);
 	if((annual_rate=='')||(amount=='')||(period=='')){
           alert('Вы не заполнили все поля');

	}
	else{

	var firstN, secondN, result, string_result;
	
	firstN = annual_rate/12/100;
	secondN = Math.pow(1+firstN,-(period-1));
	result = Math.round(amount*(firstN/(1-secondN)));
	document.getElementById('monthly_payment').innerHTML = result;
	return false;
	}
return false;
}
