Thanks very much for you help Bouche, i suspected that i'd have to pass it in as a global variable, u see i did'nt really want to pass it in as a parameter for reasons dictated by the mechanics of the code i'm writing.
I thought I would be able to reference it as you would normally a session variable within a html page (e.g '$sessionvariable') but thanks again.