// JavaScript Document

function calc_price() {

		formula = 25 + ((document.getElementById('width').value * document.getElementById('height').value) * 0.06);
		rounded = Math.round(formula);
		fixed = rounded.toFixed(2);
		
		if(document.getElementById('width').value !="" && document.getElementById('height').value != "")
			document.getElementById('total').innerHTML= "Price &pound;" + fixed;
	}
	
	function inch(dimens) {	
		if(dimens == 1) {
			result = Math.round(document.getElementById('width').value * 25.4);
			document.getElementById('width_mm').innerHTML = result + " mm";			
		}
		if(dimens == 2) {
			result = Math.round(document.getElementById('height').value * 25.4);
			document.getElementById('height_mm').innerHTML = result + " mm";			
		}	
	}
