Any way to duplicate Opera's mouse navigation in Firefox 3?

I’ve been using Opera for a long time, but I’d really like to switch to Firefox 3. I frequently open dozens of tabs, and I’ve found that Firefox 3 consistently seems to use lower memory than Opera or the old Firefox or IE. Plus there are zillions of plugins and customizations for Firefox, and it has a straightforward bookmark and configuration system that is easy to move to new computers and Windows installations, while Opera seems to store its bookmarks and configurations in the registry or some obscure file I can’t figure out.

However, there’s one thing I really like about Opera that I haven’t been able to match in Firefox: the mouse navigation. With Opera, I can navigate by doing leftclick-rightclick and it will either go forward in the current tab’s history, or will find and follow a “Next” link if one exists. Rightclick-leftclick goes back in the tab’s history. I’ve gotten used to it and it’s very handy. It looks like this is called using “rocker gestures,” from what I can tell.

Now, I’ve got this sort of working in Firefox by using All-in-One Gestures, and FireGestures, but so far I haven’t found out how to exactly duplicate Opera’s functionality – that goes forward if there’s a page in the history to go forward to, but if not, tries to follow a “next” link.

FireGestures has a Scripts page, and one of the scripts is the [Previous / Next Page (Auto-Detect Link)](Previous / Next Page (Auto-Detect Link)) script, which looks like it contains hints about what I want to do; if I set the “left-click with holding right-click” option to “Back” and the “right-click with holding left-click” option to this script, it almost does what I want, but I need an option to first go forward if possible, and to only execute this script if there are no pages ahead in the history to go forward to.

If I could find a guide to these scripts, I could probably figure out how to do it. Does anybody know how to do what I’m asking, or where to find a guide to this scripting language? Any help is greatly appreciated!

I hven’t ever really played very much with either, but I was under the impression that they both used a similar approach.
Opera config files. Bookmarks you can just import and export from the bookmarks view. I think you can even export them as a web page, for easy inclusion into an existing Firefox install.