function capitalize(field) {
	field.value = field.value.toUpperCase();
}	

//var loginMistakes = 0;

function login() {
	with (document) {
		if (validateForm(loginForm))
			loginForm.submit();		
	}
	return;
}		

function validateForm(form) {
	with (form) {	
		var msg = null;
		var field;
		if (!radio_station.value.length) {
			msg = "Please enter your radio station call letters.";
			field = radio_station;
		} else if (!password.value.length) {
			msg = "Please enter your password."
			msg += "\n\nNOTE: If you have forgotten your password, click the 'Forgot Password' link below the ";
			msg += "login form in order to have your password emailed to you. If you do not currently have an "
			msg += "account with Autohook, click the 'Register' button to create one.";
			field = password;
		}
 
		if (msg) {
			/*loginMistakes++;
			if (loginMistakes >= 3) {
				msg += "\n\nNOTE: If you have forgotten your password, click the 'Forgot Password' link below the ";
				msg += "login form in order to have your password emailed to you. If you do not currently have an "
				msg += "account with Autohook, click the 'Register' button to create one.";
			}*/
			alert(msg);				
			if (isNav4) field.focus(); 
			return false;
		} else 
			return true;
	}
}