function welcome(){
  pageTitle = "Wayne's computer pages";

  var current_date = new Date();
  var hour_value = current_date.getHours();
  if (hour_value < 12)
    {
      greeting = "Good Morning and Welcome to ";    
    }
  else if (hour_value == 12)
    {
      greeting = "Good Afternoon and Welcome to ";   
    }
  else if (hour_value < 17)
    {
      greeting = "Good Afternoon and Welcome to ";    
    }
  else
    {
      greeting = "Good Evening and Welcome to ";   
    }

  document.write(greeting + pageTitle);
}

function todaysdate(){
  var day = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
  var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');

  var current_date = new Date();
  month_value = current_date.getMonth();
  date_value = current_date.getDate();
  year_value = current_date.getFullYear();
  day_value = current_date.getDay();

  dateText = " on " + day[day_value] + ", " + months[month_value] + " " + date_value + ", " + year_value;

  document.write(dateText + " at ");
}

function currenttime(){

  ct=document.currenttime;
  var current_date = new Date();

  ct.hours.value = current_date.getHours();
  ct.mins.value = current_date.getMinutes();
  ct.secs.value = current_date.getSeconds();

  setTimeout("currenttime()",500);
}

function date(){
  var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');

  var current_date = new Date();
  month_value = current_date.getMonth();
  day_value = current_date.getDate();
  year_value = current_date.getFullYear();

  document.write(months[month_value] + " " + day_value + ", " + year_value);

}


function time(){
var current_date = new Date();
var hour_value = current_date.getHours();
var minute_value = current_date.getMinutes();
var second_value = current_date.getSeconds();

document.write(hour_value + ":" + minute_value + " " + second_value + " seconds");

}

function lastmodified(){

  // Specify the month and days arrays to use
  var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
  var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');

  //store the last modified date
  var date = new Date(document.lastModified);

  // extract the information from the last modified date
  month_value = date.getMonth();
  date_value = date.getDate();
  year_value = date.getFullYear();
  day_value = date.getDay();

  // finally output the information
  document.write(days[day_value] + " " + date_value + " "+ months[month_value] + " "+ year_value); 
}

function printWindow() {
bV = parseInt(navigator.appVersion);
if (bV >= 4) window.print();
}

function emailpage(){
var SubjectLine='Take a look at this web page I found, '+top.document.title; 
var BodyText='You can see this page at: '+top.location.href;

var Message='Send <A CLASS=contact HREF="mailto:?SUBJECT='+escape(SubjectLine)+'&BODY='+escape(BodyText)+'" OnMouseOver="status=\'Envoyer cette page à vos amis\'; return true;" TITLE="Send your friends e-mail about this page">this page<\/A> to a friend.';

var MessageIE='Send <A CLASS=contact HREF="mailto:?SUBJECT='+(SubjectLine)+'&BODY='+(BodyText)+'" OnMouseOver="status=\'Envoyer cette page à vos amis\'; return true;" TITLE="Send your friends e-mail about this page">this page<\/A> to a friend.';

if(document.all) { document.write(MessageIE); }

else { document.write(Message); }

}

function addbookmark(){
if (document.all)
  window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

function NoRightClick(b) {
   if(((navigator.appName=="Microsoft Internet Explorer")&&(event.button > 1))
   ||((navigator.appName=="Netscape")&&(b.which > 1))){
   alert("Function Disabled!");
   return false;
   }
}
document.onmousedown = NoRightClick;

function showAppName(){
    alert(navigator.appName);
}

function showAppCodeName(){
    alert(navigator.appCodename);
}

function showAppVersion(){
    alert(navigator.appVersion);
}

function showJavaEnabled(){
    alert(navigator.javaEnabled());
}

function showMimeTypes(){
    alert(navigator.mimeTypes);
}

function showTaintEnabled(){
    alert(navigator.taintEnabled());
}

var count = 0;
var imgs = new Array();
var links = new Array();
var thisimg=1;

imgs[count++]="Images/localbusiness/philsnell.jpg";
links[count]="http://www.hatfield-heath.co.uk";

//imgs[count++]="Images/localbusiness/img2.jpg";
//links[count]="http://www.hatfield-heath.co.uk";

imgs[count++]="Images/localbusiness/villagehall.jpg";
links[count]="http://www.hatfield-heath.co.uk";

imgs[count++]="Images/localbusiness/irishdamcing.jpg";
links[count]="http://www.hatfield-heath.co.uk";

imgs[count++]="Images/localbusiness/handmadepine.jpg";
links[count]="http://www.hatfield-heath.co.uk";

function localbusinessflip(imageName)
{
  if (document.images) {
      thisimg++;

      if (thisimg >= count)
          thisimg = 0;

      document.images[imageName].src = imgs[thisimg];

      setTimeout("localbusinessflip('localBusiness')",5000);
  }
}

function localbusinesslink(imageName){

    document.location.href=links[thisimg];
}
