Detection if user is on Mac or PC

Is there a way to detect if a user uses a mac or pc with a javascript or flash movie. I need to redirect the user to two different sites because the mac srews up my layout.

I hope one of you guys can help me with this. I really apriciate:P it if you help.

for javascript use

navigator.appVersion

and flash you can use

$version
or more specifically
System.capabilities.os

thanx, I’m going to try it right now