Check out
HTML::Form from CPAN. All you really need to do is create 3 seperate submissions for each form. One form will be the form that the user sees the response from. Examine the javascript, use a Javascript Debugger like Mozilla's Venkman, and watch the Headers -- check out LiveHTTPHeaders for Mozilla.
Want to support the EFF and FSF by buying cool stuff? Click
here.