function jumpToUnit() {
	var destField = document.getElementById("destUnit");
	if (destField) {
		var unitNum = parseInt(destField.value);
		if (isNaN(unitNum) || (unitNum < 1) || (unitNum > 42)) {
			alert("Please pick a unit number between 1 and 42.");
			focusElement("destUnit");
		} else {
			var unitNumString = unitNum;
			if (unitNum < 10) {
				unitNumString = "0" + unitNumString;
			}
			location.href = "/beachhouses/unit" + unitNumString + ".htm";
		}
	}
	return false;
}

function focusElement(elemId) {
	// arbitrary set timeout necessary due to IE Windows timing bug
	setTimeout("doFocusElement('" + elemId + "')", 0);
}

// private function: do not call directly -- use focusElement.
function doFocusElement(elemId) {
    var elem = document.getElementById(elemId);
    elem.focus();
    elem.select();
}

