
// Define
td1 = '<td id="td1">';
td2 = '<td id="td2">';
img = '<img src="arrow.gif">';
font1 = '<font id="font1">';
font2 = '<font id="font2">';

      if( headerLevel == 0 ) {
   x = ""; }
 else if( headerLevel == 1 ) {
   x = "../"; }
 else if( headerLevel == 2 ) {
   x = "../../"; }
 else if( headerLevel == 3 ) {
   x = "../../../"; }

img = '<img src="' + x + 'arrow.gif">';

links = new Object();
links[0] = "index.html";
links[1] = "atlantic/atlantic.html";
links[2] = "indian/indian.html";
links[3] = "pacific/pacific.html";
links[4] = "polar-oceans.html";
links[5] = "seas.html";
names = new Object();
names[0] = "Home";
names[1] = "Atlantic";
names[2] = "Indian";
names[3] = "Pacific";
names[4] = "Polar Oceans";
names[5] = "Seas";

// Start Table
document.writeln('<table id="table1" align="center"><tr><td valign="top">');
document.writeln('<table id="table2" align="center"><tr>');

// The 5 Rows in the Header
for( i = 0; i < 6; i++ ) {

      if( headerState == names[i] ) {
   document.writeln(td1,'&nbsp;',img); }
 else {
   document.writeln(td2,'&nbsp;',img); }
      if( headerState == names[i] && headerLink == "On" ) {
   document.writeln('<a href="',x,links[i],'">'); }
 else if( headerState != names[i] ) {
   document.writeln('<a href="',x,links[i],'">'); }
      if( headerState == names[i] && headerLink == "Off" ) {
   document.writeln(font1,'<b>',names[i],'</b></font></td>'); }
 else if( headerState == names[i] && headerLink == "On" ) {
   document.writeln(font1,'<b>',names[i],'</b></font></a></td>'); }
 else {
   document.writeln(font2,'<b>',names[i],'</b></font></a></td>'); }

}

// End Table
document.writeln('</tr>');
document.writeln('</table>');
document.writeln('</td></tr>');
document.writeln('</table>');

