Hi Carlos
I created two flag buttons, an English and German, which had href links applied of ?lan=eng and ?lan=de respectively. This has the effect of adding a query to the URL, which is then picked up by the code. Now if you click on the English flag, you set the cookie to eng, likewise for German.
Matt