4122: Changed calls to getcookie and setcookie to ATutor.getcookie and ATutor.setcook...
[atutor.git] / docs / themes / mobile / include / header.tmpl.php
1 <?php
2 /************************************************************************/
3 /* ATutor                                                                                                                               */
4 /************************************************************************/
5 /* Copyright (c) 2002-2008 by Greg Gay, Joel Kronenberg & Heidi Hazelton*/
6 /* Adaptive Technology Resource Centre / University of Toronto                  */
7 /* http://atutor.ca                                                                                                             */
8 /*                                                                                                                                              */
9 /* This program is free software. You can redistribute it and/or                */
10 /* modify it under the terms of the GNU General Public License                  */
11 /* as published by the Free Software Foundation.                                                */
12 /************************************************************************/
13 // $Id: header.tmpl.php 3825 2005-03-11 15:35:51 joel $
14 if (!defined('AT_INCLUDE_PATH')) { exit; }
15 /* available header.tmpl.php variables:
16  * $this->lang_code                     the ISO language code
17  * SITE_NAME                            the site name from the config file
18  * $this->page_title            the name of this page to use in the <title>
19  * $this->lang_charset          the ISO language character set
20  * $this->content_base_href     the <base href> to use for this page
21  * $this->base_path                     the absolute path to this atutor installation
22  * $this->rtl_css                       if set, the path to the RTL style sheet
23  * $this->icon                  the path to a course icon
24  * $this->banner_style          -deprecated-
25  * $this->theme                         the directory name of the current theme
26  * $this->base_href                     the full url to this atutor installation
27  * $this->onload                        javascript onload() calls
28  * $this->img                           the absolute path to this theme's images/ directory
29  * $this->sequence_links        associative array of 'previous', 'next', and/or 'resume' links
30  * $this->path                          associative array of path to this page: aka bread crumbs
31  * $this->rel_url                       the relative url from the installation root to this page
32  * $this->nav_courses           associative array of this user's enrolled courses
33  * $this->section_title         the title of this section (course, public, admin, my start page)
34  * $this->top_level_pages       associative array of the top level navigation
35  * $this->current_top_level_page        the full path to the current top level page with file name
36  * $this->sub_level_pages                       associate array of sub level navigation
37  * $this->back_to_page                          if set, the path and file name to the part of this page (if parent is not a top level nav)
38  * $this->current_sub_level_page        the full path to the current sub level page with file name
39  * $this->guide                         the full path and file name to the guide page
40  * ======================================
41  * top_level_pages           array(array('url', 'title'))     the top level pages. ATutor default creates tabs.
42  * section_title             string                           the name of the current section. either name of the course, administration, my start page, etc.
43  * page_title                string                           the title of the current page.
44  * path                      array(array('url', 'title'))     the path to the current page.
45  * back_to_page              array('url', 'title')            the link back to the part of the current page, if needed.
46  * current_top_level_page    string                           full url to the current top level page in "top_leve_pages"
47  * current_sub_level_page    string                           full url to the current sub level page in the "sub_level_pages"
48  * sub_level_pages           array(array('url', 'title'))     the sub level pages.
49  */
50
51 // will have to be moved to the header.inc.php
52 global $system_courses, $_custom_css, $db, $_base_path, $contentManager;
53
54 // 1. any click on the page closes the content menu but the link "content_link" itself
55 // 2. the click on link "content_link" opens the content menu
56 $this->onload .= "
57 jQuery(document).click(function () {jQuery('#content').hide('slow');}); 
58
59 jQuery('#content_link').click(function(e) {
60   e.stopPropagation();
61   jQuery('#content').slideToggle();
62 });
63 ";
64
65 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
66
67 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="<?php echo $this->lang_code; ?>"> 
68
69 <head>
70         <title><?php echo SITE_NAME; ?> : <?php echo $this->page_title; ?></title>
71         <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $this->lang_charset; ?>" />
72         <meta name="Generator" content="ATutor - Copyright 2005 by http://atutor.ca" />
73         <base href="<?php echo $this->content_base_href; ?>" />
74         <link rel="shortcut icon" href="<?php echo $this->base_path; ?>favicon.ico" type="image/x-icon" />
75         <link rel="stylesheet" href="<?php echo $this->base_path.'themes/'.$this->theme; ?>/print.css" type="text/css" media="print" />
76         <link rel="stylesheet" href="<?php echo $this->base_path.'themes/'.$this->theme; ?>/styles.css" type="text/css" />
77         <!--[if IE]>
78           <link rel="stylesheet" href="<?php echo $this->base_path.'themes/'.$this->theme; ?>/ie_styles.css" type="text/css" />
79         <![endif]-->
80         <link rel="stylesheet" href="<?php echo $this->base_path.'themes/'.$this->theme; ?>/forms.css" type="text/css" />
81 <?php echo $this->rtl_css; ?>
82 <?php if (isset($this->course_id) && $system_courses[$this->course_id]['rss']): ?>
83         <link rel="alternate" type="application/rss+xml" title="<?php echo SITE_NAME; ?> - RSS 2.0" href="<?php echo $this->base_href; ?>get_rss.php?<?php echo $this->course_id; ?>-2" />
84         <link rel="alternate" type="application/rss+xml" title="<?php echo SITE_NAME; ?> - RSS 1.0" href="<?php echo $this->base_href; ?>get_rss.php?<?php echo $this->course_id; ?>-1" />
85 <?php endif; ?>
86         <script src="<?php echo $this->base_path; ?>jscripts/infusion/InfusionAll.js" type="text/javascript"></script>
87         <script src="<?php echo $this->base_path; ?>jscripts/infusion/jquery.autoHeight.js" type="text/javascript"></script>
88         <script language="javascript" type="text/javascript">
89         //<!--
90         jQuery.noConflict();
91         //-->
92         </script>
93     <script src="<?php echo $this->base_path; ?>jscripts/ATutor.js" type="text/javascript"></script>   
94     <?php echo $this->custom_css; ?>
95     <style id="pref_style" type="text/css"></style> 
96 </head>
97 <body onload="<?php echo $this->onload; ?>">
98 <script language="javascript" type="text/javascript">
99 //<!--
100 function showTocToggle(objId, show, hide, key, selected) {
101         if(document.getElementById) {
102                 if (key) {
103                         var accesskey = " accesskey='" + key + "' title='"+ show + "/" + hide + " Alt - "+ key +"'";
104                 } else {
105                         var accesskey = "";
106                 }
107
108                 if (selected == 'hide') {
109                         document.writeln('<a href="javascript:toggleToc(\'' + objId + '\')" ' + accesskey + '>' +
110                         '<span id="' + objId + 'showlink" style="display:none;">' + show + '</span>' +
111                         '<span id="' + objId + 'hidelink">' + hide + '</span>'  + '</a>');
112                 } else {
113                         document.writeln('<a href="javascript:toggleToc(\'' + objId + '\')" ' + accesskey + '>' +
114                         '<span id="' + objId + 'showlink">' + show + '</span>' +
115                         '<span id="' + objId + 'hidelink" style="display:none;">' + hide + '</span>'    + '</a>');
116                 }
117         }
118 }
119
120 function toggleToc(objId) {
121         var toc = document.getElementById(objId);
122         if (toc == null) {
123                 return;
124         }
125         var showlink=document.getElementById(objId + 'showlink');
126         var hidelink=document.getElementById(objId + 'hidelink');
127
128         if (hidelink.style.display == 'none') {
129                 document.getElementById('contentcolumn').id="contentcolumn_shiftright";
130                 jQuery("[id="+objId+"]").slideDown("slow");
131                 hidelink.style.display='';
132                 showlink.style.display='none';
133         } else {
134                 document.getElementById('contentcolumn_shiftright').id="contentcolumn";
135                 jQuery("[id="+objId+"]").slideUp("slow");
136                 hidelink.style.display='none';
137                 showlink.style.display='';
138         }
139         ATutor.setcookie(objId, hidelink.style.display, 1);
140 }
141
142 // toggle content folder in side menu "content navigation"
143 function toggleFolder(cid)
144 {
145         if (jQuery("#tree_icon"+cid).attr("src") == tree_collapse_icon) {
146                 jQuery("#tree_icon"+cid).attr("src", tree_expand_icon);
147                 jQuery("#tree_icon"+cid).attr("alt", "<?php echo _AT('expand'); ?>");
148                 ATutor.setcookie("c<?php echo $this->course_id;?>_"+cid, null, 1);
149         }
150         else {
151                 jQuery("#tree_icon"+cid).attr("src", tree_collapse_icon);
152                 jQuery("#tree_icon"+cid).attr("alt", "<?php echo _AT('collapse'); ?>");
153                 ATutor.setcookie("c<?php echo $this->course_id;?>_"+cid, "1", 1);
154         }
155         
156         jQuery("#folder"+cid).slideToggle();
157 }
158
159 // toggle elements in side menu
160 function elementToggle(elem, title)
161 {
162         element_collapse_icon = "<?php echo $_base_path; ?>images/mswitch_minus.gif";
163         element_expand_icon = "<?php echo $_base_path; ?>images/mswitch_plus.gif";
164         
165         if (jQuery(elem).attr("src") == element_collapse_icon) {
166                 jQuery(elem).attr("src", element_expand_icon);
167                 jQuery(elem).attr("alt", "<?php echo _AT('show'). ' '; ?>"+ title);
168                 jQuery(elem).attr("title", "<?php echo _AT('show'). ' '; ?>"+ title);
169                 ATutor.setcookie("m_"+title, 0, 1);
170         }
171         else {
172                 jQuery(elem).attr("src", element_collapse_icon);
173                 jQuery(elem).attr("alt", "<?php echo _AT('collapse'); ?>");
174                 jQuery(elem).attr("alt", "<?php echo _AT('hide'). ' '; ?>"+ title);
175                 jQuery(elem).attr("title", "<?php echo _AT('hide'). ' '; ?>"+ title);
176                 ATutor.setcookie("m_"+title, null, 1);;
177         }
178         
179         jQuery(elem).parent().next().slideToggle();
180 }
181
182 function printSubmenuHeader(title)
183 {
184         if (getcookie("m_"+title) == "0")
185         {
186                 image = "<?php echo $_base_path?>images/mswitch_plus.gif";
187                 alt_text = "<?php echo _AT('show'); ?> " + title;
188         }
189         else
190         {
191                 image = "<?php echo $_base_path?>images/mswitch_minus.gif";
192                 alt_text = "<?php echo _AT('hide'); ?> " + title;
193         }
194         
195         document.writeln('<h4 class="box">'+
196         '       <input src="'+image+'"' + 
197         '              onclick="elementToggle(this, \''+title+'\'); return false;"' +
198         '              alt="'+ alt_text + '" ' +
199         '              title="'+ alt_text + '"' +
200         '              style="float:right" type="image" /> '+ title +
201         '</h4>');
202 }
203 //-->
204 </script>
205 <div class="page_wrapper">
206 <div id="header">
207         <a href="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES); ?>#content" accesskey="c">
208         <img src="<?php echo $this->base_path; ?>images/clr.gif" height="1" width="1" border="0" alt="<?php echo _AT('goto_content'); ?> ALT+c" /></a>          
209
210         <a href="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES); ?>#menu<?php echo $_REQUEST['cid']  ?>"  accesskey="m"><img src="<?php echo $this->base_path; ?>images/clr.gif" height="1" width="1" border="0" alt="<?php echo _AT('goto_menu'); ?> ALT+m" /></a>
211         <div id="top-links"> <!-- top help/search/login links -->
212                 <?php if (isset($_SESSION['member_id']) && $_SESSION['member_id']): ?>
213                         <?php if(!$this->just_social): ?>
214                         <!-- start the jump menu -->
215                         <?php if (empty($_GET)): ?>
216                                 <form method="post" action="<?php echo $this->base_path; ?>bounce.php?p=<?php echo urlencode($this->rel_url); ?>" target="_top">
217                         <?php else: ?>
218                                 <form method="post" action="<?php echo $this->base_path; ?>bounce.php" target="_top">
219                         <?php endif; ?>
220                         <label for="jumpmenu" accesskey="j"></label>
221                                 <select name="course" id="jumpmenu" title="<?php echo _AT('jump'); ?>:  Alt-j">                                                 
222                                         <option value="0"><?php echo _AT('my_start_page'); ?></option>
223                                         <optgroup label="<?php echo _AT('courses_below'); ?>">
224                                                 <?php foreach ($this->nav_courses as $this_course_id => $this_course_title): ?>
225                                                         <option value="<?php echo $this_course_id; ?>"><?php echo $this_course_title; ?></option>
226                                                 <?php endforeach; ?>
227                                         </optgroup>
228                                 </select> <input type="submit" name="jump" value="<?php echo _AT('jump'); ?>" class="button" /> </form>
229                         <!-- /end the jump menu -->
230                         <?php endif; ?>
231
232                         <?php if ($_SESSION['is_super_admin']): ?>
233                                 <a href="<?php echo $this->base_path; ?>bounce.php?admin"><?php echo _AT('return_to_admin_area'); ?></a> | 
234                         <?php endif; ?>
235
236                         <?php if ($this->course_id > -1): ?>
237                                 <?php if (get_num_new_messages()): ?>
238                                         <a href="<?php echo $this->base_path; ?>inbox/index.php"><?php echo _AT('inbox'); ?> (<?php echo get_num_new_messages(); ?>)</a> 
239                                 <?php else: ?>
240                                         <a href="<?php echo $this->base_path; ?>inbox/index.php"><?php echo _AT('inbox'); ?></a>
241                                 <?php endif; ?>
242                         <?php endif; ?>
243                 <?php endif; ?>
244                 <?php if(!$this->just_social): ?>
245                         <a href="<?php echo $this->base_path; ?>search.php"><?php echo _AT('search'); ?></a> 
246                 <?php endif; ?>
247                 <a href="<?php echo $this->base_path; ?>help/index.php"><?php echo _AT('help'); ?></a>
248         </div>
249         <?php if (!empty($this->icon)) { // if a course icon is available, display it here.  ?>
250                 <a href="<?php echo $this->base_path.url_rewrite('index.php'); ?>"><img src="<?php echo $this->icon; ?>" class="headicon" alt="<?php echo  _AT('home'); ?>" /></a>      
251         <?php } ?>
252
253
254
255         <?php
256         // If there is a custom course banner in the file manager called banner.html, display it here
257         @readfile(AT_CONTENT_DIR . $this->course_id.'/banner.txt'); 
258
259         /*
260         and example banner.html file might look like:
261         <div style="width: 760px; height: 42px; background: white;"><img src="http://[mysite]/atutor15rc3/banners/kart-camb.jpg"></div>
262         */
263
264         ?>
265         <!-- section title -->
266         <?php if (isset($_SESSION['valid_user']) && $_SESSION['valid_user']): 
267                 echo '<div style="font-size:small;font-weight:bold;padding-left:1em;color:white;">'.stripslashes(SITE_NAME).'</div>'; 
268         else:
269                 echo '<br />';  
270         endif; ?>
271         <h1 id="section-title"><?php echo $this->section_title; ?>
272                 <?php if ((isset($this->course_id) && $this->course_id > 0) && ($_SESSION['enroll'] == AT_ENROLL_NO)) : ?> 
273                         - <small><a href="<?php echo $this->base_path; ?>enroll.php?course=<?php echo $this->course_id; ?>"><?php echo _AT('enroll_me'); ?></a></small>
274                 <?php endif; ?>
275         </h1>
276         
277 </div>
278
279 <div id="topnavlistcontainer">
280 <!-- the main navigation. in our case, tabs -->
281         <ul id="topnavlist">
282                 <?php $accesscounter = 0; //initialize ?>
283                 <?php foreach ($this->top_level_pages as $page): ?>
284                         <?php ++$accesscounter; $accesscounter = ($accesscounter == 10 ? 0 : $accesscounter); ?>
285                         <?php $accesskey_text = ($accesscounter < 10 ? 'accesskey="'.$accesscounter.'"' : ''); ?>
286                         <?php $accesskey_title = ($accesscounter < 10 ? ' Alt+'.$accesscounter : ''); ?>
287                         <?php if ($page['url'] == $this->current_top_level_page): ?>
288                                 <li><a href="<?php echo $page['url']; ?>" <?php echo $accesskey_text; ?> title="<?php echo $page['title'] . $accesskey_title; ?>" class="active"><?php echo $page['title']; ?></a></li>
289                         <?php else: ?>
290                                 <li><a href="<?php echo $page['url']; ?>" <?php echo $accesskey_text; ?> title="<?php echo $page['title'] . $accesskey_title; ?>"><?php echo $page['title']; ?></a></li>
291                         <?php endif; ?>
292                         <?php $accesscounter = ($accesscounter == 0 ? 11 : $accesscounter); ?>
293                 <?php endforeach; ?>
294         </ul>
295 </div>
296
297 <div style="background-color:#E6E6E6; font-size:0.85em; padding-top: 5px; border-bottom:1px solid black; height:2em;">
298         <!-- the sub navigation -->
299         <div style="float: right; padding-right: 5px; text-transform: lowercase;">
300                 <?php if (isset($_SESSION['valid_user']) && $_SESSION['valid_user']): ?>                                        
301                         <strong><?php echo get_display_name($_SESSION['member_id']); ?></strong> | <a href="<?php echo $this->base_path; ?>logout.php"><?php echo _AT('logout'); ?></a>
302                 <?php else: ?>
303                          <a href="<?php echo $this->base_path; ?>login.php?course=<?php echo $this->course_id; ?>"><?php echo _AT('login'); ?></a> | <a href="<?php echo $this->base_path; ?>registration.php"><?php echo _AT('register'); ?></a>
304                 <?php endif; ?>
305         </div>
306
307         <div style="padding-left: 5px;">
308                 <a id="content_link" href="javascript:void(0);">Content</a>
309                 <div id="content" style="background-color:#E6E6E6; width: 22em; display: none; position: relative; z-index: 1;">
310                 <?php $contentManager->printMainMenu(); ?>
311                 </div>
312         </div>
313         
314         <?php if ($this->sub_level_pages): ?>
315         <!--    <div id="sub-navigation">
316                         <?php if (isset($this->back_to_page)): ?>
317                                 <a href="<?php echo $this->back_to_page['url']; ?>" id="back-to"><?php echo _AT('back_to').' '.$this->back_to_page['title']; ?></a> | 
318                         <?php endif; ?>
319
320                         <?php $num_pages = count($this->sub_level_pages); ?>
321                         <?php for ($i=0; $i<$num_pages; $i++): ?>
322                                 <?php if ($this->sub_level_pages[$i]['url'] == $this->current_sub_level_page): ?>
323                                         <strong><?php echo $this->sub_level_pages[$i]['title']; ?></strong>
324                                 <?php else: ?>
325                                         <a href="<?php echo $this->sub_level_pages[$i]['url']; ?>"><?php echo $this->sub_level_pages[$i]['title']; ?></a>
326                                 <?php endif; ?>
327                                 <?php if ($i < $num_pages-1): ?>
328                                         |
329                                 <?php endif; ?>
330                         <?php endfor; ?>
331                 </div> -->
332         <?php else: ?>
333                 <!-- <div id="sub-navigation">
334                         &nbsp;
335                 </div> -->
336         <?php endif; ?>
337 </div>
338
339 <div style="padding:3px;">
340 <?php if (isset($_SESSION["prefs"]["PREF_SHOW_BREAD_CRUMBS"]) && $_SESSION["prefs"]["PREF_SHOW_BREAD_CRUMBS"]) { ?>
341         <!-- the bread crumbs -->
342         <div id="breadcrumbs">
343                 <?php foreach ($this->path as $page): ?>
344                         <a href="<?php echo $page['url']; ?>"><?php echo htmlspecialchars($page['title'], ENT_COMPAT, "UTF-8"); ?></a> > 
345                 <?php endforeach; ?> <?php echo $this->page_title; ?>
346         </div>
347 <?php } ?>
348
349         <?php if (isset($this->guide) && isset($_SESSION["course_id"]) && $this->guide && ($_SESSION["prefs"]["PREF_SHOW_GUIDE"] || $_SESSION["course_id"] == "-1")) : ?>
350                 <a href="<?php echo $this->guide; ?>" id="guide" onclick="poptastic('<?php echo $this->guide; ?>'); return false;" target="_new"><em><?php echo $this->page_title; ?></em></a>
351         <?php endif; ?>
352 </div>
353
354
355 <div id="contentwrapper">
356         <div id="contentcolumn"
357                 <?php if ((isset($this->course_id) && $this->course_id <= 0)): ?>
358                         style="margin-left:0.5em;width:99%;"
359                 <?php endif; ?>
360                 >
361
362                 <?php if (isset($this->course_id) && $this->course_id > 0): ?>
363                 <div id="sequence-links">
364                 <?php if ($_SESSION["prefs"]["PREF_SHOW_NEXT_PREVIOUS_BUTTONS"]) { ?>
365                         <?php if ($this->sequence_links['resume']): ?>
366                                         <a style="color:white;" href="<?php echo $this->sequence_links['resume']['url']; ?>" accesskey="."><img src="<?php echo $this->img; ?>resume.gif" border="0" title="<?php echo _AT('resume').': '.$this->sequence_links['resume']['title']; ?> Alt+." alt="<?php echo $this->sequence_links['resume']['title']; ?> Alt+." class="img-size-ascdesc" /></a>
367                         <?php else:
368                                 if ($this->sequence_links['previous']): ?>
369                                         <a href="<?php echo $this->sequence_links['previous']['url']; ?>" title="<?php echo _AT('previous_topic').': '. $this->sequence_links['previous']['title']; ?> Alt+," accesskey=","><img src="<?php echo $this->img; ?>previous.gif" border="0" alt="<?php echo _AT('previous_topic').': '. $this->sequence_links['previous']['title']; ?> Alt+," class="img-size-ascdesc" /></a>
370                                 <?php endif;
371                                 if ($this->sequence_links['next']): ?>
372                                         <a href="<?php echo $this->sequence_links['next']['url']; ?>" title="<?php echo _AT('next_topic').': '.$this->sequence_links['next']['title']; ?> Alt+." accesskey="."><img src="<?php echo $this->img; ?>next.gif" border="0" alt="<?php echo _AT('next_topic').': '.$this->sequence_links['next']['title']; ?> Alt+." class="img-size-ascdesc" /></a>
373                                 <?php endif; ?>
374                         <?php endif; ?>
375                 <?php } ?>
376                         &nbsp;
377                 </div>
378                 <?php endif; ?>
379
380         <!-- the page title -->
381         <a name="content" title="<?php echo _AT('content'); ?>"></a>
382         <h2 class="page-title"><?php echo $this->page_title; ?></h2>
383         <?php global $msg; $msg->printAll(); $_base_href;?>
384
385         <?php if (count($this->sub_level_pages) > 0): ?>
386
387 <!-- <div id="topnavlistcontainer">
388         <ul id="topnavlist">
389                 <?php $accesscounter = 0; //initialize ?>
390                 <?php foreach ($this->top_level_pages as $page): ?>
391                         <?php ++$accesscounter; $accesscounter = ($accesscounter == 10 ? 0 : $accesscounter); ?>
392                         <?php $accesskey_text = ($accesscounter < 10 ? 'accesskey="'.$accesscounter.'"' : ''); ?>
393                         <?php $accesskey_title = ($accesscounter < 10 ? ' Alt+'.$accesscounter : ''); ?>
394                         <?php if ($page['url'] == $this->current_top_level_page): ?>
395                                 <li><a href="<?php echo $page['url']; ?>" <?php echo $accesskey_text; ?> title="<?php echo $page['title'] . $accesskey_title; ?>" class="active"><?php echo $page['title']; ?></a></li>
396                         <?php else: ?>
397                                 <li><a href="<?php echo $page['url']; ?>" <?php echo $accesskey_text; ?> title="<?php echo $page['title'] . $accesskey_title; ?>"><?php echo $page['title']; ?></a></li>
398                         <?php endif; ?>
399                         <?php $accesscounter = ($accesscounter == 0 ? 11 : $accesscounter); ?>
400                 <?php endforeach; ?>
401         </ul>
402 </div> -->
403
404                 <div id="subnavlistcontainer">
405                         <div id="subnavbacktopage">
406                         <?php if (isset($this->back_to_page)): ?>
407                                 <a href="<?php echo $this->back_to_page['url']; ?>">
408                                 <img border="0" width="10" height="11" alt="<?php echo _AT('back_to').' '.$this->back_to_page['title']; ?>" src="<?php echo $this->base_href; ?>images/arrowicon.gif" style="float:left;"/></a>&nbsp;
409                         <?php endif; ?>
410                         </div>
411
412                         <ul id="subnavlist">
413                         <?php $num_pages = count($this->sub_level_pages); ?>
414                         <?php for ($i=0; $i<$num_pages; $i++): ?>
415                                 
416                                 <?php if ($this->sub_level_pages[$i]['url'] == $this->current_sub_level_page): ?>
417                                 <li><?php echo $this->sub_level_pages[$i]['title']; ?></li>
418                                 <?php else: ?>
419                                         <li><a href="<?php echo $this->sub_level_pages[$i]['url']; ?>"><?php echo $this->sub_level_pages[$i]['title']; ?></a></li>
420                                 <?php endif; ?>
421                                 <?php if ($i < $num_pages-1): 
422                                         echo " ";?>
423                                 <?php endif; ?>
424                         <?php endfor; ?>
425                         </ul>
426                 </div>
427         <?php endif; ?>
428
429 <!-- the main navigation. in our case, tabs -->