Defining action on window load
<p>I am trying to get a page to display specific properties depending on whether or not a specific cookie is set... I am trying this</p>

<pre><code> var x = readCookie('age');
window.onload=function(){
if (x='null')  {    
      document.getElementById('wtf').innerHTML = ""; 
   };
if (x='over13')  {    
      document.getElementById('wtf').innerHTML = ""; 
   };
if (x='not13')  {    
   document.getElementById('emailBox').innerHTML = "&lt;style type=\"text/css\"&gt;.formError {display:none}&lt;/style&gt;&lt;p&gt;Good Bye&lt;/p&gt;&lt;p&gt;You must be 13 years of age to sign up.&lt;/p&gt;"; 
   };

   }
</code></pre>

<p>It always just defaults to whatever is in the first if statement... I am still learning my javaScript so I am sure this is sloppy.. can someone please help me get this working?</p>
