<?php
/**
 * Header for Cloudy theme
 *
 * phpGedView: Genealogy Viewer
 * Copyright (C) 2002 to 2003 John Finlay and Others
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 * $Id: header.html,v 1.22 2004/11/14 09:54:00 roland-d Exp $
 *
 * @author w.a. bastein http://genealogy.bastein.biz
 * @package PhpGedView
 * @subpackage Themes
 */
          global $TEXT_DIRECTION;
          if ($TEXT_DIRECTION=="rtl")
           print "<style type=\"text/css\">
           html          { direction:rtl;
                           whitespace:normal;
                          }
           #footer       { text-align:center; }
           .person_box,
           .person_boxF,
           .person_boxNN { text-align:right; }
           .footer {text-align:left; direction:rtl;}
           .image {margin-right:0px; margin-left:15px;}
           #header {width:100%; text-align:right; direction:rtl; caption-side:left; display:table;}
           #index_main_blocks .blockhc { padding-right:0px;direction:rtl;}
           #index_small_blocks .blockh2 { padding:0px;direction:rtl;}
           #index_small_blocks .blockhc { padding-right:15px;padding-left:0;}
           #index_small_blocks .blockh2 .help .icon{
           position:relative; top:-21px;left:0px;right:-165px;
           margin-right:140px;
           margin-left:0px;
            }
          </style>";
?>
<div id="header" class="<?php print $TEXT_DIRECTION; ?>">
<img src="<?php print $THEME_DIR?>images/loading.gif" width="70" height="25" id="ProgBar" name="ProgBar" style="position:absolute;margin-left:auto;margin-right:auto;left:47%;top:48%;margin-bottom:auto;margin-top:auto;" alt="loading..." />
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-left:1px solid #003399;border-top:1px solid #003399;border-right:1px solid #003399;" >
    <tr>
        <td>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" style="background:url('<?php print $PGV_IMAGE_DIR; ?>/clouds.gif');height:38px;white-space: nowrap;" >
                <tr>
                    <td width="10" ><img src="<?php print $PGV_IMAGE_DIR; ?>/pixel.gif" width="1" height="1" alt="" /></td>
                    <td align="<?php print $TEXT_DIRECTION=="ltr"?"left":"right" ?>" >
                        <div class="topheader" style="<?php print $TEXT_DIRECTION=="rtl"?"left":"right" ?>">
                            <font size="5" face="Trebuchet MS, Verdana, Arial, Helvetica, sans-serif">
                                <?php
                                global $GEDCOMS, $GEDCOM;
                                print PrintReady($GEDCOMS[$GEDCOM]["title"]); //--- MA
                                ?>
                            </font>
                        </div>
                    </td>
                    <td >
                        <div class="blanco" >
                            <?php print_user_links(); ?>
                        </div>
                    </td>
                    <td >
                        <div align="<?php print $TEXT_DIRECTION=="rtl"?"left":"right" ?>" class="blanco">
                            <?php print_favorite_selector(0); ?>
                        </div>
                    </td>
                    <td align="<?php print $TEXT_DIRECTION=="rtl"?"left":"right" ?>">
                        <?php print_theme_dropdown(); ?>
                    </td>
                    <td style="white-space: normal;" align="<?php print $TEXT_DIRECTION=="rtl"?"left":"right" ?>" valign="middle" >
                        <form action="search.php" method="post">
                            <input type="hidden" name="action" value="general" />
                            <input type="text" class="formbut" name="query" size="15" value="<?php print $pgv_lang['search']?>" onfocus="if (this.value == '<?php print $pgv_lang['search']?>') this.value='';" onblur="if (this.value == '') this.value='<?php print $pgv_lang['search']?>';" />
                            <input type="image" src="<?php print $THEME_DIR ?>/images/go.gif" align="top" title="<?php print $pgv_lang['search']?>" />
                        </form>
                    </td>
                    <td width="10"><img src="<?php print $PGV_IMAGE_DIR; ?>/pixel.gif" width="1" height="1" alt="" /></td>
                </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="1" bgcolor="#aaccff" >
                <tr valign="middle" style="height:26px;margin-top:2pt;">
                    <td width="10">
                    </td>
                    <td align="left">
                        <table cellspacing="0" cellpadding="0" border="0" style="min-width:200px;height:26px;" align="<?php print $TEXT_DIRECTION=="ltr"?"left":"right" ?>">
                            <tr>
                                <td><img src="<?php print $PGV_IMAGE_DIR; ?>/pixel.gif" width="1" height="1" alt="" /></td>
                                <td width="1">
                                    <?php
                                    $my_temp_menu= array();
                                    $my_temp_menu["label"] = $HOME_SITE_TEXT;
                                    $my_temp_menu["labelpos"] = "none";
               $my_temp_menu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["home"]["small"];
                                    $my_temp_menu["link"] = $HOME_SITE_URL;
                                    $my_temp_menu["class"] = "menuitem";
                                    $my_temp_menu["hoverclass"] = "menuitem_hover";
                                    $my_temp_menu["flyout"] = "down";
                                    print_menu($my_temp_menu);
                                    ?>
                                </td>
                                <td width="1">
                                    <?php
                                    $my_temp_menu=get_gedcom_menu();
                 if ($TEXT_DIRECTION=="rtl") $ff="_rtl";
                 else $ff="";
                                    $my_temp_menu["labelpos"] = "none";
                                    $my_temp_menu["submenuclass"] = "submenu$ff";
                                    $i=0;
