function takeYear(theDate)
{
	x = theDate.getYear();
	var y = x % 100;
	y += (y < 38) ? 2000 : 1900;
	return y;
}

function display_title(lang) {
var hours = date.getHours(); 
var message = '';
if (lang=='en')
{
 if (hours >= 6) { time_of_day = 'Good morning'; message='Morning Message';}
 if ((hours >= 12) && (hours < 17)) { time_of_day = 'Good afternoon'; message='Afternoon Message'}
 if (hours >= 17) { time_of_day = 'Good evening'; message='Evening Message';} 
 if ((hours >= 0) && (hours < 6)){ time_of_day = 'Good night'; message='Night Message';} 
}
else
{
 if (hours >= 6) { time_of_day = 'Доброе утро'; message='Morning Message';}
 if ((hours >= 12) && (hours < 17)) { time_of_day = 'Добрый день'; message='Afternoon Message'}
 if (hours >= 17) { time_of_day = 'Добрый вечер'; message='Evening Message';} 
 if ((hours >= 0) && (hours < 6)){ time_of_day = 'Доброй ночи'; message='Night Message';} 
}

document.write('<CENTER>' + time_of_day.fontcolor("#FFFFFF") + '<font color="#FFFFFF">!</font></CENTER>');
}
//   document.write('<CENTER>' + message + '<CENTER>'); 
//end display title

function display_date(lang) {

   date = new Date();

   var day_of_month = date.getDate();
   var month_number = date.getMonth();
   var year = takeYear(date);
   var day_of_week = '';
   var month = ''
	var suffix = ' г.';
   if(month_number == 0){month = '01';}
   if(month_number == 1){month = '02';}
   if(month_number == 2){month = '03';}
   if(month_number == 3){month = '04';}
   if(month_number == 4){month = '05';} 
   if(month_number == 5){month = '06';}
   if(month_number == 6){month = '07';}
   if(month_number == 7){month = '08';}
   if(month_number == 8){month = '09';}
   if(month_number == 9){month = '10';}
   if(month_number == 10){month = '11';}
   if(month_number == 11){month ='12';}
	if (lang == 'en') { suffix = ''; }
   var date_to_show = day_of_month + '.' + month +  '.' + year + suffix; 

   document.write('<CENTER><b>' + date_to_show.fontcolor("#FFFFFF") + '</b></CENTER>');
 
}
