Javascript simple problem, show div and call function on certain day
<p>Guys I've got a problem. I'm very ill-experienced with javascript. I basically want to show a div on fridays and also call the lightning() function on Fridays. Yes it's a horrible script and you can guess where it's going but I can't figure out how to call both using my current script.</p>

<pre><code>&lt;script type="text/javascript"&gt;

    &lt;!--
    //Lighting script
    var flash=0
    function lightning()
    {flash=flash+1;
    if(flash==1){document.bgColor='green'; setTimeout("lightning()",100);}
    if(flash==2){document.bgColor='black'; setTimeout("lightning()",90);}
    if(flash==3){document.bgColor='red'; setTimeout("lightning()",85);}
    if(flash==4){document.bgColor='blue'; setTimeout("lightning()",80);}
    if(flash==5){document.bgColor='purple'; setTimeout("lightning()",75);}
    if(flash==6){document.bgColor='green'; setTimeout("lightning()",70);}
    if(flash==7){document.bgColor='black'; setTimeout("lightning()",65);}
    if(flash==8){document.bgColor='red'; setTimeout("lightning()",60);}
    if(flash==9){document.bgColor='blue'; setTimeout("lightning()",50);}
    if(flash==10){document.bgColor='purple'; setTimeout("lightning()",40);}
    if(flash==11){document.bgColor='black'; setTimeout("lightning()",30);}
    if(flash==12){document.bgColor='red'; setTimeout("lightning()",25);}
    if(flash==13){document.bgColor='red'; setTimeout("lightning()",20);}
    if(flash==14){document.bgColor='blue'; setTimeout("lightning()",10);}
    if(flash==15){document.bgColor='purple'; setTimeout("lightning()",5);}
    if(flash==16){document.bgColor='white'; setTimeout("lightning()",1);}
    if(flash==17){document.bgColor='black'; setTimeout("lightning()",1);}
    if(flash==18){document.bgColor='blue'; setTimeout("lightning()",1);}
    if(flash==19){document.bgColor='purple'; setTimeout("lightning()",1);}
    if(flash==20){flash=0; setTimeout("lightning()",100);}
    }

    // --&gt;

    onload=function(){
        var rightNow = new Date();
        var day = rightNow.getDay();
        var hour = rightNow.getHours();
        var minute = rightNow.getMinutes();
        var formDisplay = 'none'; // unless we see otherwise
        var forwardDisplay = 'block'; // unless we see otherwise

        if(day==1 || day==2  ||  day==3  ||  day==4 ) {  // friday friday, got to get down on Friday            if((hour&gt;=1)  &amp;&amp;  (hour&lt;=24)) // if chat is avalable between these times
                formDisplay = 'block', forwardDisplay = 'none'; 

            }

            }


    document.getElementById('friday').style.display = formDisplay; 
    document.getElementById('friday').style.display = forwardDisplay; 

    }

    // alert('Test Alert')
    &lt;/script&gt;

    &lt;div id='friday' &gt;
    &lt;object width="560" height="349"&gt;&lt;param name="movie" value="http://www.youtube.com/v/CD2LRROpph0?fs=1&amp;autoplay=1&amp;amp;hl=en_US&amp;amp;hd=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/CD2LRROpph0?fs=1&amp;autoplay=1&amp;amp;hl=en_US&amp;amp;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="349"&gt;&lt;/embed&gt;&lt;/object&gt;
    &lt;/div&gt;
</code></pre>

<p>Could anybody point me in the right direction? Thank you in advance!</p>
