function ff_validate_submit(element, action)
{
    if(typeof bfUseErrorAlerts != 'undefined'){
     JQuery(".bfErrorMessage").html('');
     JQuery(".bfErrorMessage").css("display","none");
    }
    error = ff_validation(0);
    if (error != '') {

        if(typeof bfUseErrorAlerts == 'undefined'){
           swal(error);
        } else {
           bfShowErrors(error);
        }
        ff_validationFocus();
    } else
        ff_submitForm();
} // ff_validate_submit