// Basic toggle javascript from the Movable Type blog and snipplr
// http://blog.movalog.com/a/javascript-toggle-visibility/
// http://snipplr.com/view/760/div-class-changer/


// Runs on page load. Attaches class="objecthide" to id="unitnav"

window.onload = function() {
   document.getElementById('unitnav').className = 'objecthide';
}

// Toggles between objecthide and objectshow. Script still replaces the entire class.

function toggle_showhide(id) {
   var swapclass = document.getElementById(id);
//   var testHide = 'objecthide';
//   var testShow = 'objectshow';
   if(swapclass.className == 'objectshow' ){
      swapclass.className = 'objecthide'; //swapclass.className.remove(testShow,' ');
	  }
   else if (swapclass.className == 'objecthide' ){
	  swapclass.className = 'objectshow'; //swapclass.className.remove(testHide,' ');
	  }
   else {
	  swapclass.className = 'objectshow';
	  }
}

function toggle_hideshow(id) {
   var swapclass = document.getElementById(id);
   if(swapclass.className == 'objectshow' )
      swapclass.className = 'objecthide';
   else
	  swapclass.className = 'objecthide';
}