function isNumeric(x) {
	var RegExp = /^(-)?(\d*)(\.?)(\d*)$/;
	var result = x.match(RegExp);
	return (result!=null);
}

function layout_submit() {
	n_length = $('#layout-length').val();
	n_width = $('#layout-width').val();
	n_depth = $('#layout-depth').val();

	if (isNumeric(n_length) && isNumeric(n_width) && isNumeric(n_depth)) {
		var url = "index.php?p=layout_case&w=" + n_length + "&h=" + n_width + "&d=" + n_depth;
		document.location.href = url;
	} else {
		alert('Please enter a dimension in all three boxes.');
	}
}