Going to a frame based on the current time

Hi I have a flash file of a snowman doing various activities.
He’s doing 7 different things (all individual movie clips) and I place each of the movie clips on the first 7 frames, I placed a stop action on each one.

Here is the code I used

var myDate = new Date();
var localHours = this.myDate.getHours();
if (this.localHours>=6 || this.localHours<=18)
{
gotoAndPlay(1);
}
if (this.localHours>=19 || this.localHours<=5)
{
gotoAndPlay(10);

However no matter what gotoAndPlay frame number I used, it always went to the second frame. Can anybody tell me why?

thanks in advance