DECLARE
   TabEvent  VARCHAR2(80);
   TabNumber NUMBER;
   Parm_Id   ParamList;
   cur_emp   varchar2(8) := to_char(:contact.empno);
BEGIN
   TabEvent := :system.custom_item_event;
   IF (UPPER(TabEvent) = 'CLICK') then
      TabNumber := VBX.Get_Property('PRIORITY_TAB', 'CurrTab');
      IF TabNumber = 0 then
         show_view('ALL_EMPLOYEES');
      ELSIF TabNumber = 1 then
         Parm_Id := Create_Parameter_List('emp');
         Add_Parameter(Parm_Id,'EMPLOYEE',TEXT_PARAMETER,cur_emp);
         og.close('priority.ogr','control.priorite_balance');
         og.open('priority.ogr','control.priorite_balance',FALSE);
         Destroy_Parameter_List(Parm_Id);
         show_view('CUR_EMPLOYEE');
      ELSE
         show_view('CONTACT');
      END IF;
   END IF;
END;