Thanx for your help - you gave me a signal to do a little think 
I have used the following code:
All modification in detail.php
1. make a variable $parent_name available globally and add it to the template
Code:
// vars template
global $link_detail, $pagination, $review_rows, $ofc_review, $page_title,
$link_id, $link_title, $link_description, $link_keywords,
$category_id, $category_name, $category_path, $category_path_with_link, $parent_name,
$num_review, $avg_review, $avg_review_image;
Code:
DisplayTemplate($theme_path . "detail.html",
"\$page_title,\$link_id,\$link_title,\$link_description,".
"\$link_keywords,\$link_detail,\$avg_review,\$num_review,".
"\$avg_review_image,\$review_rows,\$ofc_review,\$pagination,".
"\$category_id,\$category_name,\$category_path,\$parent_name,".
"\$category_path_with_link");
2. Add following code before DisplayTemplate
Code:
// name of the parent category
$query_parent = "select name from idx_category where category_id = (select parent_id from idx_category where category_id = '$category_id')";
$row_parent = $dbConn->FetchOne($query_parent);
$parent_name = $row_parent['name'];
And $parent_name is available in detail.html