Hi everyone!

I have a textbox called 'atm' (form is called 'AddCustForm') with two event handlers: onFocus and onBlur. Here is the code for both events.
Code:
onBlur="LookForBlank(this);"
function LookForBlank(sAtmNumb){
	if (sAtmNumb.value=='' || sAtmNumb.value=='undefined'){
		alert('The ATM # is missing. Please enter a ATM Number.');
		AddCustForm.atm.focus();}
	else{
		document.location.href="addatmcust.asp?ATMNUMB=" + sAtmNumb.value;
	}
}

onFocus="if (AddCustForm.atm.value != '' || AddCustForm.atm.value != 'undefined'){AddCustForm.customer.focus();}
The onBlur event works fine, but it is somehow conflicting with the onFocus event. This is how I want the onFocus event to work: If the atm field is NOT empty or NOT equal to 'undefined' then move the focus to the next field. I hope I haven't confused anyone.

Any input will be greatly appreciated. Thanks in advance.