Javascript is one of the technologies you might want to use to accomplish this but my first thought is that you need to use DHTML (browser specific) to delineate the areas rather than using a table.
In DHTML for IE,
Function Changecolor(squareID)
document.all(squareID).bgcolor = red
End Function
The DHTML will have to be different for Navigator. You can lookup DHTML in the online help at http://msdn.microsoft.com/ or at Netscape's site or you can find some books like Dynamic HTML (ISBN 0764580531) from IDB Books.
I know this isn't a straightforward tutorial or answer but this can be complicated when you're working across browsers and you want to dynamically affect a stateless environment that was originally designed tobe a 'round trip' way to communicate between server and clients. :)