title: Is there a spec that the id of elements should be made global variable?
body: <p>If I have a <code>&lt;div id='a'&gt;</code> in Chrome then in javascript I can do <code>a.<em>stuff()</em></code> (it's like as if <code>a</code> is a global variable).</p>
  
  <p>However this does not work with FireFox - I will need to use <code>document.getElementById('a')</code>.</p>
  
  <p>What is the <strong>correct behaviour</strong> here? (according to W3 specs that is)</p>
  
  <p>Also I'm interested in how will Chrome resolve the ambiguity if I have a div with id <code>a</code> yet have a global variable called <code>a</code> too in my script. Is the behavior going to be random and whacky?</p>
  
  <p>And how would an element with id consisting of hyphens ("-"), colons (":"), and periods (".") be translated (ok i know they can be accessed with <code>document.getElementById</code> but how will the browser translate it into the global variable that was representing them)</p>