This is the code, I think it's function is obvious... can anyone tell what the problem is? function moveball(x,y,z){ try{ var k=(Zeye-Zscreen)/(Zeye-z); var bs=Math.round(ballsize*k); this.is.width=2*bs; this.is.height=2*bs; this.is.left=(x+xmax)/2; this.is.top=(y+ymax)/2; this.is.zIndex=(z+zmax)/2; } catch(err){ alert("error ="+err+", x="+x+", y="+y+", z="+z+", k="+k+", bs="+bs+", top="+this.is.top+", left="+this.is.left+", width="+this.is.width+", height="+this.is.height); } } Code (markup): is=object.style http://huduzu.trollnest.com to see the error reported.
Worth a try: this.is.width=2*bs + "px"; this.is.height=2*bs + "px"; this.is.left= Math.round((x+xmax)/2) + "px"; this.is.top= Math.round((y+ymax)/2) + "px"; this.is.zIndex= Math.round((z+zmax)/2); Code (markup):