//                                  if (is_array($my_temp_menu["items"]))
                                    if (isset($my_temp_menu["items"]))
                                    foreach ( $my_temp_menu["items"] as $key ) {
                                        $my_temp_menu["items"][$i]["class"] = "submenuitem$ff";
                                        $my_temp_menu["items"][$i]["hoverclass"] = "submenuitem_hover$ff";
                                        $i++;
                                    }
                                    print_menu($my_temp_menu);
                                    ?>
                                </td>
                                <td width="1">
                                     <?php
                                    //-- mygedview menu
                                    $menu = array();
                                    $menu["label"] = $pgv_lang["mygedview"];
                                    $menu["labelpos"] = "none";
                       $menu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["mygedview"]["small"];
                                    $menu["link"] = "index.php?command=user";
                                    $menu["class"] = "menuitem";
                                    $menu["hoverclass"] = "menuitem_hover";
                                    $menu["flyout"] = "down";
                       $menu["submenuclass"] = "submenu$ff";
                                    $menu["items"] = get_mygedview_submenu();
                                    $i=0;
                                    foreach ( $menu["items"] as $key ) {
                            $menu["items"][$i]["class"] = "submenuitem$ff";
                            $menu["items"][$i]["hoverclass"] = "submenuitem_hover$ff";
                                    if ($i < 2)
                                   $menu["items"][$i]["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["mygedview"]["small"];
                                    else if (stristr($menu["items"][$i]["link"],"admin.php") or
                                    (stristr($menu["items"][$i]["link"],"editgedcoms.php")))
                                 $menu["items"][$i]["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["admin"]["small"];
                                    else if (stristr($menu["items"][$i]["link"],"pedigree.php"))
                                 $menu["items"][$i]["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["pedigree"]["small"];
                                    else if (stristr($menu["items"][$i]["link"],"individual.php"))
                                 $menu["items"][$i]["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["indis"]["small"];

                                    $i++;
                                    }
                                    print_menu($menu);
                                    ?>
                                </td>
                                <td valign="middle" width="1" >
                                    <?php
                                    //-- charts menu
                                    $menu = array();
                                    $menu["label"] = $pgv_lang["charts"];
                                    $menu["labelpos"] = "none";
                       $menu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["pedigree"]["large"];
                                    $menu["link"] = "pedigree.php";
                                    $menu["class"] = "menuitem";
                                    $menu["hoverclass"] = "menuitem_hover";
                                    $menu["flyout"] = "down";
                       $menu["submenuclass"] = "submenu$ff";
                                    $menu["items"] = array();
                                    
                                    $submenu = array();
                                    $submenu["label"] = $pgv_lang["pedigree_chart"];
                                    $submenu["labelpos"] = "right";
                       $submenu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["pedigree"]["small"];
                                    $submenu["link"] = "pedigree.php";
                       $submenu["class"] = "submenuitem$ff";
                       $submenu["hoverclass"] = "submenuitem_hover$ff";
                                    $menu["items"][] = $submenu;
                                    
                                    $submenu = array();
                                    $submenu["label"] = $pgv_lang["descend_chart"];
                                    $submenu["labelpos"] = "right";
                       $submenu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["descendant"]["small"];
                                    $submenu["link"] = "descendancy.php";
                       $submenu["class"] = "submenuitem$ff";
                       $submenu["hoverclass"] = "submenuitem_hover$ff";
                                    $menu["items"][] = $submenu;
                                    
                                    $submenu = array();
                                    $submenu["label"] = $pgv_lang["timeline_chart"];
                                    $submenu["labelpos"] = "right";
                       $submenu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["timeline"]["small"];
                                    $submenu["link"] = "timeline.php";
                       $submenu["class"] = "submenuitem$ff";
                       $submenu["hoverclass"] = "submenuitem_hover$ff";
                                    $menu["items"][] = $submenu;
                                    
                                    $submenu = array();
                                    $submenu["label"] = $pgv_lang["relationship_chart"];
                                    $submenu["labelpos"] = "right";
                       $submenu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["relationship"]["small"];
                                    $submenu["link"] = "relationship.php";
                       $submenu["class"] = "submenuitem$ff";
                      $submenu["hoverclass"] = "submenuitem_hover$ff";
                                    $menu["items"][] = $submenu;
                                    
                                    if (file_exists("ancestry.php")) {
                                    $submenu = array();
                                    $submenu["label"] = $pgv_lang["ancestry_chart"];
                                    $submenu["labelpos"] = "right";
                                    $submenu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["ancestry"]["small"];
                                    $submenu["link"] = "ancestry.php";
                                    $submenu["class"] = "submenuitem$ff";
                                    $submenu["hoverclass"] = "submenuitem_hover$ff";
                                    $menu["items"][] = $submenu;
                                    }
                                    if (file_exists("fanchart.php") and function_exists("imagecreate")) {
                                    $submenu = array();
                                    $submenu["label"] = $pgv_lang["fan_chart"];
                                    $submenu["labelpos"] = "right";
                                    $submenu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["fanchart"]["small"];
                                    $submenu["link"] = "fanchart.php";
                                    $submenu["class"] = "submenuitem$ff";
                                    $submenu["hoverclass"] = "submenuitem_hover$ff";
                                    $menu["items"][] = $submenu;
                                    }
                                    if (file_exists("hourglass.php")) {
	                                    $submenu = array();
	                                    $submenu["label"] = $pgv_lang["hourglass_chart"];
	                                    $submenu["labelpos"] = "right";
	                                    $submenu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["pedigree"]["small"];
	                                    $submenu["link"] = "hourglass.php";
	                                    $submenu["class"] = "submenuitem$ff";
	                                    $submenu["hoverclass"] = "submenuitem_hover$ff";
	                                    $menu["items"][] = $submenu;
                                    }
                                    print_menu($menu);
                                    ?>
                                </td>
                                <td width="1">
                                    <?php
                                    //-- lists menu
                                    $menu = array();
                                    $menu["label"] = $pgv_lang["lists"];
                                    $menu["labelpos"] = "none";
                       $menu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["lists"]["small"];
                                    $menu["link"] = "indilist.php";
                                    $menu["class"] = "menuitem";
                                    $menu["hoverclass"] = "menuitem_hover";
                                    $menu["flyout"] = "down";
                       $menu["submenuclass"] = "submenu$ff";
                                    $menu["items"] = array();
                                    
                                    $submenu = array();
                                    $submenu["label"] = $pgv_lang["individual_list"];
                                    $submenu["labelpos"] = "right";
                       $submenu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["indis"]["small"];
                                    $submenu["link"] = "indilist.php";
                       $submenu["class"] = "submenuitem$ff";
                       $submenu["hoverclass"] = "submenuitem_hover$ff";
                                    $menu["items"][] = $submenu;
                                    
                                    $submenu = array();
                                    $submenu["label"] = $pgv_lang["family_list"];
                                    $submenu["labelpos"] = "right";
                       $submenu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["cfamily"]["small"];
                                    $submenu["link"] = "famlist.php";
                       $submenu["class"] = "submenuitem$ff";
                       $submenu["hoverclass"] = "submenuitem_hover$ff";
                                    $menu["items"][] = $submenu;
                                    
                                    //-- produce a plot of statistics
                                    if (file_exists("statistiek.php")) {
                                    $submenu = array();
                                    $submenu["label"] = $pgv_lang["statistics"];
                                    $submenu["labelpos"] = "right";
                       				$submenu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["statistic"]["small"];
                                    $submenu["link"] = "statistiek.php";
                       				$submenu["class"] = "submenuitem$ff";
                       				$submenu["hoverclass"] = "submenuitem_hover$ff";
                                    $menu["items"][] = $submenu;
                                    }
                                    
                                    //-- list most ancient parent of a family
                                    if (file_exists("patriarchlist.php")) {
                                    $submenu = array();
                                    $submenu["label"] = $pgv_lang["patriarch_list"];
                                    $submenu["labelpos"] = "right";
                       				$submenu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["patriarch"]["small"];
                                    $submenu["link"] = "patriarchlist.php";
                       				$submenu["class"] = "submenuitem$ff";
                       				$submenu["hoverclass"] = "submenuitem_hover$ff";
                                    $menu["items"][] = $submenu;
                                    }
                                    
                                    $submenu = array();
                                    $submenu["label"] = $pgv_lang["source_list"];
                                    $submenu["labelpos"] = "right";
                       				$submenu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["source"]["small"];
                                    $submenu["link"] = "sourcelist.php";
                       				$submenu["class"] = "submenuitem$ff";
                       				$submenu["hoverclass"] = "submenuitem_hover$ff";
                                    $menu["items"][] = $submenu;
                                    
                                    $submenu = array();
                                    $submenu["label"] = $pgv_lang["place_list"];
                                    $submenu["labelpos"] = "right";
                       				$submenu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["place"]["small"];
                                    $submenu["link"] = "placelist.php";
                       				$submenu["class"] = "submenuitem$ff";
                       				$submenu["hoverclass"] = "submenuitem_hover$ff";
                                    $menu["items"][] = $submenu;
                                    
                                    global $MULTI_MEDIA;
                                    if( $MULTI_MEDIA ) {
                                    $submenu = array();
                                    $submenu["label"] = $pgv_lang["media_list"];
                                    $submenu["labelpos"] = "right";
                            		$submenu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["media"]["small"];
                                    $submenu["link"] = "medialist.php";
                       				$submenu["class"] = "submenuitem$ff";
                       				$submenu["hoverclass"] = "submenuitem_hover$ff";
                                    $menu["items"][] = $submenu;
                                    }
                                    print_menu($menu);
                                    ?>
                                </td>
                                <td width="1">
                                    <?php
                                    $menu = array();
                                    $menu["label"] = $pgv_lang["anniversary_calendar"];
                                    $menu["labelpos"] = "none";
                       				$menu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["calendar"]["small"];
                                    $menu["link"] = "calendar.php";
                                    $menu["class"] = "menuitem";
                                    $menu["hoverclass"] = "menuitem_hover";
                       				$menu["submenuclass"] = "submenu$ff";
                                    $menu["flyout"] = "down";
                                    $menu["items"] = array();
                                    
                                    $submenu = array();
                                    $submenu["label"] = $pgv_lang["viewday"];
                                    $submenu["labelpos"] = "right";
                       $submenu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["calendar"]["small"];
                                    $submenu["link"] = "calendar.php";
                       $submenu["class"] = "submenuitem$ff";
                       $submenu["hoverclass"] = "submenuitem_hover$ff";
                                    $menu["items"][] = $submenu;
                                    
                                    $submenu = array();
                                    $submenu["label"] = $pgv_lang["viewmonth"];
                                    $submenu["labelpos"] = "right";
                       $submenu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["calendar"]["small"];
                                    $submenu["link"] = "calendar.php?action=calendar";
                       $submenu["class"] = "submenuitem$ff";
                       $submenu["hoverclass"] = "submenuitem_hover$ff";
                                    $menu["items"][] = $submenu;
                                    
                                    $submenu = array();
                                    $submenu["label"] = $pgv_lang["viewyear"];
                                    $submenu["labelpos"] = "right";
                       $submenu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["calendar"]["small"];
                                    $submenu["link"] = "calendar.php?action=year";
                       $submenu["class"] = "submenuitem$ff";
                       $submenu["hoverclass"] = "submenuitem_hover$ff";
                                    $menu["items"][] = $submenu;
                                    print_menu($menu);
                                    ?>
                                </td>
                                <?php
                                if (file_exists("reportengine.php")) {
                                print "<td width=\"1\">";
                                $menu = array();
                                $menu["label"] = $pgv_lang["reports"];
                                $menu["labelpos"] = "none";
                  				$menu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["reports"]["small"];
                                $menu["link"] = "reportengine.php";
                                $menu["class"] = "menuitem";
                                $menu["hoverclass"] = "menuitem_hover";
                  				$menu["submenuclass"] = "submenu$ff";
                                $menu["flyout"] = "down";
                                $menu["items"] = get_reports_submenu("submenuitem$ff", "submenuitem_hover$ff");

                                print_menu($menu);
                                print "</td>";
                                }
                                
                                global $ENABLE_CLIPPINGS_CART;
                                if ($ENABLE_CLIPPINGS_CART>=getUserAccessLevel()) {
                                print "<td width=\"1\">";
                                $menu = array();
                                $menu["label"] = $pgv_lang["clippings_cart"];
                                $menu["labelpos"] = "none";
                   $menu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["clippings"]["small"];
                                $menu["link"] = "clippings.php";
                                $menu["class"] = "menuitem";
                                $menu["hoverclass"] = "menuitem_hover";
                                print_menu($menu);
                                print "</td>";
                                }
                                ?>
                                <td width="1">
                                    <?php
                                    $menu = array();
                                    $menu["label"] = $pgv_lang["search"];
                                    $menu["labelpos"] = "none";
                   $menu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["search"]["large"];
                                    $menu["link"] = "search.php";
                                    $menu["class"] = "menuitem";
                                    $menu["hoverclass"] = "menuitem_hover";
                                    print_menu($menu);
                                    ?>
                                </td>
                                <?php
                                if (file_exists("rs_folders.php")) {
                                global $SHOW_RESEARCH_LOG, $PRIV_USER, $PRIV_PUBLIC;
                                $username = getUserName();
                                if ($SHOW_RESEARCH_LOG>=$PRIV_PUBLIC || (!empty($username) && $SHOW_RESEARCH_LOG>=$PRIV_USER) || userIsAdmin($username)) {
                                $menu = array();
                                $menu["label"] = $pgv_lang["research_log"];
                                $menu["labelpos"] = "none";
                      $menu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["gedcom"]["small"];
                                $menu["link"] = "rs_folders.php";
                                $menu["class"] = "menuitem";
                                $menu["hoverclass"] = "menuitem_hover";
                                print "<td width=\"1\">";
                                print_menu($menu);
                                print "</td>";
                                }
                                }
                                ?>
                                <td width="1">
                                    <?php
                                    $menu = array();
                                    $menu["label"] = $pgv_lang["print_preview"];
                                    $menu["labelpos"] = "none";
            $menu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["printer"]["small"];
                                    $menu["link"] = "$PHP_SELF?view=preview";
                                    if (!Empty($QUERY_STRING)) $menu["link"] .="&amp;$QUERY_STRING";
                                    $menu["class"] = "menuitem";
                                    $menu["hoverclass"] = "menuitem_hover";
                                    print_menu($menu);
                                    ?>
                                </td>
                                <td width="1" >
                                    <?php
                                    global $SHOW_CONTEXT_HELP, $PHP_SELF, $QUERY_STRING, $helpindex;
                                    //-- help menu
                                    $menu = array();
                                    $menu["label"] = $pgv_lang["page_help"];
                                    $menu["labelpos"] = "none";
                   $menu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["help"]["large"];
                                    $menu["link"] = "#";
                                    if (empty($helpindex)) $menu["onclick"] = "return helpPopup('help_".basename($PHP_SELF)."&amp;action=".$action."');";
                                    else $menu["onclick"] = "return helpPopup('".$helpindex."');";
                                    $menu["class"] = "menuitem";
                                    $menu["hoverclass"] = "menuitem_hover";
                                    $menu["flyout"] = "bottom";
                   $menu["submenuclass"] = "submenu$ff";
                                    $menu["items"] = array();
                                    
                                    $submenu = array();
                                    $submenu["label"] = $pgv_lang["help_for_this_page"];
                                    $submenu["labelpos"] = "right";
                   $submenu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["help"]["small"];
                                    $submenu["link"] = "#";
                                    if (empty($helpindex)) $submenu["onclick"] = "return helpPopup('help_".basename($PHP_SELF)."&amp;action=".$action."');";
                                    else $submenu["onclick"] = "return helpPopup('".$helpindex."');";
                   $submenu["class"] = "submenuitem$ff";
                   $submenu["hoverclass"] = "submenuitem_hover$ff";
                                    $menu["items"][] = $submenu;
                                    
                                    $submenu = array();
                                    $submenu["label"] = $pgv_lang["help_contents"];
                                    $submenu["labelpos"] = "right";
                   $submenu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["help"]["small"];
                                    $submenu["link"] = "#";
                                    $submenu["onclick"] = "return helpPopup('help_contents_help');";
                   $submenu["class"] = "submenuitem$ff";
                   $submenu["hoverclass"] = "submenuitem_hover$ff";
                                    $menu["items"][] = $submenu;
                                    $menu["items"][]="separator";
                                    
                                    $submenu = array();
                                    if ($_SESSION["show_context_help"]) {
                                    $submenu["label"] = $pgv_lang["hide_context_help"];
                                    $submenu["link"] = "$PHP_SELF?$QUERY_STRING&amp;show_context_help=no";
                                    }
                                    else {
                                    $submenu["label"] = $pgv_lang["show_context_help"];
                                    $submenu["link"] = "$PHP_SELF?$QUERY_STRING&amp;show_context_help=yes";
                                    }
                                    $submenu["labelpos"] = "right";
                   $submenu["class"] = "submenuitem$ff";
                   $submenu["hoverclass"] = "submenuitem_hover$ff";
                                    $menu["items"][] = $submenu;
                                    print_menu($menu);
                                    ?>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td >&nbsp;</td>
                    <td>
                        <div align="<?php print $TEXT_DIRECTION=="rtl"?"left":"right" ?>" ><?php print_lang_form(1); ?>
                        </div>
                    </td>
                    <td width="10"><img src="<?php print $PGV_IMAGE_DIR; ?>/pixel.gif" width="1" height="1" alt="" /></td>
                </tr>
            </table>
