function RunningDate(language) {

	var dateNode = document.getElementById('dateNode') || false;

	var lang = language;

	this.getTime = function(){
		var now = new Date();

		var timeStr = "";

		timeStr +=  this.getWeekDayName(now.getDay()) + ", ";
		timeStr += ((now.getDate() < 10) ? "0" : "") + now.getDate();
		timeStr += "." + (((now.getMonth() + 1) < 10) ? "0" : "") + (now.getMonth() + 1);
		timeStr += "." + ((now.getYear() > 1900) ? now.getYear() : (1900 + now.getYear())) + ", ";

		timeStr += now.getHours();
		timeStr += ((now.getMinutes() < 10) ? ":0" : ":") + now.getMinutes();
		timeStr += ((now.getSeconds() < 10) ? ":0" : ":") + now.getSeconds();

		return timeStr;
	}

	this.updateTimeNode = function(){
		dateNode.innerHTML = this.getTime();
	}

	this.getWeekDayName = function(num) {
		if ('eng' == lang) {
			if (0 == num) return "Sunday";
			if (1 == num) return "Monday";
			if (2 == num) return "Tuesday";
			if (3 == num) return "Wednesday";
			if (4 == num) return "Thursday";
			if (5 == num) return "Friday";
			if (6 == num) return "Saturday";
		} else if ('fr' == lang) {
			if (0 == num) return "Dimanche";
			if (1 == num) return "Lundi";
			if (2 == num) return "Mardi";
			if (3 == num) return "Mercredi";
			if (4 == num) return "Jeudi";
			if (5 == num) return "Vendredi";
			if (6 == num) return "Samedi";
		} else {
			if (0 == num) return "воскресенье";
			if (1 == num) return "понедельник";
			if (2 == num) return "вторник";
			if (3 == num) return "среда";
			if (4 == num) return "четверг";
			if (5 == num) return "пятница";
			if (6 == num) return "суббота";
		}

	}
}


