/*
   * based on menu.js
   * by gary smith, July 1997
   * Copyright (c) 1997-1999 Netscape Communications Corp.
   *
   * Netscape grants you a royalty free license to use or modify this
   * software provided that this copyright notice appears on all copies.
   * This software is provided "AS IS," without a warranty of any kind.
   
   MODIFICATION OF mmLoadMenus. FILE REQUIRES MM_MENU.JS
   DAN DEITSCH
   DECEMBER, 5, 2006

   THIS MODIFICATION ADDS A VARIABLE "linkFiles" TO HOLD A STRING OF .JPG LINKS NEEDED FOR THE NAVIGATION BAR.
   MM_outputHeader IS ALSO ADDED TO OUTPUT THE NAVIGATION HEADER TABLE TO THE CALLING .HTML FILE
   mmLoadMenus() HAD BEEN MODIFIED USING MORE DESCRIPTIVE MENU ITEM NAMES.


*/
var counter = 0;
var max_images = 4;
var imageLibrary = new Array();


//THIS VARIABLE HOLDS THE LINKS TO THE IMAGES USED IN THE NAVIGATION SECTION OF THE HEADER.
/*  REMOVED 9-9-09 DDEITSCH - REMOVES 800X600 RESOLUTION CODE
if ((screen.width < 900))
{
  var linkFiles = "'http://www.midland-mi.org/images/headers/800/header1_r2_c2.gif','../images/headers/800/header1_r2_c4_f2.gif','../images/headers/800/header1_r2_c5_f2.gif','../images/headers/800/header1_r2_c6_f2_800.gif','../images/headers/800/header1_r2_c7_f2_800.gif','../images/headers/800/header1_r2_c8_f2_800.gif','../images/headers/800/header1_r2_c9_f2_800.gif'";
  imageLibrary[0] = new Image();
  imageLibrary[0].src = "http://www.midland-mi.org/images/headers/800/header1_r1_c3.jpg";
  imageLibrary[1] = new Image();
  imageLibrary[1].src = "http://www.midland-mi.org/images/headers/800/header1_r1_c3_2.jpg";
  imageLibrary[2] = new Image();
  imageLibrary[2].src = "http://www.midland-mi.org/images/headers/800/header1_r1_c3_3.jpg";
  imageLibrary[3] = new Image();
  imageLibrary[3].src = "http://www.midland-mi.org/images/headers/800/header1_r1_c3_4.jpg";
}

if ((screen.width > 901 && screen.width < 1100 ))
//if ((screen.width > 901)) */
if (screen.width <= 1100) {
  var linkFiles = "'http://www.midland-mi.org/DAD_test_folder/redesign/images/header1_r2_c2_f2.gif','http://www.midland-mi.org/DAD_test_folder/redesign/images/header1_r2_c4_f2.gif','http://www.midland-mi.org/DAD_test_folder/redesign/images/header1_r2_c5_f2.gif','http://www.midland-mi.org/DAD_test_folder/redesign/images/header1_r2_c6_f2.gif','http://www.midland-mi.org/DAD_test_folder/redesign/images/header1_r2_c7_f2.gif','http://www.midland-mi.org/DAD_test_folder/redesign/images/header1_r2_c8_f2.gif','http://www.midland-mi.org/DAD_test_folder/redesign/images/header1_r2_c9_f2.gif'";
  imageLibrary[0] = new Image();
  imageLibrary[0].src = "http://www.midland-mi.org/images/headers/1024/header1_r1_c3.jpg";
  imageLibrary[1] = new Image();
  imageLibrary[1].src = "http://www.midland-mi.org/images/headers/1024/header1_r1_c3_2.jpg";
  imageLibrary[2] = new Image();
  imageLibrary[2].src = "http://www.midland-mi.org/images/headers/1024/header1_r1_c3_3.jpg";
  imageLibrary[3] = new Image();
  imageLibrary[3].src = "http://www.midland-mi.org/images/headers/1024/header1_r1_c3_4.jpg";
}

