 			var next_date:Date = null;
 			
 			var now:Date = new Date();
-			var now_J:uint = uint( ( now.getTime() / 1000 + 1 ) / 60 / 60 / 24 +.5 );
-			var i_date:Date = new Date(now.getTime());
-			
+			var now_J:uint = Math.floor( now.getTime() / 1000 / 60 / 60 / 24 );
+			var i_date:Date = new Date(Math.floor(now.getTime()/1000/60)*60*1000);
+
 			for (var i:uint=0;i<366;i++)
 			{
 				next_date = null;


			var from_split:Array = cronline_a[6].toString().split('-');
			this.valid_from_date = new Date(from_split[0], from_split[1], from_split[2]);
			this.valid_from_J = uint(this.valid_from_date.getTime() / 1000 / 60 / 60 / 24 +.5 );

			var to_split:Array = cronline_a[7].toString().split('-');
			this.valid_to_date = new Date(to_split[0], to_split[1], to_split[2]);
			this.valid_to_J = uint(this.valid_to_date.getTime() / 1000 / 60 / 60 / 24 +.5 );
			
			this.setLastDate();
			this.setNextDate();

			this.addEventListener(Event.ADDED, play, false, 0, true);
		}

			this.addChild(this.current_layout);
		}
		
		private function playNextLayoutOnTimer(event:TimerEvent):void
		{
			event.stopPropagation();
