if ( window.addEventListener ) {
        var kkeys = [], konami = "38,38,40,40,37,39,37,39,66,65", cleric = "67,76,69,82,73,67,73,83,67,79,79,76", admin = "38,39,40,37,37", chat= "67,72,65,84", newpost = "38,38,38,40,40,40", hq = "72,81",staff="77,69,83,84,65,70,70";

        window.addEventListener("keydown", function(e){
                kkeys.push( e.keyCode );
                if ( kkeys.toString().indexOf( konami ) >= 0 ){
                 alert ("Battling is dumb! Crews are dumb! Glowsticking.com is awesome! PLUR");
				 kkeys = [];  }
		if ( kkeys.toString().indexOf( cleric) >= 0 ){
                 window.location="http://www.glowsticking.com/forums/Cleric-m6.html";
				 kkeys = [];  }
		if ( kkeys.toString().indexOf( admin) >= 0 ){
                 window.location="http://www.glowsticking.com/forums/admin/";
				 kkeys = [];  }
	
		if ( kkeys.toString().indexOf( chat) >= 0 ){
                window.open ('meeb.php','GSChat','width=700,height=600,location=0,menubar=0,scrollbars=0,status=0,toolbar=0,resizable=1');
				 kkeys = [];  }
		if ( kkeys.toString().indexOf( staff) >= 0 ){
                 window.location="http://www.glowsticking.com/forums/GSC-Staff-f61.html";
				 kkeys = [];  }

		if ( kkeys.toString().indexOf( hq) >= 0 ){
                 window.location="http://glowsticking.basecamphq.com/";
				 kkeys = [];  }


        }, true);
}

function toggleLayer( whichLayer )
{
  var elem, vis;
  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];
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
  vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}