There's no problem with capturing function key events, but you won't be able to override the default action - only attach new (additional) functions to that action
Which is why, as you said, you wanna look for keys which are not already used - F12 and F7 are good in moz, safari and IE; F6, F9 and F10 are okay in Opera 8 - but those are just the default setup ... whatever you choose, someone somewhere will have it configured to do something else.
Because ultimately, both Windows and Mac can assign almost any key to do almost anything in almost any application.
So .. if you do function key scripting you should really add user preferences to let people change the key assignments for themselves. This is what I do with the keyboard navigation hotkey on my menu -- http://www.udm4.com/demos/module-keyboard.php
Note also that Opera can't detect most modifier + key combinations - key events stop being reported if, for example, the ALT key is pressed down.