// JavaScript Document



if (document.images) {
home_on = new Image(); // Active images
home_on.src = "/images/home_on.gif";

home_off = new Image(); // Inactive images
home_off.src = "/images/home_off.gif";

	
land_planning_on = new Image(); // Active images
land_planning_on.src = "/images/land_planning_on.gif";

land_planning_off = new Image(); // Inactive images
land_planning_off.src = "/images/land_planning_off.gif";

municipal_on = new Image(); // Active images
municipal_on.src = "/images/newNav/municipal_on.gif";

municipal_off = new Image(); // Inactive images
municipal_off.src = "/images/newNav/municipal_off.gif";

environmental_on = new Image(); // Active images
environmental_on.src = "/images/newNav/environmental_on.gif";

environmental_off = new Image(); // Inactive images
environmental_off.src = "/images/newNav/environmental_off.gif";

transportation_on = new Image(); // Active images
transportation_on.src = "/images/newNav/transportation_on.gif";

transportation_off = new Image(); // Inactive images
transportation_off.src = "/images/newNav/transportation_off.gif";

civil_on = new Image(); // Active images
civil_on.src = "/images/newNav/civil_on.gif";

civil_off = new Image(); // Inactive images
civil_off.src = "/images/newNav/civil_off.gif";

gis_on = new Image(); // Active images
gis_on.src = "/images/newNav/gis_on.gif";

gis_off = new Image(); // Inactive images
gis_off.src = "/images/newNav/gis_off.gif";

surveying_on = new Image(); // Active images
surveying_on.src = "/images/newNav/surveying_on.gif";

surveying_off = new Image(); // Inactive images
surveying_off.src = "/images/newNav/surveying_off.gif";

athletics_on = new Image(); // Active images
athletics_on.src = "/images/athletics_on.gif";

athletics_off = new Image(); // Inactive images
athletics_off.src = "/images/athletics_off.gif";

commercial_on = new Image(); // Active images
commercial_on.src = "/images/commercial_on.gif";

commercial_off = new Image(); // Inactive images
commercial_off.src = "/images/commercial_off.gif";

community_on = new Image(); // Active images
community_on.src = "/images/community_on.gif";

community_off = new Image(); // Inactive images
community_off.src = "/images/community_off.gif";

engineering_on = new Image(); // Active images
engineering_on.src = "/images/engineering_on.gif";

engineering_off = new Image(); // Inactive images
engineering_off.src = "/images/engineering_off.gif";

parks_on = new Image(); // Active images
parks_on.src = "/images/parks_on.gif";

parks_off = new Image(); // Inactive images
parks_off.src = "/images/parks_off.gif";

religious_on = new Image(); // Active images
religious_on.src = "/images/religious_on.gif";

religious_off = new Image(); // Inactive images
religious_off.src = "/images/religious_off.gif";

residential_on = new Image(); // Active images
residential_on.src = "/images/residential_on.gif";

residential_off = new Image(); // Inactive images
residential_off.src = "/images/residential_off.gif";

retirement_on = new Image(); // Active images
retirement_on.src = "/images/retirement_on2.gif";

retirement_off = new Image(); // Inactive images
retirement_off.src = "/images/retirement_off2.gif";

schools_on = new Image(); // Active images
schools_on.src = "/images/schools_on.gif";

schools_off = new Image(); // Inactive images
schools_off.src = "/images/schools_off.gif";


traffic_on = new Image(); // Active images
traffic_on.src = "/images/traffic_on.gif";

traffic_off = new Image(); // Inactive images
traffic_off.src = "/images/traffic_off.gif";

}

function imgOn(imgName) {

if (document.images) {
document[imgName].src = eval(imgName + "_on.src");
}
}

function imgOff(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "_off.src");
}
}
// Copyright (C) 2005 Ilya S. Lyubinskiy. All rights reserved.
// Technical support: http://www.php-development.ru/
//
// YOU MAY NOT
// (1) Remove or modify this copyright notice.
// (2) Distribute this code, any part or any modified version of it.
//     Instead, you can link to the homepage of this code:
//     http://www.php-development.ru/javascripts/smart-forms.php.
//
// YOU MAY
// (1) Use this code on your website.
// (2) Use this code as a part of another product provided that
//     its main use is not creating javascript menus.
//
// NO WARRANTY
// This code is provided "as is" without warranty of any kind, either
// expressed or implied, including, but not limited to, the implied warranties
// of merchantability and fitness for a particular purpose. You expressly
// acknowledge and agree that use of this code is at your own risk.

