// MailForm
function checkMail(form) {
  if (mailfrm.message.value == '')
     {
     alert('Usted no ha dejado el mensaje.');
     document.mailfrm.message.focus();
     return false;
     }
  if (mailfrm.from.value == '')
        {
         if (confirm('Rellene un campo "E-mail"'))
                  {
                  document.mailfrm.from.focus();
                  return false;
                  }
                else
                  {
                  alert(myHello);
                  mailfrm.from.value = '-=xxx@yyy.ru=-';
                  return true;
                  }
        }
            if (mailfrm.from.value.indexOf('@', 0) == -1 || mailfrm.from.value.indexOf('.', 0) == -1)
                        {
                         alert('Entre el direccion de E-mail correcto !');
                         mailfrm.from.value = '';
                         document.mailfrm.from.focus();
                         return false;
                        }
 return true;
}


//  Date
var myhour=(new Date()).getHours();
  if (myhour > 4  && myhour < 12) { myHello="Buenas dias !"; }
  if (myhour > 11 && myhour < 19) { myHello="Buenas tardes !"; }
  if (myhour > 18 && myhour < 24) { myHello="Buenas noches !"; }
  if (myhour > 23 || myhour < 5 ) { myHello="Buenas noches !"; }


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 = date.getYear();
   var day_of_week = '';
   var month = ''

   if(month_number == 0){month = 'de enero';}
   if(month_number == 1){month = 'de febrero';}
   if(month_number == 2){month = 'de marzo';}
   if(month_number == 3){month = 'de april';}
   if(month_number == 4){month = 'de mayo';} 
   if(month_number == 5){month = 'de junio';}
   if(month_number == 6){month = 'de julio';}
   if(month_number == 7){month = 'de agosto';}
   if(month_number == 8){month = 'de setiembre';}
   if(month_number == 9){month = 'de octubre';}
   if(month_number == 10){month ='de noviembre';}
   if(month_number == 11){month ='de deciembre';}


   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 = 'Sabado';}


   var date_to_show = day_of_week + ', el ' + day_of_month + '<br>' + month +  '<br>de ' + year; 

   document.write('<CENTER>' + date_to_show + '</CENTER>');
 
} //end display date

