// Konami Code - shows what's hidden after typing the "konami code"
// Code taken from http://jeffchannell.com/JavaScript/konami-code.html
// What is the famous Konami Code? Read here http://en.wikipedia.org/wiki/Konami_code

// The 13 is the key "enter"
// var kcode = [38,38,40,40,37,39,37,39,66,65,13];

var kcode = [38,38,40,40,37,39,37,39,66,65];
var kc_ptr = 0;

function konami( e ) {
  
  // make sure IE sees event
  e = e||window.event;
  
  // keyCode
  var kc = e.keyCode ? e.keyCode : e.which ? e.which : e.charCode;
  
  // reset pointer if keycode isn't the next in sequence
  if( kc != kcode[kc_ptr] ) {
    kc_ptr = 0;
    return;
  }
  
  // reset pointer & execute code
  if( ++kc_ptr == kcode.length ) {
    kc_ptr = 0;
    
    // code to execute
    // replace the next line with the action you want to take
    // console.log( 'konami' );
   
	var show_ypdmee = document.getElementById("ypdmee");
	show_ypdmee.style.display = 'block';
  }
}

window.addEvent( 'load', function( e ) {
    document.onkeydown = konami;
});
