title: Auto load Javascript
body: <p>I have a flash games website. When I enter a game I have a button labeled "Play Game". The user needs to push this button to start the game. But I don't want users to have to start the game by using a button. How and what can I change? Here is the javascript from <a href="http://glpt.2gdmedia.com/?p=55" rel="nofollow">my website</a>.</p>
  
  <pre><code>}
  function sgame() {
  var x=document.getElementById('gamefirst').style;
  var y=document.getElementById('gamesecond').style;
  if(x.display=='block') { x.display='none'; y.display='block'; }
  else { x.display='block'; y.display='none'; }
  }
  </code></pre>
  
  <p>and maybe</p>
  
  <pre><code>function swf(src, width, height) {
      document.write('&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="733" height="550"  id="currentGame"&gt;');
      document.write('&lt;param name="movie" value="' + src + '"&gt;');
      document.write('&lt;param name="quality" value="high"&gt;');
      document.write('&lt;embed src="' + src + '" id="currentEmbedGame" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="733" height="550" menu="0"&gt;&lt;/embed&gt;');
      document.write('&lt;/object&gt;');
  </code></pre>