This is strictly javascript for the addon 'greasemonkey' for firefox.
Function 1
When loading a web page,
- clear all the cookies for the specific domain
- grab the captcha image
- upload it to a POST form from another website with GM_xmlhttpRequest
- get the result & input it into the form
PM for the 2 captcha examples.