function	calculate(id){
		// get input element
		ft = $('#'+id+' input[@name=feet]').val();
		ft = parseFloat(ft);
		if (!ft){
			alert('Wrong number format');	
		}
		
		// get price
		price = $('#'+id).attr('price');
		discount = $('#'+id).attr('discount');
		
		if (!price)	price = 0;
		if (!discount) discount = 0;
		
		tot  = ft*price*(100-discount)/100;
		tot = tot.toFixed(2);
		
		$('#'+id+' input[@name=result]').val(tot);		
}

function	reset(id){
		$('#'+id+' input[@name=result]').val('');
}