//Main Nav

function Browser() {

  var ua, s, i;

  this.isIE    = false;  // Internet Explorer
  this.isNS    = false;  // Netscape
  this.version = null;

  ua = navigator.userAgent;

  s = "MSIE";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isIE = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  s = "Netscape6/";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  // Treat any other "Gecko" browser as NS 6.1.

  s = "Gecko";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = 6.1;
    return;
  }
}

var browser = new Browser();

function removeClassName(el, name) {

  var i, curList, newList;

  if (el.className == null)
    return;

  // Remove the given class name from the element's className property.

  newList = new Array();
  curList = el.className.split(" ");
  for (i = 0; i < curList.length; i++)
    if (curList[i] != name)
      newList.push(curList[i]);
  el.className = newList.join(" ");
}

// Submenu links

var submenu=new Array()

submenu[0]='<p><u>Rope Rider Golf Course</u> mass excavation of over 400,000 Cubic yards of material for Suncadia in Cle Elum Washington. NCC was a subcontractor to Sajasa Construction Inc. on the construction of Suncadias third golf course "Rope Rider". This course was designed by Jocobsen Hardy Golf Designs and is over 7,300 yards long, Weitz Golf performed the final grading and shaping after the mass excavation was completed by NCC.</p>'

submenu[1]='<p><u>Walla Walla State Penitentiary</u> mass excavation of 200,000 CY, footing excavation of of 35,000 CY, placement of over 150,000 tons of aggregate material and 8,000 Cy of ready-mix concrete, and grading over 100 acres for Tuner Construction Seattle Division. NCC performed all site work including underground utilities through asphalt and concrete pavement. The project began in June of 2005 and was completed in October of 2007.</p>'

submenu[2]='<p><u>Simplot Moses Lake Washington Digester Pond</u> Mass excavation of 45,000 Cy, and placement of over 2,000 cy of ready-mix concrete. NCC was the prime contractor on this project which entailed building a 25,000,000 gallon anaerobic digester pond. NCC performed all excavation, grading, site utilities, structural concrete, and the erection of the support buildings. This project was started in the spring of 2006 and completed in the fall of 2006</p>'

submenu[3]='<p><u>Pullman to Idaho State Line</u> mass excavation 600,000 Cy, asphalt concrete pavement 135,000 Tons, for the Washington State Department Of Transportation. NCC was  the prime contractor on this project which was the expansion of the the existing two lane highway to a four lane highway with a turn lane from Pullman Washington to Moscow Idaho. The the project was started in June of 2006 and completed in November 2007.</p>'

submenu[4]='<p><u>Eldorado Stone Royal City Washington</u> mass excavation of over 80,000 Cy, placement of 10,000 ton of crushed aggregate, over 180,000 SF of concrete pavement, erection of a 30,000 SF metal building, as well as all underground work including storm water, and water distribution system. NCC was the prime contractor on this project. The project was started in December of 2006 and completed in August of 2007.'


var menuobj=document.getElementById? document.getElementById("subs") : document.all


var activeButton = null;

function buttonClick(event, which) {

  var button;

  // Get the target button element.

  if (browser.isIE)
    button = window.event.srcElement;
  else
    button = event.currentTarget;
	
  // Blur focus from the link to remove that annoying outline.

  button.blur();

  // Reset the currently active button, if any.

  if (activeButton != null)
    resetButton(activeButton);

  // Activate this button, unless it was the currently active one

  if (button != activeButton) {
    depressButton(button);
    activeButton = button;
	thecontent=(which==-1)? "" : submenu[which]
  }
  
  else {
    activeButton = null;
	thecontent = ""
  }
	
  menuobj.innerHTML=thecontent

  return false;
}

function depressButton(button) {
button.className += "active";
}

function resetButton(button) {
  removeClassName(button, "active");
}

function resetSub(button) {
  menuobj.innerHTML=""
}




