Ported CaptchaParser to JS

ported to js for use with NodeJS.