if ((screen.width > 1100))
{
var linkFiles = "'http://www.midland-mi.org/images/headers/1280/header1_r2_c2_f2.gif','http://www.midland-mi.org/images/headers/1280/header1_r2_c4_f2.gif','http://www.midland-mi.org/images/headers/1280/header1_r2_c5_f2.gif','http://www.midland-mi.org/images/headers/1280/header1_r2_c6_f2.gif','http://www.midland-mi.org/images/headers/1280/header1_r2_c7_f2.gif','http://www.midland-mi.org/images/headers/1280/header1_r2_c8_f2.gif','http://www.midland-mi.org/images/headers/1280/header1_r2_c9_f2.gif'";
imageLibrary[0] = new Image();
imageLibrary[0].src = "http://www.midland-mi.org/images/headers/1280/header1_r1_c3.jpg";
imageLibrary[1] = new Image();
imageLibrary[1].src = "http://www.midland-mi.org/images/headers/1280/header1_r1_c3_2.jpg";
imageLibrary[2] = new Image();
imageLibrary[2].src = "http://www.midland-mi.org/images/headers/1280/header1_r1_c3_3.jpg";
imageLibrary[3] = new Image();
imageLibrary[3].src = "http://www.midland-mi.org/images/headers/1280/header1_r1_c3_4.jpg";
}

