@BlueThen What did you do when a ball was in two grids? As in, it was half in one and half in the other? And to see if I've already made the check, would you just have an array or something? Or would you do it mathematically/logically (I'm sure there's a way somehow in two equally ordered lists)
Demo added to description. http://jsfiddle.net/r2auL/show/
Larger one at http://jsfiddle.net/r2auL/1/show/