/**************************************************************************************************
*
* Programmer:  John-Paul Hopman
*
* Date:        December 4, 2003
*
* Description: This JavaScript page was written to replace the shared borders pages of the ArcIMS
*              website do to difficulties with the use of the shared borders feature of FrontPage
*              2000. The page consists of three main functions which produce the top, left-hand
*              side, and bottom html code for the borders. All hyperlinks must contain the full URL
*              paths to prevent problems caused by buried pages in the site hierarchy.
*
**************************************************************************************************/

var strUserGuide = 'UserGuide';
var strElkhart = 'Elkhart';
var strKosciusko = 'Kosciusko';
var strMarshall = 'Marshall';
var strStJoseph = 'StJoseph';
var strMACOG = 'MACOG';

function turnOnButton(imageName) {

  var imageIndex;

  imageIndex = document.getElementById(imageName);

  if (imageIndex) {
    imageIndex.src = 'http://www.macoggis.com/images/Navigation/on' + imageName + '.gif';
  }

}

function turnOffButton(imageName) {

  var imageIndex;

  imageIndex = document.getElementById(imageName);

  if (imageIndex) {
    imageIndex.src = 'http://www.macoggis.com/images/Navigation/off' + imageName + '.gif';
  }

}

function hyperlinkLocation(imageName) {

  switch(imageName) {
    case (imageName = 'UserGuide'):
      document.location = 'http://www.macoggis.com/UserGuide/default.htm';
      break;
    case (imageName = 'Elkhart'):
      document.location = 'http://www.elkhartcountyindiana.com';
      break;
    case (imageName = 'Kosciusko'):
      document.location = 'http://www.kcgov.com';
      break;
    case (imageName = 'Marshall'):
      document.location = 'http://www.co.marshall.in.us';
      break;
    case (imageName = 'StJoseph'):
      document.location = 'http://www.stjosephcountyindiana.com';
      break;
    case (imageName = 'MACOG'):
      document.location = 'http://www.macog.com';
      break;
    default:
      alert("There is a problem with the code, please alert the system administrator.");
      break;
  }

}

function createTopBanner() {

  document.write('<table border="0" width="720" cellspacing="0">');
  document.write('  <tr>');
  document.write('    <td width="145" bgcolor="#7394AD" background="http://www.macoggis.com/images/Default/tableBackground.gif">');
  document.write('      <div align="center"><center>');
  document.write('        <table border="0" height="100">');
  document.write('          <tr>');
  document.write('            <td width="100%">');
  document.write('              <p align="center">');
  document.write('                <img border="0" width="100" height="83" src="http://www.macoggis.com/images/Default/sealGlobe.gif">');
  document.write('              </p>');
  document.write('            </td>');
  document.write('          </tr>');
  document.write('        </table>');
  document.write('      </center></div>');
  document.write('    </td>');
  document.write('    <td>');
  document.write('      <p align="center">');
  document.write('        <b><font size="6">Michiana Regional<br>Geographic Information System</font></b>');
  document.write('      </p>');
  document.write('    </td>');
  document.write('  </tr>');
  document.write('  <tr>');
  document.write('    <td width="145" bgcolor="#7394AD" background="http://www.macoggis.com/images/Default/tableBackground.gif">');
  document.write('    </td>');
  document.write('    <td bgcolor="#7394AD" background="http://www.macoggis.com/images/Default/tableBackground.gif">');
  document.write('      <table border="0" width="100%">');
  document.write('        <tr>');
  document.write('          <td width="50%">');
  document.write('            <p align="center"><b><font color="#FFFFFF">');
  document.write('              <font size="5">N</font>ORTHERN <font size="5">I</font>NDIANA');
  document.write('            </font></b></p>');
  document.write('          </td>');
  document.write('          <td width="50%">');
  document.write('            <p align="center"><b><font color="#FFFFFF">');
  document.write('              <a href="http://www.macoggis.com/faq.htm"><font size="3">F</font><font size="2">AQ</a> | </font>');
  document.write('              <a href="mailto:macogdir@macog.com"><font size="3">C</font><font size="2">ONTACT</font> <font size="3">U</font><font size="2">S</a> | </font>');
  document.write('              <a href="http://www.macoggis.com"><font size="3">H</font><font size="2">OME</font></a>');
  document.write('            </font></b></p>');
  document.write('          </td>');
  document.write('        </tr>');
  document.write('      </table>');
  document.write('    </td>');
  document.write('  </tr>');
  document.write('</table>');

}

