function hideall(){
  for (count=1; count<6; count+=1) // set "count" to one more than the total images/links
  document.getElementById('box'+count).style.display='none';
}

function showbox(box){
  document.getElementById(box).style.display='block';
}

var lastID = 0;
function SelectTab(id,tabs) {
  if (lastID > 0) {
    document.getElementById(lastID).className = "tabNormal";
  }
  document.getElementById(id).className = tabs;
  lastID = id;
}

function LoadTrigger() {
	hideall(); // initilize, hide all tabs
	showbox('box1'); // show first tab contents
	SelectTab('1'); // select first tab as active tab upon load
}

// Multiple onload function created by: Simon Willison
// http://simonwillison.net/2004/May/26/addLoadEvent/
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent(function() {
  LoadTrigger(); // activate tabs
});


