Google does execute javascript, and even some flash, but not on all its crawlers (which is very understandable; building a DOM for every page on the web is expensive, even for Google. I say "build a DOM" because abstract interpretation is still far off, specially for the web and its cruft of languages, standards and quirks.)
http://www.seomoz.org/ugc/new-reality-google-follows-links-i...
http://www.labnol.org/internet/search/googlebot-executes-jav...