function nav(u) { document.location.href = u; }
function hideLayer(whichLayer)
{
  whichLayer.display = 'none';
}
function showLayer(whichLayer)
{
  whichLayer.display = '';
}
function getLayer(whichLayer)
{
  var elem;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( whichLayer );
  else if( document.all ) // this is the way old msie versions work
    elem = document.all[whichLayer];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[whichLayer];
  return elem.style;
}

var rotatorCounter = 0;
var seconds = 7;

//DROP DOWN MENUS

function rollOver(theImage,rollOverImg){
	if(currentImage!=null)
	  rollOutCurrentImage();
	currentImage = theImage;
	if (!theImage.originalSrc){
		theImage.originalSrc = theImage.src;}
	theImage.src=rollOverImg;
}

var currentImage = null;

function rollOut(theImage){
return;
	theImage.src=theImage.originalSrc;
}
function rollOutCurrentImage(){
  if(currentImage!=null)
    currentImage.src=currentImage.originalSrc;
}

function showMenu(menuID){
        if(currentMenuID != null)   
          hideCurrentMenu();
        currentMenuID = menuID;
	var subMenu, subMenuContainer;
	subMenuContainer = document.getElementById("menuSub");
	subMenu = document.getElementById(menuID);
	subMenuContainer.style.visibility = "visible";
	subMenu.style.visibility = "visible";
}

var currentMenuID = null;

function hideMenu(menuID){
        return;
	var subMenu, subMenuContainer;
	subMenuContainer = document.getElementById("menuSub");
	subMenu = document.getElementById(menuID);
	subMenuContainer.style.visibility = "hidden";
	subMenu.style.visibility = "hidden";
}
function hideCurrentMenu(){
  if(currentMenuID==null) return;
       	var subMenu, subMenuContainer;
	subMenuContainer = document.getElementById("menuSub");
	subMenu = document.getElementById(currentMenuID);
	subMenuContainer.style.visibility = "hidden";
	subMenu.style.visibility = "hidden";
}

function highlightCell(theCell){
	theCell.style.backgroundColor='#FCFC9A';
}

function restoreCell(theCell){
	theCell.style.backgroundColor='#F7F710';
}

//IMAGE ROTATION

function rotateImage(){
	
	document["headerPhoto"].src = photos[rotatorCounter];
	document["headerTagline"].src = taglines[rotatorCounter];
	
	rotatorCounter++;
	
	if (rotatorCounter == photos.length) {
		rotatorCounter = 0;
	}
	
	var rotator=setTimeout("rotateImage()",(seconds * 1000));
	
}

function popWindow(winlink, width, height){
	portWindow = window.open(winlink, "popWin", "scrollbars=yes width=" + width + ",height=" + height)
	portWindow.focus()
}

function closeWindow(){
self.close()
}

  function calcStudents()
  {
    var f = document.f;
    f.numtotal.value = parseInt(f.numfull.value) + parseInt(f.numreduced.value) + parseInt(f.numfree.value);
  }

// Script ends

