function in_cm(form) {
	conversion=form.conversion.value;
	if((conversion==null)||(conversion=="")||(isNaN(conversion))) {
		form.answer.value="?";
		alert('Please enter a length in numbers. Use a period for the decimal place.');
		form.conversion.focus();
		form.conversion.select();
		return false;
	}
	if (form.type.value=="cm to in") {
		var answer=conversion * 0.3937008;
		var round=Math.round(10*answer)/10;
		var text_units=" inches";
		form.answer.value=round + text_units;
	}
	if (form.type.value=="in to cm") {
		var answer=conversion * 2.54;
		var round=Math.round(10*answer)/10;
		var text_units=" cm";
		form.answer.value=round + text_units;
	}
}
