function enable() { 
	if (document.getElementById('other').checked == true) 
		document.getElementById('other_text').disabled=false; 
	else 
		document.getElementById('other_text').disabled=true; 
} 
function validateForm(form) {
	if (isNotEmpty(form.name)) {
		if (isNotEmpty(form.email)) {
			if (isEMailAddr(form.email)) {
				if (isNotEmpty(form.homephone)) {
					if (isNotEmpty(form.hour)) {
						if (isNotEmpty(form.minute)) {
							return true;
						}
					}
				}
			}
		}
	}
	return false;
}
function isNotEmpty(elem) {
	var str = elem.value;
	var re = /.+/;
	if(!str.match(re)) {
		alert("Complete all fields.");
		setTimeout("focusElement('" + elem.form.name + "', '" + elem.name + "')", 0);
		return false;
    	}
	else {
		return true;
	}
}
function isEMailAddr(elem) {
	var str = elem.value;
	var re = /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/;
	if (!str.match(re)) {
		alert("Wrong email adress.");
		setTimeout("focusElement('" + elem.form.name + "', '" + elem.name + "')", 0);
		return false;
	}
	else {
		return true;
	}
}
function focusElement(formName, elemName) {
    var elem = document.forms[formName].elements[elemName];
    elem.focus();
    elem.select();
}