// JavaScript Document
// NOTE: FOR THIS SCRIPT TO WORK, THE HTML PAGE MUST USE A "DIV" TAG THAT STARTS AT LEAST 100 PIXELS FROM THE TOP.
// (IN OTHER WORDS: <DIV id=main style="LEFT: 190px; POSITION: absolute; TOP: 105px; Z-INDEX: 9;" class="main">
//The section below sets up the functionality of the pop-up menus
var hostName = document.location.host;
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->

function MM_findObj(n, d) { //v4.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);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}


function P7_hideDiv(evt) { //v1.2 by PVII
 var b,relT,mT=false; 
 if(document.layers){b=evt.target;if(b.p7aHide){
  b.visibility="hidden";}
  else{routeEvent(evt);}
 }else if(document.all&&!window.opera){b=event.srcElement;
  while(b!=null){if(b.tagName=="DIV" && b.p7ahD){mT=true;break;}b=b.parentElement;}
  if(!b.contains(event.toElement)){b.style.visibility="hidden";}
 }else if(document.getElementById){b=evt.currentTarget;relT=evt.relatedTarget;
  while(relT!=null){if(b==relT){mT=true;break;}
  relT=relT.parentNode;}if(!mT){b.style.visibility="hidden";}}
}

function P7_autoHide() { //v1.2 by PVII
 var i,g,args=P7_autoHide.arguments;
 for(i=0;i<args.length;i++){if((g=MM_findObj(args[i]))!=null){
  g.p7aHide=true;if(document.layers){
  g.captureEvents(Event.MOUSEOUT);}g.onmouseout=P7_hideDiv;g.p7ahD=true;}}
}

function P7_autoLayers() { //v1.2 by PVII
 var g,b,k,f,args=P7_autoLayers.arguments;
 var a = parseInt(args[0]);if(isNaN(a))a=0;
 if(!document.p7setc) {p7c=new Array();document.p7setc=true;
  for (var u=0;u<10;u++) {p7c[u] = new Array();}}
 for(k=0; k<p7c[a].length; k++) {
  if((g=MM_findObj(p7c[a][k]))!=null) {
   b=(document.layers)?g:g.style;b.visibility="hidden";}}
 for(k=1; k<args.length; k++) {
  if((g=MM_findObj(args[k])) != null) {
   b=(document.layers)?g:g.style;b.visibility="visible";f=false;
   for(j=0;j<p7c[a].length;j++) {
    if(args[k]==p7c[a][j]) {f=true;}}
  if(!f) {p7c[a][p7c[a].length++]=args[k];}}}
}
/****************************************************************************/

// TOP BANNER - photo banner plus gold and blue banners.
 document.writeln(' <div id=banner class="noprint" style="LEFT: 0px; POSITION: absolute; TOP: 0px; height:99px; width:1280px; background-image:url(http://www.hendersoncountync.org/Assets/topbanner6.jpg); z-index:1;"></div> ');

// TOP NAVIGATION - these links should be on EVERY page, regardless of department.
document.writeln(' <div id=topnav class="noprint" style="LEFT: 10px; POSITION: absolute; TOP: 5px; z-index:2;"> ');
document.writeln(' <p><a href="http://www.hendersoncountync.org"> Henderson County Home</a> | ');
document.writeln(' <a href="http://www.hendersoncountync.org/depts/gov-body.html">Board of Commissioners</a> | ');
document.writeln(' <a href="http://www.hendersoncountync.org/depts/">Departments</a> | ');
document.writeln('	<a href="http://www.hendersoncountync.org/services.html">Online Services</a> |  ');
document.writeln('  <a href="http://www.hendersoncountync.org/links/interest.html">Links</a> </p></div>');
//SIDE MENUS.
 document.writeln(' <DIV id=sidebar class="noprint" style="HEIGHT: 500px; LEFT: 0px; POSITION: absolute; TOP: 100px; WIDTH: 175px; Z-INDEX: 2;">');
 document.writeln(' <TABLE>');
 document.writeln(' <TR><TD height=150 valign=top width=175> </TD></TR></table></div>');
 /*
 document.writeln(' <TR><TD valign=top width=175><div align="left"><p class="clickabove"> ');
 document.writeln(' Click on the menus above for links to <a href="http://www.hendersoncountync.org/">Henderson County</a> government websites.</strong></p></div></TD></TR>');
*/
// CLICK ABOVE FOR LINKS 
 document.writeln(' <div id="gissidebar" class="noprint"><p class="clickabove"><br>Click on the menus above for links to   ');
 document.writeln(' Henderson County government websites.</p><br><br> ');
// THE HENDERSON COUNTY LOGO.
 document.writeln(' <a href="http://www.hendersoncountync.org/"><img src="http://www.hendersoncountync.org/Assets/county_logo_small.jpg" alt="Henderson County Homepage"></a> ');  
 document.writeln(' </div> ');


 //This section sets up the "triggers" that trigger the pop-up menus.
 
 //GIS Dept. Main Page link.
 document.writeln(' <DIV id=menTrig1 class="noprint"  ');
 document.writeln(' style="LEFT: 0px; POSITION: absolute; TOP: 100px; Z-INDEX: 5"><A  ');
// document.writeln(' href="javascript:;" onClick="P7_autoLayers(0,' + "'flym1'" + ')"  ');
 document.writeln(' onMouseover="document.commissioner.src=' + "'http://www.hendersoncountync.org/Assets/gismenu1r.gif'" + '" ');
 document.writeln(' onMouseout="document.commissioner.src=' + "'http://www.hendersoncountync.org/Assets/gismenu1.gif'" + '" ');
 document.writeln(' href="http://www.hendersoncountync.org/gis/main.html"><IMG alt="Click here for menu."  ');
 document.writeln(' border=0 height=28 src="http://www.hendersoncountync.org/Assets/gismenu1.gif" width=175 name="commissioner"></A></DIV> ');
 
// GIS Services menu.
 document.writeln(' <DIV id=menTrig4 class="noprint"  ');
 document.writeln(' style="LEFT: 0px; POSITION: absolute; TOP: 128px; WIDTH: 175px; Z-INDEX: 6"><A  ');
 document.writeln(' href="javascript:;" onClick="P7_autoLayers(0,' + "'flym1'" + ')" ');
 document.writeln(' onMouseover="document.departments.src=' + "'http://www.hendersoncountync.org/Assets/gismenu2r.gif'" + '" ');
 document.writeln(' onMouseout="document.departments.src=' + "'http://www.hendersoncountync.org/Assets/gismenu2.gif'" + '"><IMG alt="Click here for menu."  ');
 document.writeln(' border=0 height=28 src="http://www.hendersoncountync.org/Assets/gismenu2.gif" width=175 name="departments"></A></DIV> ');
 
 //Troubleshooting menu.
 document.writeln(' <DIV id=menTrig2 class="noprint"  ');
 document.writeln(' style="LEFT: 0px; POSITION: absolute; TOP: 156px; WIDTH: 175px; Z-INDEX: 7"><a  ');
 document.writeln(' href="javascript:;" onClick="P7_autoLayers(0,' + "'flym4'" + ')" ');
 document.writeln(' onMouseover="document.onlineservices.src=' + "'http://www.hendersoncountync.org/Assets/gismenu3r.gif'" + '" ');
 document.writeln(' onMouseout="document.onlineservices.src=' + "'http://www.hendersoncountync.org/Assets/gismenu3.gif'" + '"><img alt="Click here for menu."  ');
 document.writeln(' border=0 height=28 src="http://www.hendersoncountync.org/Assets/gismenu3.gif" width=175 name="onlineservices"></a></DIV> ');
 
 //Codes and abbreviations menu.
 /*
 document.writeln(' <DIV id=menTrig3 class="noprint"  ');
 document.writeln(' style="LEFT: 0px; POSITION: absolute; TOP: 184px; WIDTH: 175px; Z-INDEX: 8"><A  ');
 document.writeln(' href="javascript:;" onClick="P7_autoLayers(0,' + "'flym2'" + ')" ');
 document.writeln(' onMouseover="document.links.src=' + "'http://www.hendersoncountync.org/Assets/gismenu4r.gif'" + '"');
 document.writeln(' onMouseout="document.links.src=' + "'http://www.hendersoncountync.org/Assets/gismenu4.gif'" + '" ');
 document.writeln(' ><IMG alt="Click here for menu."  ');
 document.writeln(' border=0 height=28 src="http://www.hendersoncountync.org/Assets/gismenu4.gif" width=175 name="links"></A></DIV> ');
*/
// link to the MAIN Henderson County home page (not a drop-down menu.
 document.writeln(' <DIV id=newsletmenu class="noprint"  ');
 document.writeln(' style="LEFT: 0px; POSITION: absolute; TOP: 184px; WIDTH: 175px; Z-INDEX: 9">  ');
 document.writeln(' <A href="http://www.hendersoncountync.org/" ');
 document.writeln(' onMouseover="document.newsletter.src=' + "'http://www.hendersoncountync.org/Assets/gismenu5r.gif'" + '"');
 document.writeln(' onMouseout="document.newsletter.src=' + "'http://www.hendersoncountync.org/Assets/gismenu5.gif'" + '" ');
 document.writeln(' ><IMG alt="Click here for menu."  ');
 document.writeln(' border=0 height=28 src="http://www.hendersoncountync.org/Assets/gismenu5.gif" width=175 name="newsletter"></A></DIV> ');
 document.writeln(' <BR> ');
 
 
 
// GIS Services Menu.
document.writeln('<DIV id=flym1 class="hMenu" style="LEFT: 0px; POSITION: absolute; TOP: 212px; WIDTH: 175px; Z-INDEX: 13; visibility: hidden">  ');
document.writeln('  <TABLE class="hMenu" border=0 cellpadding=3 cellspacing=1 width=175>');
document.writeln('  <tr> ');
document.writeln('    <td><font color="#FFCC33">GIS Services</font></td></tr> ');
document.writeln('	</table> ');
document.writeln('      <table class="hMenu" width="175" cellpadding="3" cellspacing="3"> ');
document.writeln('        <tr> ');
document.writeln('          <td valign="baseline"><img src="http://www.hendersoncountync.org/Assets/whitesquare.gif"></td> ');
document.writeln('          <td valign="baseline"><A class="first" href="http://www.hendersoncountync.org/gis/">GoMaps</A></td> ');
document.writeln('        </tr> ');

// Below, the Property Record Card link changes to "Real Property Data" on 3-15-07.
document.writeln('		 <tr> ');
document.writeln('          <td valign="baseline"><img src="http://www.hendersoncountync.org/Assets/whitesquare.gif"></td> ');
document.writeln('          <td valign="baseline"><A class="first" href="http://www.hendersoncountync.org/ca/realpropertydata.html">Real Property Data Search</A></td> ');
document.writeln('        </tr> ');

// Added "Tax Bill Lookup" 3-21-07. I think this should probably be there.
document.writeln('		 <tr> ');
document.writeln('          <td valign="baseline"><img src="http://www.hendersoncountync.org/Assets/whitesquare.gif"></td> ');
document.writeln('          <td valign="baseline"><A class="first" href="http://www.hendersoncountync.org/ca/redirect.html">Tax Bill Lookup</A></td> ');
document.writeln('        </tr> ');

document.writeln('        <tr> ');
document.writeln('          <td valign="baseline"><img src="http://www.hendersoncountync.org/Assets/whitesquare.gif"></td> ');
document.writeln('          <td valign="baseline"><A class="first" href="http://www.hendersoncountync.org/gis/GISdownload.htm" >Download GIS Data - Shapefiles / CAD</A></td> ');
document.writeln('        </tr> ');
document.writeln('        <tr> ');
document.writeln('          <td valign="baseline"><img src="http://www.hendersoncountync.org/Assets/whitesquare.gif"></td> ');
document.writeln('          <td valign="baseline"><A class="first" href="http://www.hendersoncountync.org/gis/taxdownload.html" >Download Tax Data - Excel/Access/Text Files</A></td> ');
document.writeln('        </tr> ');
document.writeln('        <tr> ');
document.writeln('          <td valign="baseline"><img src="http://www.hendersoncountync.org/Assets/whitesquare.gif"></td> ');
document.writeln('          <td valign="baseline"><A class="first" href="http://www.hendersoncountync.org/gis/metadata.html" >GIS Metadata</A></td> ');
document.writeln('        </tr> ');
document.writeln('      </table>');
document.writeln('</DIV> ');

//Troubleshooting / Help menu.
document.writeln('  <DIV class="hMenu" id=flym4 style="LEFT: 0px; POSITION: absolute; TOP: 212px; WIDTH: 175px; Z-INDEX: 11; visibility: hidden">');
document.writeln('  <TABLE class="hMenu" border=0 cellpadding=3 cellspacing=3 width=175>');
document.writeln('  <tr>');
document.writeln('    <td><font color="#FFCC33">Troubleshooting / Help</font></td>');
document.writeln('	</table>');
document.writeln('      <table class="hMenu" width="175" cellpadding="3" cellspacing="3">');
document.writeln('        <tr>');
document.writeln('          <td valign="baseline"><img src="http://www.hendersoncountync.org/Assets/whitesquare.gif"></td>');
document.writeln('          <td valign="baseline"><a class="first" href="http://www.hendersoncountync.org/gis/ie7_trusted_site_instructions.html" >Troubleshoot GoMaps</a></td>');
document.writeln('        </tr>');

document.writeln('        <tr>');
document.writeln('          <td valign="baseline"><img src="http://www.hendersoncountync.org/Assets/whitesquare.gif"></td>');
document.writeln('          <td valign="baseline"><a class="first" href="http://207.4.201.200/GoMaps/Help/Henderson_GoMaps_Help.htm?" >Help with GoMaps (General Public)</a></td>');
document.writeln('        </tr>');
document.writeln('        <tr>');
document.writeln('          <td valign="baseline"><img src="http://www.hendersoncountync.org/Assets/whitesquare.gif"></td>');
document.writeln('          <td valign="baseline"><a class="first" href="http://gisweb/GoMaps/Help/Henderson_GoMaps_Help.htm?" >Help with GoMaps (County Employees)</a></td>');
document.writeln('        </tr>');
document.writeln('        <tr>');
document.writeln('          <td valign="baseline"><img src="http://www.hendersoncountync.org/Assets/whitesquare.gif"></td>');
document.writeln('          <td valign="baseline"><a class="first" href="http://www.hendersoncountync.org/gis/site_map.html" >Index of GIS websites</a></td>');
document.writeln('        </tr>');

document.writeln('      </table>');
document.writeln(' </DIV> ');
 
//Codes and Abbreviations menu.
document.writeln('  <DIV id=flym2 class="hMenu" ');
document.writeln(' style="LEFT: 0px; POSITION: absolute; TOP: 240px; WIDTH: 175px; Z-INDEX: 12; visibility: hidden">');
document.writeln('  <TABLE class="hMenu" border=0 cellpadding=3 cellspacing=1 width=175>');
document.writeln('  <tr>');
document.writeln('    <td><font color="#FFCC33">Codes and Abbreviations</font>');
document.writeln('	</table>');
document.writeln('      <table class="hMenu" width="175" cellpadding="3" cellspacing="3">');
/*
document.writeln('		        <tr>');
document.writeln('        <td valign="baseline"><img src="http://www.hendersoncountync.org/Assets/whitesquare.gif"></td>');
document.writeln('          <td valign="baseline"><A class="first" href="http://www.hendersoncountync.org/gis/propertyappraisalcodes.html" >Property Appraisal Codes</A></td>');
document.writeln('        </tr>');
*/
document.writeln('		        <tr>');
document.writeln('          <td valign="baseline"><img src="http://www.hendersoncountync.org/Assets/whitesquare.gif"></td>');
document.writeln('          <td valign="baseline"><A class="first" href="http://www.hendersoncountync.org/gis/Abbreviations.html" >Other Codes and Abbreviations</A></td>');
document.writeln('        </tr>');
document.writeln('	</table>');
document.writeln('</DIV> ');