// If you find my script useful, you can support my site in the following ways:
// 1. Vote for the script at HotScripts.com (you can do it on my site)
// 2. Link to the homepage of this script or to the homepage of my site:
//    http://www.php-development.ru/javascripts/smart-forms.php
//    http://www.php-development.ru/
//    You will get 50% commission on all orders made by your referrals.
//    More information can be found here:
//    http://www.php-development.ru/affiliates.php


// ----- Popup Control ---------------------------------------------------------

function at_display(x)
{
  win = window.open();
  for (var i in x) win.document.write(i+' = '+x[i]+'<br>');
}

// ----- Show Aux -----

function at_show_aux(parent, child)
{
  var p = document.getElementById(parent);
  var c = document.getElementById(child);

  var top  = (c["at_position"] == "y") ? p.offsetHeight+2 : 0;
  var left = (c["at_position"] == "x") ? p.offsetWidth +2 : 0;

  for (; p; p = p.offsetParent)
  {
    top  += p.offsetTop;
    left += p.offsetLeft;
  }

  c.style.position   = "absolute";
  c.style.top        = top +'px';
  c.style.left       = left+'px';
  c.style.visibility = "visible";
}

// ----- Show -----

function at_show()
{
  p = document.getElementById(this["at_parent"]);
  c = document.getElementById(this["at_child" ]);

  at_show_aux(p.id, c.id);

  clearTimeout(c["at_timeout"]);
}

// ----- Hide -----

function at_hide()
{
  c = document.getElementById(this["at_child"]);

  c["at_timeout"] = setTimeout("document.getElementById('"+c.id+"').style.visibility = 'hidden'", 50);
}

// ----- Click -----

function at_click()
{
  p = document.getElementById(this["at_parent"]);
  c = document.getElementById(this["at_child" ]);

  if (c.style.visibility != "visible") at_show_aux(p.id, c.id);
  else c.style.visibility = "hidden";

  return false;
}

// ----- Attach -----

// PARAMETERS:
// parent   - id of visible html element
// child    - id of invisible html element that will be dropdowned
// showtype - "click" = you should click the parent to show/hide the child
//            "hover" = you should place the mouse over the parent to show
//                      the child
// position - "x" = the child is displayed to the right of the parent
//            "y" = the child is displayed below the parent
// cursor   - Omit to use default cursor or check any CSS manual for possible
//            values of this field

function at_attach(parent, child, showtype, position, cursor)
{
  p = document.getElementById(parent);
  c = document.getElementById(child);

  p["at_parent"]     = p.id;
  c["at_parent"]     = p.id;
  p["at_child"]      = c.id;
  c["at_child"]      = c.id;
  p["at_position"]   = position;
  c["at_position"]   = position;

  c.style.position   = "absolute";
  c.style.visibility = "hidden";

  if (cursor != undefined) p.style.cursor = cursor;

  switch (showtype)
  {
    case "click":
      p.onclick     = at_click;
      p.onmouseout  = at_hide;
      c.onmouseover = at_show;
      c.onmouseout  = at_hide;
      break;
    case "hover":
      p.onmouseover = at_show;
      p.onmouseout  = at_hide;
      c.onmouseover = at_show;
      c.onmouseout  = at_hide;
      break;
  }
}


function showText (param) {
 if (document.getElementById) {
  whichtext = document.getElementById(param)
  if (whichtext.title) {
   document.getElementById('desc').childNodes[0].nodeValue = whichtext.title;
  } else {
   document.getElementById('desc').childNodes[0].nodeValue = whichtext.childNodes[0].nodeValue;
  }
  return false;
 } else {
  return true;
 }
}


function highlightCurrentMenuItem(param) {
	
	var tablefields = document.getElementById("LinkTable");
	 myTD = tablefields.getElementsByTagName("td");
	 for (i=0; i<myTD.length; i++) {
		if (myTD[i].id != "head") {
		myTD[i].setAttribute("class", "serv"); 
		myTD[i].setAttribute("className", "serv"); 
		}
	 }
	
	 whichmenu = document.getElementById(param)
	 whichmenu.setAttribute("class", "highlighted"); 
	 whichmenu.setAttribute("className", "highlighted");

}


PositionX = 100;
PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 500;
defaultHeight = 500;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = true;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
writeln('window.innerWidth=document.images["Image"].width;');writeln('window.innerHeight=document.images["Image"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=FFFFFF scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=FFFFFF scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="Image" src='+imageURL+' style="display:block"></body></html>');
close();		
}}


