Flash MX reading variables set in HTML?

Hi, I am wondering if I can use some javascript / html (or any type of script) which flash MX can read and set a variable in MX accordingly.

I have a menu that deactiviates buttons when they have been clicked and the user is directed to a certain section (using a javscript function called by flash) - the problem is that if the user bookmarks the page and then returns the button I want deactivated is not.

I need someway of Flash knowning its is a certain section, preferably from reading something in the HTML document its inbedded into.

Does anybody know how to do this by putting something in the html document or any other way?