function createLeftBanner() {

  document.write('<table border="0" width="147" bgcolor="#7394AD" height="2000" cellspacing="0" background="http://www.macoggis.com/images/Default/tableBackground.gif">');
  document.write('  <tr>');
  document.write('    <td width="100%" valign="top">');
  document.write('      <div align="center"><center>');
  document.write('        <table border="0" width="100%">');
  document.write('          <tr>');
  document.write('            <td width="100%">');
  document.write('              <input type="image" src="http://www.macoggis.com/images/Navigation/offUserGuide.gif" id="UserGuide" value="UserGuide" onmouseover="turnOnButton(strUserGuide)" onmouseout="turnOffButton(strUserGuide)" onclick="hyperlinkLocation(strUserGuide)" width="133" height="28">');
  document.write('            </td>');
  document.write('          </tr>');
  document.write('          <tr>');
  document.write('            <td width="100%">');
  document.write('              <input type="image" src="http://www.macoggis.com/images/Navigation/offElkhart.gif" id="Elkhart" value="Elkhart" onmouseover="turnOnButton(strElkhart)" onmouseout="turnOffButton(strElkhart)" onclick="hyperlinkLocation(strElkhart)" width="133" height="28">');
  document.write('            </td>');
  document.write('          </tr>');

  document.write('          <tr>');
  document.write('            <td width="100%">');
  document.write('              <input type="image" src="http://www.macoggis.com/images/Navigation/offKosciusko.gif" id="Kosciusko" value="Kosciusko" onmouseover="turnOnButton(strKosciusko)" onmouseout="turnOffButton(strKosciusko)" onclick="hyperlinkLocation(strKosciusko)" width="133" height="28">');
  document.write('            </td>');
  document.write('          </tr>');
  document.write('          <tr>');
  document.write('            <td width="100%">');
  document.write('              <input type="image" src="http://www.macoggis.com/images/Navigation/offMarshall.gif" id="Marshall" value="Marshall" onmouseover="turnOnButton(strMarshall)" onmouseout="turnOffButton(strMarshall)" onclick="hyperlinkLocation(strMarshall)" width="133" height="28">');
  document.write('            </td>');
  document.write('          </tr>');

  document.write('          <tr>');
  document.write('            <td width="100%">');
  document.write('              <input type="image" src="http://www.macoggis.com/images/Navigation/offStJoseph.gif" id="StJoseph" value="StJoseph" onmouseover="turnOnButton(strStJoseph)" onmouseout="turnOffButton(strStJoseph)" onclick="hyperlinkLocation(strStJoseph)" width="133" height="28">');
  document.write('            </td>');
  document.write('          </tr>');
  document.write('          <tr>');
  document.write('            <td width="100%">');
  document.write('              <input type="image" src="http://www.macoggis.com/images/Navigation/offMACOG.gif" id="MACOG" value="MACOG" onmouseover="turnOnButton(strMACOG)" onmouseout="turnOffButton(strMACOG)" onclick="hyperlinkLocation(strMACOG)" width="133" height="28">');
  document.write('            </td>');
  document.write('          </tr>');
  document.write('        </table>');
  document.write('      </center></div>');
  document.write('    </td>');
  document.write('  </tr>');
  document.write('</table>');

}

function createBottomBanner() {

  document.write('<table border="0" width="720" cellspacing="0">');
  document.write('  <tr>');
  document.write('    <td width="145" bgcolor="#7394AD" background="http://www.macoggis.com/images/Default/tableBackground.gif">');
  document.write('    </td>');
  document.write('    <td>');
  document.write('      <table border="0" width="100%">');
  document.write('        <tr>');
  document.write('          <td width="100%">');
  document.write('            <p style="text-indent: 25"><font color="#808080" size="1">The information on this site is ');
  document.write('            provided as a convenience and does not replace official notices or publications. Although ');
  document.write('            our web pages are routinely updated, there may be a delay in posting changes. MACOG ');
  document.write('            assumes no liability for any legal consequences arising out of the listing of inaccurate ');
  document.write('            or outdated information. We will try to respond quickly to all inquiries, but mail to the ');
  document.write('            website administrator may not be processed every day. Information that is time critical ');
  document.write('            should not be transmitted via this website, and especially not via email. Information on ');
  document.write('            obtaining official copies of county records and documents may be obtained from the ');
  document.write('            Elkhart and St. Joseph County GIS Coordinators.</font></p>');
  document.write('          </td>');
  document.write('        </tr>');
  document.write('      </table>');
  document.write('    </td>');
  document.write('  </tr>');
  document.write('</table>');

}