Thanks Ray that worked like a charm :) I was on the right track with one of my initial attempts in terms of referencing a URL variable (but since no URL variables were being passed I couldnt work it out...however I didnt think to assign a local variable to a URL variable so thats how its done :)
regards
Chris