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());
}

// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this notice.

// SETUPS:
// ===============================

// Set the horizontal and vertical position for the popup

PositionX = 20;
PositionY = 10;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 750;
defaultHeight = 750;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = true;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;

function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');
writeln('<sc'+'ript>');
writeln('var clickmessage="All images on this Website are copyright protected"');
writeln('function disableclick(e) {');
writeln('if (document.all) {');
writeln('if (event.button==2||event.button==3) {');
writeln('if (event.srcElement.tagName=="IMG"){');
writeln('alert(clickmessage);');
writeln('return false;');
writeln('}');
writeln('}');
writeln('}');
writeln('else if (document.layers) {');
writeln('if (e.which == 3) {');
writeln('alert(clickmessage);');
writeln('return false;');
writeln('}');
writeln('}');
writeln('else if (document.getElementById){');
writeln('if (e.which==3&&e.target.tagName=="IMG"){');
writeln('alert(clickmessage)');
writeln('return false');
writeln('}');
writeln('}');
writeln('}');
writeln('function associateimages(){');
writeln('for(i=0;i<document.images.length;i++)');
writeln('document.images[i].onmousedown=disableclick;');
writeln('}');
writeln('if (document.all)');
writeln('document.onmousedown=disableclick');
writeln('else if (document.getElementById)');
writeln('document.onmouseup=disableclick');
writeln('else if (document.layers)');
writeln('associateimages()');
writeln('</sc'+'ript>');
writeln('<sc'+'ript>');
writeln('var isNN,isIE;');
writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');
writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');
writeln('if (isIE){');
writeln('window.resizeTo(300,300);');
writeln('width=300-(document.body.clientWidth-document.images[0].width);');
writeln('height=300-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');
writeln('if (isNN){');       
writeln('window.innerWidth=document.images["George"].width;');
writeln('window.innerHeight=document.images["George"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');
writeln('</sc'+'ript>');
if (!AutoClose) 
writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
var str= imageURL;
var intIndexOfMatch = str.indexOf( " " );
while (intIndexOfMatch != -1){
// Relace out the current instance.
str = str.replace( " ", "%20" )
// Get the index of any next matching substring.
intIndexOfMatch = str.indexOf( " " );
}
//alert(str);
writeln('<img name="George" src='+str+' style="display:block"></body></html>');
close();		
}}

function mouseOver(name, image)
{
document.images[name].src = image;
}
function mouseOut(name, image)
{
document.images[name].src = image;
}