//THIS FUNCTION OUTPUTS THE TABLE WHICH CONTAINS THE NAVIGATION HEADER.  
function MM_outputHeader(){

//if ((screen.width > 901 && screen.width < 1100)) - REMOVED 9-9-09 DDEITSCH - REMOVES 800X600 CODE
//if ((screen.width > 901)){
if (screen.width <= 1100 ) {
 var head = "<table class = \"nav_header\" cellpadding=\"0\" cellspacing=\"0\">";
  head += "  <tr> ";
  head += "    <td>";
  head += "      <table class = \"inner_nav_header\" cellpadding=\"0\" cellspacing=\"0\" >";
  head += "        <tr> ";
  head += "          <td><a href = \"http://www.midland-mi.org/index.php\">";
  head += "          <img alt = \"\" name=\"header1_r1_c1\" src=\"http://www.midland-mi.org/images/headers/1024/header1_r1_c1.jpg\" border = \"0\"></a></td>";
  head += "          <td>";
  head += "          <img alt = \"\" name=\"header1_r1_c3\" src=\"http://www.midland-mi.org/images/headers/1024/header1_r1_c3.jpg\" border = \"0\" align =\"bottom\"></td>";
  head += "        </tr>";
  head += "      </table>";
  head += "  </td>";
  head += "  </tr>";
  head += "  <tr>";
  head += "    <td>";
  head += "       <table  class = \"inner_nav_header\" cellpadding=\"0\" cellspacing=\"0\">";
  head += "        <tr>";
  head += "          <td><img alt = \"\" name=\"header1_r2_c1\" src=\"http://www.midland-mi.org/images/headers/1024/header1_r2_c1.gif\" border=\"0\"></td>";
  head += "          <td><a href=\"#\" onMouseOut=\"MM_swapImgRestore();MM_startTimeout();\"  onMouseOver=\"MM_swapImage('header1_r2_c2','','http://www.midland-mi.org/images/headers/1024/header1_r2_c2_f2.gif',1);MM_showMenu(window.government,0,26,null,'header1_r2_c2')\" >";
  head += "              <img alt = \"\" name=\"header1_r2_c2\" src=\"http://www.midland-mi.org/images/headers/1024/header1_r2_c2.gif\" border=\"0\"></a></td>";
  head += "          <td><a href=\"#\" onMouseOut=\"MM_swapImgRestore();MM_startTimeout();\"  onMouseOver=\"MM_swapImage('header1_r2_c4','','http://www.midland-mi.org/images/headers/1024/header1_r2_c4_f2.gif',1);MM_showMenu(window.pay,0,26,null,'header1_r2_c4')\" >";
  head += "          <img alt = \"\" name=\"header1_r2_c4\" src=\"http://www.midland-mi.org/images/headers/1024/header1_r2_c4.gif\" border=\"0\"></a></td>";
  head += "          <td><a href=\"#\" onMouseOut=\"MM_swapImgRestore();MM_startTimeout();\"  onMouseOver=\"MM_swapImage('header1_r2_c5','','http://www.midland-mi.org/images/headers/1024/header1_r2_c5_f2.gif',1);MM_showMenu(window.services,0,23,null,'header1_r2_c5')\" >";
  head += "          <img alt = \"\" name=\"header1_r2_c5\" src=\"http://www.midland-mi.org/images/headers/1024/header1_r2_c5.gif\" border=\"0\"></a></td>";
  head += "          <td><a href=\"#\" onMouseOut=\"MM_swapImgRestore();MM_startTimeout();\"  onMouseOver=\"MM_swapImage('header1_r2_c6','','http://www.midland-mi.org/images/headers/1024/header1_r2_c6_f2.gif',1);MM_showMenu(window.community,0,26,null,'header1_r2_c6')\" >";
  head += "          <img alt = \"\" name=\"header1_r2_c6\" src=\"http://www.midland-mi.org/images/headers/1024/header1_r2_c6.gif\" border=\"0\"></a></td>";
  head += "          <td><a href=\"#\" onMouseOut=\"MM_swapImgRestore();MM_startTimeout();\"  onMouseOver=\"MM_swapImage('header1_r2_c7','','http://www.midland-mi.org/images/headers/1024/header1_r2_c7_f2.gif',1);MM_showMenu(window.contact,0,26,null,'header1_r2_c7')\" >";
  head += "          <img alt = \"\" name=\"header1_r2_c7\" src=\"http://www.midland-mi.org/images/headers/1024/header1_r2_c7.gif\" border=\"0\"></a></td>";
  head += "          <td><a href=\"http://www.midland-mi.org/Searchtest/search.htm\" onMouseOut=\"MM_swapImgRestore();\"  onMouseOver=\"MM_swapImage('header1_r2_c8','','http://www.midland-mi.org/images/headers/1024/header1_r2_c8_f2.gif',1);\" >";
  head += "          <img alt = \"\" name=\"header1_r2_c8\" src=\"http://www.midland-mi.org/images/headers/1024/header1_r2_c8.gif\" border=\"0\"></a></td>";
  head += "          <td><a href=\"http://gis6.midland-mi.org/public/index.aspx\" onMouseOut=\"MM_swapImgRestore();\"  onMouseOver=\"MM_swapImage('header1_r2_c9','','http://www.midland-mi.org/images/headers/1024/header1_r2_c9_f2.gif',1);\" >";
  head += "          <img alt = \"\" name=\"header1_r2_c9\" src=\"http://www.midland-mi.org/images/headers/1024/header1_r2_c9.gif\" border=\"0\"></a></td>";
  head += "          <td>";
  head += "          <img alt = \"\" name=\"header1_r2_c10\" src=\"http://www.midland-mi.org/images/headers/1024/header1_r2_c10.gif\" border=\"0\"></td>";
  head += "        </tr>";
  head += "      </table>";
  head += "    </td>";
  head += "  </tr>";
  head += "</table>";
  }
  if ((screen.width > 1100))
{
  var head = "<table class = \"nav_header\" cellpadding=\"0\" cellspacing=\"0\">";
  head += "  <tr> ";
  head += "    <td>";
  head += "      <table class = \"inner_nav_header\" cellpadding=\"0\" cellspacing=\"0\">";
  head += "        <tr> ";
  head += "          <td><a href = \"http://www.midland-mi.org/index.php\">";
  head += "          <img alt = \"\" name=\"header1_r1_c1\" src=\"http://www.midland-mi.org/images/headers/1280/header1_r1_c1.gif\" border = \"0\"></a></td>";
  head += "          <td>";
  head += "          <img alt = \"\" name=\"header1_r1_c3\" src=\"http://www.midland-mi.org/images/headers/1280/header1_r1_c3.jpg\" border = \"0\" align =\"bottom\"></td>";
  head += "        </tr>";
  head += "      </table>";
  head += "  </td>";
  head += "  </tr>";
  head += "  <tr>";
  head += "    <td>";
  head += "       <table class = \"inner_nav_header2\"  cellpadding=\"0\" cellspacing=\"0\">";
  head += "        <tr>";
  head += "          <td><img alt = \"\" name=\"header1_r2_c1\" src=\"http://www.midland-mi.org/images/headers/1280/header1_r2_c1.gif\" border=\"0\"></td>";
  head += "          <td><a href=\"#\" onMouseOut=\"MM_swapImgRestore();MM_startTimeout();\"  onMouseOver=\"MM_swapImage('header1_r2_c2','','http://www.midland-mi.org/images/headers/1280/header1_r2_c2_f2.gif',1);MM_showMenu(window.government,30,30,null,'header1_r2_c2')\" >";
  head += "              <img alt = \"\" name=\"header1_r2_c2\" src=\"http://www.midland-mi.org//images/headers/1280/header1_r2_c2.gif\" border=\"0\"></a></td>";
  head += "          <td><a href=\"#\" onMouseOut=\"MM_swapImgRestore();MM_startTimeout();\"  onMouseOver=\"MM_swapImage('header1_r2_c4','','http://www.midland-mi.org/images/headers/1280/header1_r2_c4_f2.gif',1);MM_showMenu(window.pay,0,26,null,'header1_r2_c4')\" >";
  head += "          <img alt = \"\" name=\"header1_r2_c4\" src=\"http://www.midland-mi.org/images/headers/1280/header1_r2_c4.gif\" border=\"0\"></a></td>";
  head += "          <td><a href=\"#\" onMouseOut=\"MM_swapImgRestore();MM_startTimeout();\"  onMouseOver=\"MM_swapImage('header1_r2_c5','','http://www.midland-mi.org/images/headers/1280/header1_r2_c5_f2.gif',1);MM_showMenu(window.services,0,23,null,'header1_r2_c5')\" >";
  head += "          <img alt = \"\" name=\"header1_r2_c5\" src=\"http://www.midland-mi.org/images/headers/1280/header1_r2_c5.gif\" border=\"0\"></a></td>";
  head += "          <td><a href=\"#\" onMouseOut=\"MM_swapImgRestore();MM_startTimeout();\"  onMouseOver=\"MM_swapImage('header1_r2_c6','','http://www.midland-mi.org/images/headers/1280/header1_r2_c6_f2.gif',1);MM_showMenu(window.community,0,26,null,'header1_r2_c6')\" >";
  head += "          <img alt = \"\" name=\"header1_r2_c6\" src=\"http://www.midland-mi.org/images/headers/1280/header1_r2_c6.gif\" border=\"0\"></a></td>";
  head += "          <td><a href=\"#\" onMouseOut=\"MM_swapImgRestore();MM_startTimeout();\"  onMouseOver=\"MM_swapImage('header1_r2_c7','','http://www.midland-mi.org/images/headers/1280/header1_r2_c7_f2.gif',1);MM_showMenu(window.contact,0,26,null,'header1_r2_c7')\" >";
  head += "          <img alt = \"\" name=\"header1_r2_c7\" src=\"http://www.midland-mi.org/images/headers/1280/header1_r2_c7.gif\" border=\"0\"></a></td>";
  head += "          <td><a href=\"http://www.midland-mi.org/Searchtest/search.htm\" onMouseOut=\"MM_swapImgRestore();\"  onMouseOver=\"MM_swapImage('header1_r2_c8','','http://www.midland-mi.org/images/headers/1280/header1_r2_c8_f2.gif',1);\" >";
  head += "          <img alt = \"\" name=\"header1_r2_c8\" src=\"http://www.midland-mi.org/images/headers/1280/header1_r2_c8.gif\" border=\"0\"></a></td>";
  head += "          <td><a href=\"http://gis6.midland-mi.org/public/index.aspx\" onMouseOut=\"MM_swapImgRestore();\"  onMouseOver=\"MM_swapImage('header1_r2_c9','','http://www.midland-mi.org/images/headers/1280/header1_r2_c9_f2.gif',1);\" >";
  head += "          <img alt = \"\" name=\"header1_r2_c9\" src=\"http://www.midland-mi.org/images/headers/1280/header1_r2_c9.gif\" border=\"0\"></a></td>";
  head += "          <td>";
  head += "          <img alt = \"\" name=\"header1_r2_c10\" src=\"http://www.midland-mi.org/images/headers/1280/header1_r2_c10.gif\" border=\"0\"></td>";
  head += "        </tr>";
  head += "      </table>";
  head += "    </td>";
  head += "  </tr>";
  head += "</table>";
  } 
 /*
 REMOVED 9-9-09 DDEITSCH - REMOVES 800X600 RESOLUTION CODE

  if ((screen.width < 900))
  {
  var head = "<table class = \"nav_header\" cellpadding=\"0\" cellspacing=\"0\">";
  head += "  <tr> ";
  head += "    <td>";
  head += "      <table class = \"inner_nav_header\" cellpadding=\"0\" cellspacing=\"0\">";
  head += "        <tr> ";
  head += "          <td><a href = \"http://www.midland-mi.org/index.php\">";
  head += "          <img alt = \"\" name=\"header1_r1_c1\" src=\"http://www.midland-mi.org/images/headers/800/header1_r1_c1.gif\" border=\"0\"></a></td>";
  head += "          <td>";
  head += "          <img alt = \"\" name=\"header1_r1_c3\" src=\"http://www.midland-mi.org/images/headers/800/header1_r1_c3.jpg\" border=\"0\"></td>";
  head += "        </tr>";
  head += "      </table>";
  head += "  </td>";
  head += "  </tr>";
  head += "  <tr>";
  head += "    <td>";
  head += "       <table class = \"inner_nav_header\" cellpadding=\"0\" cellspacing=\"0\" >";
  head += "        <tr>";
  head += "          <td><img alt = \"\" name=\"header1_r2_c1\" src=\"http://www.midland-mi.org/images/headers/800/header1_r2_c1.gif\" border=\"0\"></td>";
  head += "          <td><a href=\"#\" onMouseOut=\"MM_swapImgRestore();MM_startTimeout();\"  onMouseOver=\"MM_swapImage('header1_r2_c2','','http://www.midland-mi.org/images/headers/800/header1_r2_c2_f2.gif',1);MM_showMenu(window.government,30,23,null,'header1_r2_c2')\" >";
  head += "              <img alt = \"\" name=\"header1_r2_c2\" src=\"http://www.midland-mi.org//images/headers/800/header1_r2_c2.gif\" border=\"0\"></a></td>";
  head += "          <td><a href=\"#\" onMouseOut=\"MM_swapImgRestore();MM_startTimeout();\"  onMouseOver=\"MM_swapImage('header1_r2_c4','','http://www.midland-mi.org/images/headers/800/header1_r2_c4_f2.gif',1);MM_showMenu(window.pay,0,26,null,'header1_r2_c4')\" >";
  head += "          <img alt = \"\" name=\"header1_r2_c4\" src=\"http://www.midland-mi.org//images/headers/800/header1_r2_c4.gif\" border=\"0\"></a></td>";
  head += "          <td><a href=\"#\" onMouseOut=\"MM_swapImgRestore();MM_startTimeout();\"  onMouseOver=\"MM_swapImage('header1_r2_c5','','http://www.midland-mi.org/images/headers/800/header1_r2_c5_f2.gif',1);MM_showMenu(window.services,0,23,null,'header1_r2_c5')\" >";
  head += "          <img alt = \"\" name=\"header1_r2_c5\" src=\"http://www.midland-mi.org//images/headers/800/header1_r2_c5.gif\" border=\"0\"></a></td>";
  head += "          <td><a href=\"#\" onMouseOut=\"MM_swapImgRestore();MM_startTimeout();\"  onMouseOver=\"MM_swapImage('header1_r2_c6','','http://www.midland-mi.org/images/headers/800/header1_r2_c6_f2.gif',1);MM_showMenu(window.community,0,26,null,'header1_r2_c6')\" >";
  head += "          <img alt = \"\" name=\"header1_r2_c6\" src=\"http://www.midland-mi.org//images/headers/800/header1_r2_c6.gif\" border=\"0\"></a></td>";
  head += "          <td><a href=\"#\" onMouseOut=\"MM_swapImgRestore();MM_startTimeout();\"  onMouseOver=\"MM_swapImage('header1_r2_c7','','http://www.midland-mi.org/images/headers/800/header1_r2_c7_f2.gif',1);MM_showMenu(window.contact,0,26,null,'header1_r2_c7')\" >";
  //head += "          <td><a href=\"mailto:cityhall@midland-mi.org\" onMouseOut=\"MM_swapImgRestore()\"  onMouseOver=\"MM_swapImage('header1_r2_c7','','http://www.midland-mi.org/images/headers/800/header1_r2_c7_f2.gif',1);\" >";
  head += "          <img alt = \"\" name=\"header1_r2_c7\" src=\"http://www.midland-mi.org//images/headers/800/header1_r2_c7.gif\" border=\"0\"></a></td>";
  head += "          <td><a href=\"http://www.midland-mi.org/Searchtest/search.htm\" onMouseOut=\"MM_swapImgRestore();\"  onMouseOver=\"MM_swapImage('header1_r2_c8','','http://www.midland-mi.org/images/headers/800/header1_r2_c8_f2.gif',1);\" >";
  head += "          <img alt = \"\" name=\"header1_r2_c8\" src=\"http://www.midland-mi.org//images/headers/800/header1_r2_c8.gif\" border=\"0\"></a></td>";
  head += "          <td><a href=\"http://gis6.midland-mi.org/public/index.aspx\" onMouseOut=\"MM_swapImgRestore();\"  onMouseOver=\"MM_swapImage('header1_r2_c9','','http://www.midland-mi.org/images/headers/800/header1_r2_c9_f2.gif',1);\" >";
  head += "          <img alt = \"\" name=\"header1_r2_c9\" src=\"http://www.midland-mi.org//images/headers/800/header1_r2_c9.gif\" border=\"0\"></a></td>";
  head += "          <td>";
  head += "          <img alt = \"\" name=\"header1_r2_c10\" src=\"http://www.midland-mi.org//images/headers/800/header1_r2_c10.gif\" border=\"0\"></td>";
  head += "        </tr>";
  head += "      </table>";
  head += "    </td>";
  head += "  </tr>";
  head += "</table>";

   }
   */
  document.write(head);

}

