function convert(form) {
	if(!(document.convform.val.value)){
		document.getElementById('answ').innerHTML = "Ââåäèòå ñóììó!";
	} 
	else if(document.convform.from.options[document.convform.from.selectedIndex].value == document.convform.to.options[document.convform.to.selectedIndex].value)
		document.getElementById('answ').innerHTML = "Âàëþòû èäåíòè÷íû!";
	else {
		if(document.convform.from.options[document.convform.from.selectedIndex].value == 1)
		{
			var step1 = document.convform.val.value/document.convform.to.options[document.convform.to.selectedIndex].value;
			if(isNaN(step1))
				document.getElementById('answ').innerHTML = "Ââåäèòå ÷èñëî!";
			else
				document.getElementById('answ').innerHTML = step1.toFixed(2);
		}
		else if(document.convform.to.options[document.convform.to.selectedIndex].value == 1)
		{
			var step1 = document.convform.val.value * document.convform.from.options[document.convform.from.selectedIndex].value;
			if(isNaN(step1))
				document.getElementById('answ').innerHTML = "Ââåäèòå ÷èñëî!";
			else
				document.getElementById('answ').innerHTML = step1.toFixed(2);
		}
		else {
			var step1 = document.convform.val.value*document.convform.from.options[document.convform.from.selectedIndex].value;
			var step2 = step1/document.convform.to.options[document.convform.to.selectedIndex].value
			if(isNaN(step2))
				document.getElementById('answ').innerHTML = "Ââåäèòå ÷èñëî!";
			else
				document.getElementById('answ').innerHTML = step2.toFixed(2);
		}
	}
}
var newwindow;