
function at_display(x)
{
  var win = window.open();
  for (var i in x) win.document.write(i+' = '+x[i]+'<br>');
}
// ----- DropDown Control ------------------------------------------------------
var at_timeout = 225;
// ----- Show Aux -----
function at_show_aux(parent, child)
{
  var p = document.getElementById(parent);
  var c = document.getElementById(child);
  p.className        = "active";
  if (c.offsetWidth <= 0)
  {
    c.style.position   = "absolute";
    c.style.visibility = "visible";
    c.style.display    = "block";
  }
  var direction = undefined;
  if (p.parentNode && p.parentNode["at_position"] == "x")
    direction = p.parentNode["at_direction"];
  var top   = (c["at_position"] == "y") ?  p.offsetHeight+2 : 0;
  var left1 = (c["at_position"] == "x") ?  p.offsetWidth +2 : 0;
  var left2 = (c["at_position"] == "x") ? -c.offsetWidth -2 : 0;
  var left3 = (c["at_position"] == "x") ?  p.offsetWidth +2 : 0;
  for (; p; p = p.offsetParent)
  {
    if (p.style.position != 'absolute')
    {
      left1 += p.offsetLeft;
      left2 += p.offsetLeft;
      top   += p.offsetTop;
    }
    left3 += p.offsetLeft;
  }
  if (direction)
  {
    left = (direction == 'right') ? left1 : left2;
    c['at_direction'] = direction;
  }
  else
  {
    left = (left3+c.offsetWidth < document.body.offsetWidth) ? left1 : left2;
    c['at_direction'] = (left3+c.offsetWidth < document.body.offsetWidth) ? 'right' : 'left';
  }
  c.style.position   = "absolute";
  c.style.visibility = "visible";
  c.style.display    = "block";
  c.style.top        = top +'px';
  c.style.left       = left+'px';
}
// ----- Hide Aux -----
function at_hide_aux(parent, child)
{
  document.getElementById(parent).className        = "parent";
  document.getElementById(child ).style.visibility = "hidden";
  document.getElementById(child ).style.display    = "block";
}
// ----- Show -----
function at_show(e)
{
  var p = document.getElementById(this["at_parent"]);
  var c = document.getElementById(this["at_child" ]);
  at_show_aux(p.id, c.id);
  clearTimeout(c["at_timeout"]);
}
// ----- Hide -----
function at_hide()
{
  var c = document.getElementById(this["at_child"]);
  c["at_timeout"] = setTimeout("at_hide_aux('"+this["at_parent"]+"', '"+this["at_child" ]+"')", at_timeout);
}
// ----- Attach -----
function at_attach(parent, child, position)
{
  p = document.getElementById(parent);
  c = document.getElementById(child );
  p["at_child"]    = c.id;
  c["at_child"]    = c.id;
  p["at_parent"]   = p.id;
  c["at_parent"]   = p.id;
  c["at_position"] = position;
  p.onmouseover = at_show;
  p.onmouseout  = at_hide;
  c.onmouseover = at_show;
  c.onmouseout  = at_hide;
}
// ----- DropDown Menu ---------------------------------------------------------
// ----- Build Aux -----
function dhtmlmenu_build_aux(parent, child, position)
{
  document.getElementById(parent).className = "parent";
  document.write('<div class="vert_menu" id="'+parent+'_child">');
  var n = 0;
  for (var i in child)
  {
    if (i == '-')
    {
      document.getElementById(parent).href = child[i];
      continue;
    }
    if (typeof child[i] == "object")
    {
      document.write('<a class="parent" id="'+parent+'_'+n+'">'+i+'</a>');
      dhtmlmenu_build_aux(parent+'_'+n, child[i], "x");
    }
    else document.write('<a id="'+parent+'_'+n+'" href="'+child[i]+'">'+i+'</a>');
    n++;
  }
  document.write('</div>');
  at_attach(parent, parent+"_child", position);
}
// ----- Build -----
function dhtmlmenu_build(menu)
{
  for (var i in menu) dhtmlmenu_build_aux(i, menu[i], "y");
}
// ----- Building -----

var submenu_ss = { 
    "Consumer Products&nbsp;&nbsp;" : submenu_ss2a,
    "Newsletters&nbsp;&nbsp;" : submenu_ss2b
       };
       
var submenu_ce = { 
    "Sequence of Key Events&nbsp;&nbsp;"    : "schedule.html",
    "Monthly Calendar&nbsp;&nbsp;"    : "calendar_jan.html"
     };
	 

var submenu_bcs = { 
    "The PM&nbsp;&nbsp;": "pm.html",
    "The Construction Manager&nbsp;&nbsp;": "cm.html",
    "The Technical Team&nbsp;&nbsp;": "techteam.html",
    "Team Partners&nbsp;&nbsp;" : "teampartner.html"
     };
	 






