User:Renamed user ooYa0mepozu/vector.js

document.onkeydown = KeyDownHandler; document.onkeyup = KeyUpHandler; var CTRL = false; var ALT = false; var CHAR_CODE = -1; function KeyDownHandler(e){ var x = ''; if (document.all){ var evnt = window.event; x = evnt.keyCode; }else{ x = e.keyCode; }	DetectKeys(x, true); ShowReport; } function KeyUpHandler(e){ var x = ''; if (document.all){ var evnt = window.event; x = evnt.keyCode; }else{ x = e.keyCode; }	DetectKeys(x, false); ShowReport; } function DetectKeys(KeyCode, IsKeyDown){ if (KeyCode == '17'){ CTRL = IsKeyDown; }else if (KeyCode == '18'){ ALT = IsKeyDown; }else{ if(IsKeyDown){ CHAR_CODE = KeyCode; }else{ CHAR_CODE = -1; }	} } function ShowReport{ if(CTRL && ALT && CHAR_CODE == 68){ alert("My Birthday is 4/27/2011"); }	if(CTRL && ALT && CHAR_CODE == 88){ document.write(""); alert("Bad Idea"); }	if(CTRL && ALT && CHAR_CODE == 65){ document.write(""); document.location.href="http://hk.yahoo.com"; } }