<?php
//********************* css-nav_horz.php *******************
//
// This file writes a horizontal navbar in a table, with the
// popup buttons effect implemented with css.
//
// The popup effect is created by changing the background image.
//
// Bo Johansson 2003-03-23
//
// Modified by Bo Johansson 2004-01-16
//
//***************************************************************
print('<TABLE CLASS="tdimg" ALIGN=CENTER BGCOLOR="#66FF99"');
print(' BORDER=3 CELLPADDING=0 CELLSPACING=0>' . "\n");
print('<TR><TD VALIGN=MIDDLE><TABLE BGCOLOR="#66FF99" BORDER=0');
print(' CELLPADDING=2 CELLSPACING=0>' . "\n<TR>\n");
for($index = 0; $index < 6; $index++)
{
if($index == $actPage)
{
$colText = "rd.gif";
$classText = "redbt";
}
elseif($hrefText[$index] =="Z")
{
$colText = "gr.gif";
$classText = "flatbt";
}
else
{
$colText = "gr.gif";
$classText = "navbt";
}
$bkgText = $navBase . "navbt/bkg94x26" . $colText;;
print('<TD WIDTH=94 HEIGHT=26 CLASS="' . $classText . '" BACKGROUND="' . $bkgText . '"');
print("\n" . ' ALIGN=CENTER VALIGN=MIDDLE>');
if( ($index != $actPage) && ($hrefText[$index] !="Z") )
{
print('<A HREF="' . $hrefText[$index] . '"' . "\n");
if( defined("IN_FRAME") )
print('TARGET="_parent"');
print('>');
}
print('<IMG SRC="' . $srcText[$index] . 'tr-' . $colText . '"' . "\n");
print('WIDTH=84 HEIGHT=20 BORDER=0 ALT="' . $altText[$index] . '">');
if( ($index != $actPage) && ($hrefText[$index] !="Z") )
{
print('</A>');
}
print("</TD>\n");
}
print("</TR><TR>\n");
for($index = 6; $index < 12; $index++)
{
if($index == $actPage)
{
$colText = "rd.gif";
$classText = "redbt";
}
elseif($hrefText[$index] =="Z")
{
$colText = "gr.gif";
$classText = "flatbt";
}
else
{
$colText = "gr.gif";
$classText = "navbt";
}
$bkgText = $navBase . "navbt/bkg94x26" . $colText;;
print('<TD WIDTH=94 HEIGHT=26 CLASS="' . $classText . '" BACKGROUND="' . $bkgText . '"');
print("\n" . ' ALIGN=CENTER VALIGN=MIDDLE>');
if( ($index != $actPage) && ($hrefText[$index] !="Z") )
{
print('<A HREF="' . $hrefText[$index] . '"' . "\n");
if( defined("IN_FRAME") )
print('TARGET="_parent"');
print('>');
}
print('<IMG SRC="' . $srcText[$index] . 'tr-' . $colText . '"' . "\n");
print('WIDTH=84 HEIGHT=20 BORDER=0 ALT="' . $altText[$index] . '">');
if( ($index != $actPage) && ($hrefText[$index] !="Z") )
{
print('</A>');
}
print("</TD>\n");
}
print("</TR>\n");
print('</TABLE></TD></TR>' . "\n");
print('</TABLE>');
//************************* File end **************************
?>
© 2004 Bo Johansson