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

    error = ff_validation(ff_currentpage);
    if (error != '') {
       if(typeof bfUseErrorAlerts == 'undefined'){
           swal(error);
        } else {
           bfShowErrors(error);
        }
        ff_validationFocus('');
    } else {
        ff_switchpage(ff_currentpage+1);
        self.scrollTo(0,0);   
    }
} // ff_validate_nextpage