I made a strobe light, how can I make it stop?
<p>I made this strobe light function and the strobe function worked. I've been trying to add functionality for resetting the website and stopping the strobe. I tried this code but it hasn't worked. I've been trying to debug this for a while but can't think of anything. If you have any ideas of how to make this work they'd be greatly appreciated.</p>

<pre><code>var text1=document.body.style.backgroundColor;
var text2=document.body.style.color;
var boolean_value1=true;
var boolean_value2=true;
function strobe()
{
 if (boolean_value2)
 {
  document.body.style.backgroundColor = boolean_value1 ? 'black' : 'white';
  document.body.style.color = boolean_value1 ? 'white' : 'black';
  boolean_value1=!boolean_value1;
  setTimeout(strobe, 70); //in milliseconds
 }
 else
 {
  document.body.style.backgroundColor=text1;
  document.body.style.color=text2;
  alert("The else statement was executed...boolean_value2 evaluates to false");
 }
}

function stop_strobe()
{
 boolean_value2=false;
}
</code></pre>

<p>I think as of now the main problem is that <code>boolean_value2</code> doesn't evaluate to <code>true</code>. I can't understand why though. Isn't it a global variable? Yes, I have been calling these functions rather than just declaring them. But that's in a different file that I know works....this one:</p>

<pre><code>&lt;html&gt;

&lt;head&gt;
 &lt;title&gt;Blag!&lt;/title&gt;
 &lt;script type="text/javascript" src="/JAVASCRIPT/flash.js"&gt;&lt;/script&gt;
 &lt;script type="text/javascript" src="/JAVASCRIPT/konami.js"&gt;&lt;/script&gt;
&lt;/head&gt;



&lt;body&gt;
    &lt;script type="text/javascript"&gt; 
    // &lt;![CDATA[

        var konami = new Konami();
        konami.pattern = "38384040373937396665";
        var counter=0;
        konami.code = function() {
            if ((counter%2)==0)
            {
             alert("You have entered the Konami code...enter it again to make it stop...")
             strobe();
             counter=counter+1;
            }
            else
            {
             stop_strobe();
            }
        };
        konami.load();

    // ]]&gt;
    &lt;/script&gt; 

&lt;/body&gt;
</code></pre>
