I don't think JavaScript has the ability to do this. Otherwise, from a webpage, you would be able to steal information like session cookies from another site they have open.
You might be able to make a Firefox addon that would allow you to do it, but it won't work otherwise.
Bruce