html_print_list_box_from_key_array($list_box, session_validate_form_get_field('req_area', $req_area_covered_id));
print "</select>" . NEWLINE;
print "</td>" . NEWLINE;
print "</tr>" . NEWLINE;
# FUNCTIONALITY
$rows_functions = requirement_get_functionality($project_id, $s_req_id);
$function_ids = array();
foreach ($rows_functions as $key => $value) {
    $function_ids[] = $key;
}
print "<tr>" . NEWLINE;
print "<td class=form-lbl-r nowrap>" . lang_get('functionality') . "</td>" . NEWLINE;
print "<td class=form-data-l>" . NEWLINE;
print "<select name='req_functionality[]' size=5 multiple>" . NEWLINE;
$list_box = array();
$rows = project_get_req_functionality($project_id);
foreach ($rows as $row) {
    $list_box[$row[REQ_FUNCT_ID]] = $row[REQ_FUNCT_NAME];
}
html_print_list_box_from_key_array($list_box, session_validate_form_get_field('req_functionality', $function_ids));
print "</select>" . NEWLINE;
print "</td>" . NEWLINE;
print "</tr>" . NEWLINE;
# DOC TYPE
print "<tr>" . NEWLINE;
print "<td class=form-lbl-r nowrap>" . lang_get('req_type') . "</td>" . NEWLINE;
print "<td class=form-data-l>" . NEWLINE;
print "<select name=req_type size=1>" . NEWLINE;
$list_box = array();
$rows = project_get_req_doc_types($project_id);
foreach ($rows as $row) {
     print "</table>" . NEWLINE;
     print "</td>" . NEWLINE;
     print "</tr>" . NEWLINE;
     print "</table>" . NEWLINE;
     print "</form>" . NEWLINE;
 }
 # ----------------------------------------------------------------------------------
 # Required Document Type Table
 # ----------------------------------------------------------------------------------
 print "<br>" . NEWLINE;
 print "<form method=post action='{$page}?order_by={$order_by}&amp;order_dir={$order_dir}'>" . NEWLINE;
 print "<input type=hidden name=table value=project_manage_req_functionality>" . NEWLINE;
 print "<table class=hide70>" . NEWLINE;
 print "<tr>" . NEWLINE;
 print "<td>" . NEWLINE;
 $rows_req_functionality = project_get_req_functionality($selected_project_id, $order_by, $order_dir, $page_number);
 print "<input type=hidden name='order_dir' value='{$order_dir}'>";
 print "<input type=hidden name='order_by' value='{$order_by}'>";
 print "</td>" . NEWLINE;
 print "</tr>" . NEWLINE;
 print "</table>" . NEWLINE;
 print "</form>" . NEWLINE;
 if ($rows_req_functionality) {
     print "<table class='width70' rules=cols>" . NEWLINE;
     print "<tr>" . NEWLINE;
     html_tbl_print_header(lang_get('req_functionality'), REQ_FUNCT_NAME, $order_by, $order_dir, "{$page}?page_number={$page_number}", $page_number);
     if ($project_manager) {
         html_tbl_print_header(lang_get('edit'));
         html_tbl_print_header(lang_get('delete'));
     }
     print "\n</tr>" . NEWLINE;