Get and set URL parameters?

Get and set URL parameters?

Hi,

I need to know a way to get/set URL parameters with jQuery. Here is the flow between pages im having:

page1) index.html
page2) page2.html?img01name=house.jpg
page3) page3.html?img02name=door.jpg

what i want to have is:

page1) index.html
page2) page2.html?img01name=house.jpg
page3) page3.html?img01name=house.jpg?img02name=door.jpg

each page offers a choice to user and must add the choice in url. Actually im using forms with submit buttons to do it but i dont know how to keep parameters from previous page in the current page.

thanks in advance