Daily Schedule from 10PM to 6AM in javascript

Hi
I stuck with very simple (what I thought) ;task to have web page display different from 10 PM (22:00) to 6 AM.(6:00) every day
I can set variables var from=22, var end=6.
I understand that I need to use (new Date()).getHours() function
Now, how can I calculate if user loaded my page in this time range?