I've seen javascript (and written some too) to show the contents of input tags (useful if the guy before you left a password in an input...), but I want to use JS to show the Javascript variables that exist in the page.
The reason I want to do this is because I want to check out a file sharing site to see if it's real or just a rootkit hotbed.
Any ideas?
There are DOM inspectors in both IE and FF. In older IE versions you'll want the Document Tree section of their Web Developer Accessories. In IE8 there go to Tools->Developer Tools and there you have a nice little console to play with that will show you these things. In FF you can use the built in DOM inspector or Firebug (my personal favourite). There is also this bookmarklet, here is the code (cleaned up):