tell application "OmniWeb"
set current_url to the address of active tab of browser 1
set current_url to current_url & "&fmt=18"
set the address of active tab of browser 1 to current_url
end tell
...and the second, for Safari:
tell application "Safari"
set current_url to the URL of current tab of window 1
set current_url to current_url & "&fmt=18"
set URL of current tab of window 1 to current_url
end tell
These can be placed in ~/Library » Scripts » Applications » AppName for easy access via the Script menu.
[robg adds: Queue user fds suggests that a JavaScript bookmarklet may work better, and it will work in any browser. Create a new bookmark for any site (or a blank bookmark), then change its URL to this: javascript:window.location+="&fmt=18";. Choose that bookmark while viewing a YouTube video, and you should get the high quality version.]

