The following code will set index.html#num=2#foo=bar to num=2; foo="bar";
(function(){ var l=window.location.hash.split('#').slice(1) for(var i=0; i<l.length; i++) { var s = l[i].split('='); if(!s[1]) eval("window."+s[0]); else if(/^\d*\.?\d*$/.test(s[1])) eval("window."+l[i]); else eval("window."+s[0]+'="'+s[1]+'";'); } })(); ~Sean