url encode w/javascript for redirect

I'm integrating a service with iBill, a merchant account service, and running into a problem on Netscape Navigator. I'm loosing variables because the url is not being incoded.

Here's the scenario. When the end user fills out their info at iBill and the transaction is good, iBill forwards them to a web good page that I've created and posted on their servers. My web good page is a redirect to a PHP page on my server which takes the variables passed in the url and dumps them into a database.

I need to url encode the redirect string on the web good page but their servers are not running PHP so I need do it in Javascript...which I'm no good at.

But I didnt want to confuse you if you werent using php. It is the same concept. Repeat as neccessary. Only one thing - when using MORE than one name/value pair, you must offset the subsequent name/value paris using the Ampersand (&). Like so:

what worked

Thought I would post the code that worked for me.

Here's the scenario. We're using a service called iBill. I posted what's called a web good page, called when the transaction is good, on their server. I needed to pass variables from their server to my php page.