var sections = new Array("home", "engineering", "surveying", "permit", "garage", "taxmaps", "contacts", "links", "sitemap");
var links = new Array("/index.html", "/engineering/engineering.html", "/surveying/surveying.html", "/permits/permits.html", "/highway/garage.html", "/tax-maps/map.html", "/contacts.html", "/links.html", "/sitemap.html");

function swap(section, version) {
  var img = eval('document.' + section);
  img.src = '/new/graphics/' + section + version + '.gif';  
  return(true);
}

function comment() {
  var docName = document.URL;
  var docName=docName.slice(docName.lastIndexOf('/')+1,docName.lastIndexOf('.'));
  document.write("<form name=\"add_comment\" action=\"/cgi-bin/mdp_comments.cgi\">");
  document.write("<input type=\"hidden\" name=\"initializing!\" value=\"1\">");
  document.write("<input type=\"hidden\" name=\"docName\" value=\""+docName+"\">");
  document.write("</form>");
}

function add_comment() {
  document.add_comment.submit();
}

function header(section)
{
  document.write("  <form action=\"http://www.google.com/search?as_sitesearch=www.highwayengineer.co.medina.oh.us\" method=\"GET\" enctype=\"application/x-www-form-urlencoded\">\n");
  document.write("  <p><table border=\"0\" width=\"780\">\n");
  document.write("    <tr><td width=\"120\" valign=\"top\" rowspan=\"2\"><center><p>\n");
  document.write("      <table border=\"0\" width=\"120\">\n");
  document.write("        <tr><td width=\"112\"><p align=\"center\"><img src=\"/graphics/mike_salay.png\" align=\"bottom\" border=\"0\" alt=\"Mike Salay P.E. P.S.\"></center></td></tr>\n");

  for(var i=0; i<sections.length; i++) {
      document.write("      <tr><td width=\"112\"><p align=\"center\"><a href=\"" + links[i] + "\"><img name=\"" + sections[i] + "\" src=\"/graphics/" + sections[i] + ".gif\" width=\"104\" height=\"32\" align=\"bottom\" border=\"0\" alt=\"[" + sections[i] + "]\"></a></td></tr>\n");
  }

  document.write("        <tr><td width=\"112\"><p align=\"center\"><img src=\"/graphics/andy_conrad.png\" align=\"bottom\" border=\"0\" alt=\"Andy Conrad P.E.\"></center></td></tr>\n");
 
  document.write("    <tr><td width=\"112\" valign=\"top\" rowspan=\"3\" bgcolor=\"#FF9421\"><center><img src=\"/graphics/search.gif\" width=\"104\" height=\"20\" align=\"bottom\" border=\"0\"><br><input type=\"text\" name=\"q\" size=\"10\" maxlength=\"30\" maxsize=\"30\"><input type=hidden name=\"as_sitesearch\" value=\"www.highwayengineer.co.medina.oh.us\"><br><img src=\"/graphics/search_bottom.gif\" width=\"104\" height=\"20\" align=\"bottom\" border=\"0\"></center></td></tr>\n");

  document.write("    <tr></tr><tr></tr></table>");
  document.write("    </center></td>");
}

function footer(size) {

  document.write("</tr><tr><td width=\"" + size + "\" valign=\"bottom\">\n");
  document.write("<p align=\"center\"><font size=\"2\">Need help? Questions? E-mail the <a href=\"mailto:mchewebmaster@medinaco.org\">Webmaster</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></td>\n");
  document.write("<td width=\"160\">&nbsp;</td></tr>\n");
  document.write("</table></form>\n");
}

function doc_footer() {

  document.write("<p><hr noshade size=\"4\">\n");
  document.write("<p>Copyright &copy; <br>\n");
  document.write("<a href=\"javascript:doc_license();\">License and Credits</a>.<p>\n");
  document.write("<font size=-1 face=arial,helvetica><a href=\"" + window.location + "\">" + window.location + "</a></font>\n");

  document.write("  </td></tr></table>\n");

  document.write("  <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>\n");
}

function doc_license() {
  window.open('../license.html', 'licenseWin', 'width=500,height=400,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars,resizable=yes,copyhistory=no,alwaysRaised=yes');
}

function license() {
  window.open('license.html', 'licenseWin', 'width=500,height=400,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars,resizable=yes,copyhistory=no,alwaysRaised=yes');
}
