function form_submit(frm) {
    if ( frm['message'].value.match(/^\s*$/) ) {
        alert('Message can\'t be blank');
        frm['message'].focus();
        return false;
    }

    if ( frm['email'].value.match(/^\s*$/) ) {
        alert('E-mail can\'t be blank');
        frm['email'].focus();
        return false;
    }

    if ( !frm['email'].value.match(/^[a-z0-9_\-\.]+@([a-z0-9_\-]+\.)+[a-z]{2,5}$/i) ) {
        alert('Invalid E-mail format');
        frm['email'].focus();
        frm['email'].select();
        return false;
    }

    return true;
}