/*
   FUNCTION THAT CREATES DROP DOWN MENUS
 
   TO ADD NEW MENU, USE "window.NAMEOFMENU = new Menu("REFERENCE NAME", width, height, font style, font size, font color,font highlight color,bkground color, highlight bkground color, horizontal text location
   vertical location, padding, space, time out, menu offset horizontal, menu offset vertical, menu relational to other menus, opacity, vertical, indent)  
  
   TO ADD NEW MENU ITEM, USE "window.NAMEOFMENU("NAME DISPLAYED ON MENU", "location = 'URL'")"

*/

function mmLoadMenus() {
  if (window.updates) return;

   window.pay = new Menu("root",177,18,"Arial, Helvetica, sans-serif",12,"#FFFFFF","#FFFFFF","#330066","#663399","center","middle",3,0,500,-5,7,true,true,true,0);

   //CLICK2GOV HYPERLINKS -- SHOULD BE ENABLED UNLESS PERFORMING MAINENANCE
   pay.addMenuItem("Water/Sewer Bill","location='https://c2g.midland-mi.org/Click2GovCXP/Index.jsp'");
   pay.addMenuItem("Parking Tickets","location='https://c2g.midland-mi.org/Click2GovPT/Index.jsp'");
   //END CLICK2GOV HYPERLINKS

   //HYPERLINKS TO MAINTENANCE PAGES -- SHOULD BE COMMENTED OUT UNLESS PERFORMING MAINTENANCE
   //pay.addMenuItem("Water/Sewer Bill","location='http://www.midland-mi.org/c2gWater.htm'");
   //pay.addMenuItem("Parking Tickets","location='http://www.midland-mi.org/c2gParking.htm'");
   //END HYPERLINKS

   pay.addMenuItem("Schedule Tee Time","location='http://www.curriegolf.com'");
   pay.hideOnMouseOut=true;
   window.contact = new Menu("root",205,18,"Arial, Helvetica, sans-serif",12,"#FFFFFF","#FFFFFF","#330066","#663399","center","middle",3,0,500,-50,15,true,true,true,0);
   contact.addMenuItem("Action Line Requests","location='http://www.egovlink.com/midland/action.asp'");
   contact.addMenuItem("Email City Hall","location='mailto: cityhall@midland-mi.org'");
   contact.hideOnMouseOut=true;
   window.community = new Menu("root",177,18,"Arial, Helvetica, sans-serif",12,"#FFFFFF","#FFFFFF","#330066","#663399","center","middle",3,0,500,-50,15,true,true,true,0);
   community.addMenuItem("Application Forms","location='http://www.midland-mi.org/new/forms.htm'");
   community.addMenuItem("Building Permits","location='http://www.midland-mi.org/government/departments/planning/building/permitforms.htm'");
   community.addMenuItem("City Project Bid Packets","location='http://www.midland-mi.org/government/departments/fiscalservices/purchasing/purchasing.htm'");
   community.addMenuItem("MCTV Message Board","location='http://www.midland-mi.org/government/departments/mctv/msgbd.htm'");
   community.hideOnMouseOut=true;
   window.government = new Menu("root",205,18,"Arial, Helvetica, sans-serif",12,"#FFFFFF","#FFFFFF","#330066","#663399","center","middle",3,0,500,-5,7,true,true,true,10);
   government.addMenuItem("City Council","location='http://www.midland-mi.org/government/citycouncil.htm'");
   government.addMenuItem("City Departments","location='http://www.midland-mi.org/government/departments.htm'");
   government.addMenuItem("Boards & Commissions","location='http://www.midland-mi.org/government/commissions.htm'");
   government.addMenuItem("Staff Directory","location='http://www.midland-mi.org/government/staffdirectory.htm'");
   government.addMenuItem("On-Demand (Streaming) Video","location='http://midland.granicus.com/ViewPublisher.php?view_id=2'");
   government.hideOnMouseOut=true;
   window.services = new Menu("root",205,18,"Arial, Helvetica, sans-serif",12,"#FFFFFF","#FFFFFF","#330066","#663399","center","middle",3,0,500,-5,7,true,true,true,0);
   services.addMenuItem("A to Z Services Directory","location='http://www.midland-mi.org/services/services.htm'");
   services.addMenuItem("City Employment","location='http://www.midland-mi.org/government/departments/HR/employment.htm'");
   services.addMenuItem("Communications/News","location='http://www.midland-mi.org/new/mediaroom.htm'");
   services.addMenuItem("Planning/Community Development","location='http://www.midland-mi.org/government/departments/planning/planning.htm'");
   services.addMenuItem("Dial-A-Ride","location='http://www.midland-mi.org/government/departments/dps/dart/dart.htm'");
   services.addMenuItem("Fire Department","location='http://www.midland-mi.org/government/departments/fire/fire.htm'");
   services.addMenuItem("GIS / Mapping","location='http://www.midland-mi.org/government/departments/is/gis/index.htm'");
   services.addMenuItem("Library","location='http://www.midland-mi.org/government/departments/library/library.htm'");
   services.addMenuItem("Police Department","location='http://www.midland-mi.org/government/departments/police/police.htm'");
   services.addMenuItem("Property Information","location='http://www.midland-mi.org/government/departments/assessor/propertyonline.htm'");
   services.addMenuItem("Recreation","location='http://www.midland-mi.org/government/departments/dps/p&rhome.htm'");
   services.addMenuItem("Refuse Collection","location='http://www.midland-mi.org/government/departments/dps/publicservices.htm'");

   //CLICK2GOV HYPERLINKS -- SHOULD BE ENABLED UNLESS PERFORMING MAINENANCE
   services.addMenuItem("Tax Bill Information","location='http://www2.midland-mi.org/taxInformation.htm'");
   //END CLICK2GOV HYPERLINKS

   //HYPERLINKS TO MAINTENANCE PAGES -- SHOULD BE COMMENTED OUT UNLESS PERFORMING MAINTENANCE
   //services.addMenuItem("Tax Bill Information","location='http://www.midland-mi.org/c2gTax.htm'");
   //END HYPERLINKS

   services.addMenuItem("Water & Sewer","location='http://www.midland-mi.org/government/departments/utilities/utilities.htm'");
   services.hideOnMouseOut=true;
   
   government.writeMenus();
}
 // mmLoadMenus()

