Variables inside a function!?

When you declare a variable in a function it is a local variable only available inside that function. But what if you also want to use it outside that function?

I’d like to do this without having to use a shared object (flash cookie).

Any thoughts someone? Thx, Wim