You can simplify and improve your code. You can only leave this one function:
function move_right(obj, value) {
var x = document.getElementById('button_shadow' + obj.id);
x.style.left = x.offsetLeft + value + 'px';
}
and use it in HTML like this:
<a id="1" onmouseover="move_right(this, 5);" ...>O klubu</a>
Demo: http://jsfiddle.net/efu8n/
You mistakes: you should use id
property, not ElementId
. Also context inside your function if you invoke them like this is going to be Window, not the target element you interact with. So you can simply pass reference object this
to use for retrieving id
.