Loading different pictures based on time of day

Hello again everyone. Here’s the sit. I’m trying to load a different .gif file based upon the time of day. I figured what I wrote would work, but alas, I was wrong. Here’s what I got:


files=["sunrise.gif", "morning.gif", "midday.gif",
	   "afternoon.gif", "twilight.gif", "night.gif"]

var currentHour:Number = myDate.getHours();
var currentMin:Number = myDate.getMinutes();
var currentSec:Number = myDate.getSeconds();
function pictureRotate(){
	if ((currentHour>21)&(currentHour<6)){
		loadMovie("night.gif", "_root.main");
	}else if ((currentHour>6)&(currentHour<9)){
		loadmovie("sunrise.gif", "_root.main");
	}else if ((currentHour>9)&(currentHour<12)){
		loadmovie("morning.gif", "_root.main");
	}else if ((currentHour>12)&(currentHour<15)){
		loadmovie("midday.gif", "_root.main");
	}else if ((currentHour>15)&(currentHour<18)){
		loadmovie("afternoon.gif", "_root.main");
	}else{
		loadmovie("twilight.gif", "_root.main");
	}
}

I know I can take out that first array, and I do believe I can take out the minutes and seconds, but I left the code as is, in case I screwed it all up. Oh and the pictures have no paths because I imported them into the actual .fla. Thanks for the help ahead of time!