Hey everyone

, i'm having a problem. I'm working on some form, and its a quite simple registration page that includes first name, last name, username, email, password, and so on.
now, instead of doing for example:
if(isEmpty(account)){
document.frm.username.focus();
alert('*Username most contain atleast 3 characters';
return false;
}
i was doing something more like this:
if(isEmpty(account)){
document.frm.username.focus();
document.frm.eror.value='*Username most contain atleast 3 characters';
return false;
}
the "account" is just variable.
the "isEmpty" is a code i've made aswell, that works like that:
if the txt is less than 3 characters, it will return false.
frm is the form name, and username is the input name, where i enter the username i nrhe registration.
i've made a simple <textarea> code named "eror" that just works simply as it looks, if the username input is empty it will write down the error on the textarea code instead of giving that annoying alert, which is quite disturbing
now, the problem is that i dont like it like that aswell, and i was thinking if you guys could help me out with making that error just appear at the top of the screen, above all the inputs i've made, like a normal registration site that if your clicking the submit it will just simply type the error in red color above the form itself.