Hello there, first message, as you can guess

I'm not totally new to Photoshop, I have some experience of it, but I can't call me an expert. Intermediate user, probably. And I have a problem.

I have a patchwork image like this one (the one I'm working on is much much much much larger with many many many more colors)...

http://img193.imageshack.us/img193/9645/32679448.jpg

...but I need a border at the edges of each color section as you can see in this other one...

http://img36.imageshack.us/img36/4390/34228778.jpg

...but I need a border hopefully made by Photoshop itself through some trick not by my hand :P

If possible, I need a border with hard pixel edges. I created the second pic I posted simply applying a stroke fx to every color selection... I'm looking for a more "automatic" way.

Thanks in advance for any tip!