Help with javascript-key codes

im learning javascript after knowing actionscript, and im trying to make a little thing where a guy moves around when you use w,a,s,d. the keys are registering but for some reason the guy refuses to move. heres the code, can you tell me whats wrong with it? btw to view the whole thing ull need an image man-up.jpg.

 
<html>
<head>
<title>Walking Around in Javascript</title>
<script type="text/javascript">
var manX=200;
var manY=150;
var walkSpeed=10;
function updatePosition() {
 document.getElementById('man').style.left=manX+'px'
 document.getElementById('man').style.top=manY+'px'
}
</script>
</head>
<body onkeyup="if(event.keyCode=='W'.charCodeAt(0)) {
 manY-=walkSpeed
 updatePosition()
}
if(event.keyCode=='D'.charCodeAt(0)) {
 manX+=walkSpeed
 updatePosition()
}
if(event.keyCode=='S'.charCodeAt(0)) {
 manY+=walkSpeed
 updatePosition()
}
if(event.keyCode=='A'.charCodeAt(0)) {
 manX-=walkSpeed
 updatePosition()
}">
<input type="button" id="man" style="left:150px; top:200px" value="test">
</body>
</html>