// gruppo.js

var level;

function header(html_level)
  {
  if (html_level == 1) level="../";
  if (html_level == 2) level="../../";
  if (html_level == 3) level="../../../";
  if (html_level == 4) level="../../../../";
  if (html_level == 5) level="../../../../../";

  document.write ('<Body bgcolor="E4CB95" background="' + level + 'images/texture3.jpg" ');
  document.write ('      Link="ddcc99" VLink="ddcc99" alink="ddcc99"> ');

  document.write (' <table rows=1 cols=2 Width=600>');

  document.write ('  <tr><td colspan=1 rowspan=1 width=360>');
  document.write ('  <img src="' + level + 'images/Mountain9.jpg">');
  document.write ('  <font color="665500" face="Plimpton, Verdana, Helvetica, sans-serif" size=4>');

  document.close();
  
  return true;
  }

function font(size)
  {
  document.write(" <font color=665500 face='Verdana,Plimpton,Verdana,Arial' size=" + size + " ><p> ");

  document.close();
  
  return true;
  }

function current()
  {
  // Return current image number
  for (i = 0; i < imageCount(); i++)
    {
    if (document.title == url[i])
      {
      // alert ("The URL is: " + url[i]);    
      return(i);      
      }
    } 
    alert ("Cannot find: " + document.title);
    return(0);
  }

function position()
  {
  return("Full size " + imageGroup() + " image no. " + (current() + 1) + " of " + imageCount() );
  }

function back()
  {
  location.replace(url[(imageCount() + current() - 1) % imageCount()]);
  //  document.location = url[(imageCount() + current() - 1) % imageCount()];
  return;      
  }

function linkBack()
  {
  return("Display previous " + imageGroup() + " image, No. " + ((current() + imageCount() - 1) % (imageCount()) + 1) );
  }

function linkOut()
  {
  return("Return to " + imageGroup() + " cluster");
  }

function next()
  {
  location.replace(url[(current() + 1) % imageCount()]);
  //  document.location = url[(current() + 1) % imageCount()];
  return;      
  }

function linkNext()
  {
  return("Display next " + imageGroup() + " image, No. " + ((current() + 1) % (imageCount()) + 1) );
  }

function out()
  {
  history.back();
  return;
  }


function cw()
  {
  // Absolute Main Menu Navigation Bar
  document.write('<p>');
  document.write('<Table Border Cellpadding=2>');
  document.write('<td Align=Left><a href="http://www.echocamp.org/images/absolute_help.html"><font color=C4531B face="Verdana,Arial" size=1>Absolute Navigation</a></td>');
  document.write('<td Align=Left><a href="http://www.echocamp.org/index.html"><font color=665500 face="Verdana,Arial" size=1>Index</a></td>');
  document.write('<td Align=Left><a href="http://www.echocamp.org/activity/activity.html"><font color=665500 face="Verdana,Arial" size=1>Activities</a></td>');
  document.write('<td Align=Left><a href="http://www.echocamp.org/camper/camper.html"><font color=665500 face="Verdana,Arial" size=1>Campers</a></td>');
  document.write('<td Align=Left><a href="http://www.echocamp.org/description/description.html"><font color=665500 face="Verdana,Arial" size=1>Sign Up</a></td>');
  document.write('<td Align=Left><a href="http://www.echocamp.org/grounds/grounds.html"><font color=665500 face="Verdana,Arial" size=1>Grounds</a></td>');
  document.write('<td Align=Left><a href="http://www.echocamp.org/history/history.html"><font color=665500 face="Verdana,Arial" size=1>History</a></td>');
  document.write('<td Align=Left><a href="http://www.echocamp.org/map/map.html"><font color=665500 face="Verdana,Arial" size=1>Maps</a></td>');
  document.write('<td Align=Left><a href="http://www.echocamp.org/staff/staff.html"><font color=665500 face="Verdana,Arial" size=1>Staff</a></td>');
  document.write('</Table><p>');

  // Copyright notice
  document.write(" <font color=665500 face='Verdana,Arial' size=1><p> ");
  document.write(" www.EchoCamp.org, the amazing Berkeley Echo Lake Camp website, ");
  document.write(" is copyright &copy 2000 - 2008 by Bayard Geis. <p>");

  // Mail to 
  // document.write(' <a href="mailto:Bayard@EchoCamp.org?subject=EchoCamp.org Web site"> ');
  document.write(' <img src="' + level + 'images/BD_email.jpg">');
  document.write(" </font> ");

  document.close();

  return true;
  }

function cw_only()
  {
  // Copyright notice

  document.write(" <font color=665500 face='Verdana,Arial' size=1><p> ");
  document.write(" www.EchoCamp.org, the Berkeley Echo Lake Camp website, ");
  document.write(" is copyright &copy 2000, 2001, 2002, 2003, 2004, 2005 by Bayard Geis. <p>");

  document.close();

  return true;
  }
