// MailForm
function checkMail(form) {
  if (mailfrm.message.value == '')
     {
     alert('Please enter your message.');
     document.mailfrm.message.focus();
     return false;
     }
  if (mailfrm.from.value == '')
        {
         if (confirm('Please enter your E-mail address.'))
                  {
                  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('Invalid E-mail address !');
                         mailfrm.from.value = '';
                         document.mailfrm.from.focus();
                         return false;
                        }
 return true;
}


//  Date
var myhour=(new Date()).getHours();
  if (myhour > 4  && myhour < 12) { myHello="Good morning !"; }
  if (myhour > 11 && myhour < 19) { myHello="Good afternoon !"; }
  if (myhour > 18 && myhour < 24) { myHello="Good evening !"; }
  if (myhour > 23 || myhour < 5 ) { myHello="Good night !"; }


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 = '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 + '<br>' + month + ',' + day_of_month + '<br>' + year; 

   document.write('<CENTER>' + date_to_show + '</CENTER>');
 
} //end display date

