timeAction = function() {

	var times = ["00:00:00","06:00:00","12:00:00","18:00:00"];
	var _css_ = ["night.css","day.css","day.css","abend.css"];
	var now   = new Date();
	var day   = now.getDate();
	var month = now.getMonth();
	var year  = now.getFullYear();

	for(var n=x=0;x<times.length;x++) {

		var tmps = times[x].split(":");
		times[x] = new Date(year,month,day,tmps[0],tmps[1],tmps[2]).getTime();

		if(times[x]<now.getTime()) n=x;
	}
	
	document.write("<link href=\""+_css_[n]+"\" rel=\"stylesheet\">");
};
timeAction();