stop refresh of page between hours
<p>I have an issue where I want to check the time and do something based on it. For example, from 12 midnight to 1 am, I would like to stop the page from refreshing. How would I accomplish this?</p>

<pre><code>function RefreshPage()
{
    if (refresh == 'Y')
    {
                CheckAndStopAutoRefresh();
        }
}

function CheckAndStopAutoRefresh()
{
    var d = new Date(); 
        var currentHour = d.getHours(); // 0-23 


        if (currentHour &gt;= 0 &amp;&amp; currentHour &lt; 1) 
        { 
        return;      

        }  
        else 
        { 
            window.location=window.location; // refresh
        } 


}
</code></pre>
