function display_title() {
  var hours = date.getHours();
  var message = '';

  if (hours >= 6) { time_of_day = 'Buenos Días'; message='Morning Message';}
  if ((hours >= 14) && (hours < 21)) { time_of_day = 'Buenas Tardes'; message='Afternoon Message'}
  if (hours >= 21) { time_of_day = 'Buenas Noches'; message='Evening Message';}
  if ((hours >= 0) && (hours < 6)){ time_of_day = 'Buenas Noches'; message='Night Message';}

  document.write('<left>' + time_of_day + ' </left>');
}

function display_title_eng() {
  var hours = date.getHours();
  var message = '';

  if (hours >= 6) { time_of_day = 'Good Morning'; message='Morning Message';}
  if ((hours >= 14) && (hours < 21)) { time_of_day = 'Good Afternoon'; message='Afternoon Message'}
  if (hours >= 21) { time_of_day = 'Good Evening'; message='Evening Message';}
  if ((hours >= 0) && (hours < 6)){ time_of_day = 'Good Night'; message='Night Message';}

  document.write('<left>' + time_of_day + ' </left>');
}


function display_date() {

   date = new Date();

   var day_of_week_number = date.getDay();
   var day_of_month = date.getDate();
   var month_number = date.getMonth();
   var year = getYear();
   var day_of_week = '';
   var month = '' 

   if(month_number == 0){month = ' de Enero de ';}
   if(month_number == 1){month = ' de Febrero de ';}
   if(month_number == 2){month = ' de Marzo de ';}
   if(month_number == 3){month = ' de Abril de ';}
   if(month_number == 4){month = ' de Mayo de ';}
   if(month_number == 5){month = ' de Junio de ';}
   if(month_number == 6){month = ' de Julio de ';}
   if(month_number == 7){month = ' de Agosto de ';}
   if(month_number == 8){month = ' de Septiembre de ';}
   if(month_number == 9){month = ' de Octubre de ';}
   if(month_number == 10){month = ' de Noviembre de ';}
   if(month_number == 11){month =' de Diciembre de ';}


   if(day_of_week_number == 0){day_of_week = 'Domingo';}
   if(day_of_week_number == 1){day_of_week = 'Lunes';}
   if(day_of_week_number == 2){day_of_week = 'Martes';}
   if(day_of_week_number == 3){day_of_week = 'Miercoles';}
   if(day_of_week_number == 4){day_of_week = 'Jueves';}
   if(day_of_week_number == 5){day_of_week = 'Viernes';}
   if(day_of_week_number == 6){day_of_week = 'Sábado';} 

   var date_to_show = day_of_week + ',  ' + day_of_month + '  ' + month +  '  ' + year + '&nbsp;&nbsp; ';

   document.write('<right>' + date_to_show + '</right>');

} 

function display_date_eng() {

   date = new Date();

   var day_of_week_number = date.getDay();
   var day_of_month = date.getDate();
   var month_number = date.getMonth();
   var year = getYear();
   var day_of_week = '';
   var month = '' 

   if(month_number == 0){month = 'January';}
   if(month_number == 1){month = 'February';}
   if(month_number == 2){month = 'March';}
   if(month_number == 3){month = 'April';}
   if(month_number == 4){month = 'May';}
   if(month_number == 5){month = 'June';}
   if(month_number == 6){month = 'July';}
   if(month_number == 7){month = 'August';}
   if(month_number == 8){month = 'September';}
   if(month_number == 9){month = 'October';}
   if(month_number == 10){month = 'November';}
   if(month_number == 11){month ='December';}


   if(day_of_week_number == 0){day_of_week = 'Sunday';}
   if(day_of_week_number == 1){day_of_week = 'Monday';}
   if(day_of_week_number == 2){day_of_week = 'Tuesday';}
   if(day_of_week_number == 3){day_of_week = 'Wednesday';}
   if(day_of_week_number == 4){day_of_week = 'Thursday';}
   if(day_of_week_number == 5){day_of_week = 'Friday';}
   if(day_of_week_number == 6){day_of_week = 'Saturday';} 

   var date_to_show = day_of_week + ',  ' + day_of_month + 'th  ' + month +  '  ' + year + '. ';
   
   if(day_of_month==1 || day_of_month==21 || day_of_month==31)
   		date_to_show= day_of_week + ',  ' + day_of_month + 'st  ' + month +  '  ' + year + '. ';

   if(day_of_month==2 || day_of_month==22)
   		date_to_show= day_of_week + ',  ' + day_of_month + 'nd  ' + month +  '  ' + year + '. ';

   if(day_of_month==3 || day_of_month==23)
   		date_to_show= day_of_week + ',  ' + day_of_month + 'rd  ' + month +  '  ' + year + '. ';

   document.write('<right>' + date_to_show + '</right>');

} 
