
  var submenu = new Array();
  var delay_hide = 500;

  submenu[0] = '<img src="/pics/spacer.gif" height=18 width=1><br><table cellspacing=0 cellpadding=0 border=0><tr><td valign=middle><img src="/pics/spacer.gif" height=1 width=4></td><td valign=top><font class="menutext2"><a href="/aboutus/">Profile</a><br><a href="/aboutus/team.shtml">Our Team</a><br><a href="/aboutus/approach.shtml">Our Approach</a><!-- <br><a href="/aboutus/testimonials.shtml">Testimonials</a> --></font></td></tr></table>';

  submenu[1] = '<img src="/pics/spacer.gif" height=2 width=1><br><table cellspacing=0 cellpadding=0 border=0><tr><td valign=middle><img src="/pics/spacer.gif" height=1 width=80></td><td valign=top><font class="menutext2"><a href="/services/">Real Estate Advisory</a><br><a href="/services/economics.shtml">Economic Development &#38; Public Policy</a><br><a href="/services/transportation.shtml">Transportation &#38; Capital Programs</a><br><a href="/services/sustainability.shtml">Sustainability</a></font></td></tr></table>';

  submenu[2] = '<table cellspacing=0 cellpadding=0 border=0 align=right><tr><td valign=top nowrap><font class="menutext2"><a href="/projects/">Real Estate Advisory</a><br><a href="/projects/highline.shtml">Economic Development &#38; Public Policy</a> &nbsp; &nbsp;<br><a href="/projects/planyc.shtml">Transportation &#38; Capital Programs</a><br><a href="/projects/planyc2.shtml">Sustainability</a><br><a href="/projects/timessquare.shtml">Economic / Fiscal Impact</a></font></td><td valign=top nowrap><font class="menutext2"><a href="/projects/toronto.shtml">Waterfront Revitalization</a><br><a href="/projects/utica.shtml">Affordable Housing</a><br><a href="/projects/lakeontario.shtml">Parks &#38; Open Spaces</a><br><a href="/projects/griffiss.shtml">Military Base Planning</a><br><a href="/projects/edcarts.shtml">Arts &#38; Culture</a></font></td></tr></table>';

  submenu[3] = '<img src="/pics/spacer.gif" height=33 width=1><br><table cellspacing=0 cellpadding=0 border=0><tr><td valign=middle><img src="/pics/spacer.gif" height=1 width=242></td><td valign=top><font class="menutext2"><a href="/news/">Current</a><br><a href="/news/archive.shtml">Archive</a></font></td></tr></table>';

//  submenu[4] = '<img src="/pics/spacer.gif" height=33 width=1><br><table cellspacing=0 cellpadding=0 border=0><tr><td valign=middle><img src="/pics/spacer.gif" height=1 width=283></td><td valign=top><font class="menutext2"><a href="/resources/">Resources / FTP</a><br>Downloads</font></td></tr></table>';
  submenu[4] = '<img src="/pics/spacer.gif" height=22 width=1><br><table cellspacing=0 cellpadding=0 border=0><tr><td valign=middle><img src="/pics/spacer.gif" height=1 width=283></td><td valign=top><font class="menutext2"><a href="/resources/">Resources</a><br><a href="ftp://ftp.hraadvisors.com">FTP</a><br>Downloads</font></td></tr></table>';

  submenu[5] = '<img src="/pics/spacer.gif" height=22 width=1><br><table width=100% cellspacing=0 cellpadding=0 border=0><tr><td align=right valign=top><font class="menutext2"><a href="/contact/">Contact Info</a><br><a href="/contact/vcards.shtml">Vcard Downloads</a><br><a href="/contact/careers.shtml">Career Opportunities</a></font></td></tr></table>';


function showit(which) {
  clear_delayhide();
  thecontent = (which==-1)? "" : submenu[which];
  if (document.getElementById||document.all) { menuobj.innerHTML = thecontent; }
  else if (document.layers) {
	menuobj.document.write(thecontent);
	menuobj.document.close();
  }
}

