Google flash searching

Hi want to create a simple text box that when you click Go the words inside the text box will be searched for on google! i know the html link would be :

with TEST being the words from the text box so using getURL i know how to acomplish that but what do i have to do if the user enters two words? with a space? google adds +
for example

so that has TEST AND TEST within the box so how do i convert spaces to + then add it to the getURL to search?

Cheers for any help