function MM_findObj(n, d) { //v3.0
  var p,i,x;  
  if(!d) d=document; 
  if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; 
    n=n.substring(0,p);
  }
  if(!(x=d[n])&&d.all) x=d.all[n]; 
  for (i=0;!x&&i<d.forms.length;i++) 
    x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) 
    x=MM_findObj(n,d.layers[i].document); 
  return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments;
  document.MM_sr=new Array; 
  for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){
     document.MM_sr[j++]=x; 
     if(!x.oSrc) x.oSrc=x.src; 
      x.src=a[i+2];
    }
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function outputFooter(){
  var footer = "<table class = \"footer_table\"\">\n";
  footer +=" <tr>\n"; 
  footer +="    <td class = \"footer\">\n";
  footer +="        <b>City of Midland</b> &#8226;\n";
  footer +="           333 W. Ellsworth St. &#8226;\n"; 
  footer +="           Midland, MI 48640 &#8226;\n";
  footer +="          (989) 837-3300\n";
  footer +="    </td>\n";
  footer +="  </tr>\n";
  footer +="</table>\n";
  document.write(footer);

}

function transition_images() {
   
  document.all.header1_r1_c3.filters["blendTrans"].apply();

  document.all.header1_r1_c3.src = imageLibrary[counter].src;

  document.all.header1_r1_c3.filters["blendTrans"].play();
  
  counter++;
 
  if (counter >= max_images)
  {
    counter = 0;
  }


  setTimeout("transition_images()", 10000);
}
