var x = event.target||event.srcElement; document.getElementById(x.id).style.left = 200 + \"px\" ; document.getElementById(x.id).style.top = 100 + \"px\" ;
I solved my problem using Jquery. For example to get the id of a element you can use:
var x = $(this).attr('id');