var submenu_mr = { 
    "Stormwater" : "#",
    "Offsite Air" : "#",
    "Onsite Groundwater&nbsp;&nbsp;" : "#"
    };		   
		

var submenu_wb = { 
    "Management Plan&nbsp;&nbsp;" : "pp_mgtplan.html", 
    "Work Plan" : "pp_workplan.html",
    "Transportation Management Plan" : "pp_tranmp.html",
    "Spill Response Plan" : "pp_srp.html",
    "Sampling and Analysis Plan" : "pp_saa.html",
    "Comprehensive On-Site Dust Control and Dust Suppression Plan&nbsp;&nbsp;" : "pp_dustcp.html", 
    "Off-Site Air Monitoring Plan" : "pp_oamp.html",
    "On-Site Groundwater Monitoring Plan" : "pp_ogmpp.html", 
    "Erosion Control and Stormwater Management and Monitoring Plan&nbsp;&nbsp;" : "pp_erosion.html",
    "Project Contingency Plan&nbsp;&nbsp;" : "pp_projcontp.html",
    "Community Engagement and Communication Plan&nbsp;&nbsp;" : "pp_cecp.html",
    "Monitoring Results&nbsp;&nbsp;" : "pp_monitor.html"
      };
	  
	  
var submenu_ss2a = { 
    "Quarterly&nbsp;Newsletter&nbsp;#1&nbsp;-&nbsp;April&nbsp;23,&nbsp;2009" : "news_q1.html", 
    "Quarterly Newsletter #2 - August 5, 2009" : "news_q2.html",
    "Quarterly Newsletter #3 - October 14, 2009" : "news_q3.html", 
    "Quarterly Newsletter #4 - November 25, 2009" : "news_q4.html",
    "Quarterly&nbsp;Newsletter&nbsp;#5&nbsp;-&nbsp;February&nbsp;17,&nbsp;2010" : "news_q1_2010.html"
    };		   
		 
var submenu_ss2b = {      
    "#1.&nbsp;February&nbsp;19,&nbsp;2009&nbsp;&nbsp;" : "pic1.html",
    //"#2.&nbsp;Coming&nbsp;Soon&nbsp;(April&nbsp;2009)&nbsp;&nbsp;" : "#",
    "#2.&nbsp;April&nbsp;23,&nbsp;2009&nbsp;&nbsp;": "pic2.html",
    "#3.&nbsp;August&nbsp;5,&nbsp;2009&nbsp;" : "pic3.html",    
    "#4.&nbsp;October&nbsp;14,&nbsp;2009&nbsp;" : "pic4.html",    
    "#5.&nbsp;November&nbsp;25,&nbsp;2009&nbsp;" : "pic5.html",  
    "#6.&nbsp;February&nbsp;17,&nbsp;2010&nbsp;": "pic6.html",  
    "#7.&nbsp;Coming&nbsp;Soon&nbsp;(June&nbsp;2010)&nbsp;&nbsp;" : "#"
            };	 

var submenu_photos = {      
    "August 2009&nbsp;&nbsp;" : "photograph_aug09.html",
    "July 2009&nbsp;&nbsp;" : "photograph_jul09.html",
    "June 2009&nbsp;&nbsp;" : "photograph_jun09.html",
    "May 2009&nbsp;&nbsp;" : "photograph_may09.html",
    "April 2009&nbsp;&nbsp;" : "photograph_apr09.html",
    "March 2009&nbsp;&nbsp;" : "photograph_mar09.html"
            };	 




var submenu_cc1 = {
     "For Immediate Release&nbsp;" : "immrelease.html",
     "Newsletters&nbsp;&nbsp; "  : submenu_ss2a,
     "Public Information Sessions&nbsp;&nbsp;" : submenu_ss2b
           };
		   
  
var submenu_co3 = {
    "August 2008&nbsp;&nbsp;" : "#",
    "September 2008&nbsp;&nbsp;" :  "#",
    "October 2008&nbsp;&nbsp;" :  "#"
       };

var submenu_cc = { 
       };


var submenu_co5 = {"-" : "#",
    "Overview&nbsp;&nbsp;" : "/view/Overview.htm",
    "History&nbsp;&nbsp;" : "/view/history.htm",
    "Milestones&nbsp;&nbsp;" : "/view/milestones.htm"
    };
var submenu_co = {"-" : "#",
	"Project Purpose&nbsp;&nbsp;" : "aboutproject.html",
    "Key Activities&nbsp;&nbsp;" : "keyactivities.html",
    "Note from the Project Manager&nbsp;&nbsp;" : "pmblog.html",
    "Photographs&nbsp;&nbsp;" : submenu_photos,
    "Commonly Asked Questions&nbsp;&nbsp;" :  "qa.html"
    };
