Detecting click & hold with multiple objects

I'm working on this little project (warning: large page)http://pharoah.xetaspace.netRight now each little table square has an onclick event to activate it. The problem is that I have to click once for each "pixel". I can't just hold down the mouse and fill a bunch of them. I have looked for a solution to this but I'm not sure I know the right terms, and so far I have found nothing. Any help at all would be amazing.