use a JavaScript code module???

http://stackoverflow.com/questions/1820824/accessing-the-same-variable-in-multiple-parts-of-a-firefox-extension