var step = 1; var delay = 30; var blocks = new Array(); var interval; function block(divName,x,y){ this.name = divName; this.xPos = x; this.yPos = y; this.oDiv; this.init = initState; } function initState(){ this.oDiv = document.all(this.name); this.oDiv.style.top = this.yPos; this.oDiv.visibility = "visible"; } function changePos() { for(var i=0;i