function resetit(e) {
  if (document.all&&!menuobj.contains(e.toElement)) { delayhide = setTimeout("showit(-1)", delay_hide); }
  else if (document.getElementById&&e.currentTarget != e.relatedTarget && !contains_ns6(e.currentTarget, e.relatedTarget)) { delayhide = setTimeout("showit(-1)", delay_hide); }
}

function clear_delayhide() {
  if (window.delayhide) { clearTimeout(delayhide); }
}

function contains_ns6(a, b) {
  while (b.parentNode)
  if ((b = b.parentNode) == a) { return true; }
  return false;
}


function createWindow(target,width,height,scroll,resize) {
  targetName = target;
  targetName = target.substring(0, target.lastIndexOf('.'));
  if (target.indexOf('/') != -1) { targetName = targetName.substring(targetName.lastIndexOf('/')+1, length.targetName); }
  scrollbars = "no"; if (scroll == "scroll") { scrollbars = "yes"; }
  resizable = "yes"; if (resize == "noresize") { resizable = "no"; }
  if (targetName == "form1") { height -= 1; }
//  params = "toolbar=no,width=" + width + ",height=" + height + ",directories=no,location=no,status=no,scrollbars=" + scrollbars + ",resizable=" + resizable + ",menubar=no";
//  alert("x" + targetName + "x");

  window.open(target, targetName, "toolbar=no,width=" + width + ",height=" + height + ",directories=no,location=no,status=no,scrollbars=" + scrollbars + ",resizable=" + resizable + ",menubar=no");
//var popupWin = 
//  if (popupWin) { popupWin.focus(); }
}


function check_email() {
  var valid = 1;

  if (document.form1.email.value.indexOf("@") == -1) {
	valid = 0; mes = ' All e-mail addresses must contain a "@"!';
  }
  if (document.form1.email.value.indexOf(" ") != -1) {
	valid = 0; mes = " E-mail addresses cannot contain spaces!";
  }
  if (document.form1.email.value.length <= 6) {
	valid = 0; mes = " This is too short to be a valid e-mail address!";
  }
  if (document.form1.email.value.indexOf("@.") != -1 || document.form1.email.value.indexOf (".@") != -1) {
	valid = 0; mes = ' Dot punctuation cannot be adjacent to the "@"!';
  }

  if (valid == 0 && document.form1.email.value.length > 0) {
	alert('"'+ document.form1.email.value + '"' + " is not a valid e-mail address." + "\n" + mes + "\n" + " Please try again.");
	document.form1.email.value = "";
	document.form1.email.focus();
  }
}

function check_phone() {
  if (document.form1.Phone.value.length < 10 && document.form1.Phone.value.length > 0) {
	alert(" Please don't forget to enter your phone number area code.");
	newValue =  "(area code) " + document.form1.Phone.value;
	document.form1.Phone.value = newValue;
	document.form1.Phone.focus();
  }
}

function check_fax() {
  if (document.form1.Fax.value.length < 10 && document.form1.Fax.value.length > 0) {
	alert(" Please don't forget to enter your fax number area code.");
	newValue =  "(area code) " + document.form1.Fax.value;
	document.form1.Fax.value = newValue;
	document.form1.Fax.focus();
  }
}


function getCookie(cookieHeader) {
  var search = cookieHeader + "=", cookieString = "";
  if (document.cookie.length > 0) {
	findNameIndex = document.cookie.indexOf(search);
	if (findNameIndex != -1) {
		findNameIndex += search.length;
		endIndex = document.cookie.indexOf(";", findNameIndex);
		if (endIndex == -1) endIndex = document.cookie.length;
		cookieString = document.cookie.substring(findNameIndex, endIndex);
	}
  }
  return (cookieString);
}


function jumpLink() {
  thisOption = document.archive.articles.selectedIndex;
  if (thisOption > 0) {
	locName = document.archive.articles.options[thisOption].value;
	parent.location = locName;
  }
}


function message(txt) { window.status = txt; }
function remove_message() { window.status = ""; }
