
// Generic javascript functions...

// For the (C)opyright notice
function getFullYear()
{
 today=new Date();
 fullYear=today.getFullYear();
 return fullYear;
}

// Change the background picture, depending on the user's screen resolution
function doBG()
{
 file = 'GFX/Backgrounds/' + screen.width + "x" + screen.height + ".gif"
 document.body.background = file;
}

// Set up an array to pre-load our roll-over graphics to...
pics = new Array();
var objCount = 0;

// Function to pre-load normal, highlighted and depressed graphics
// states of our roll-over
function preload(name, first, second, third) { 

pics[objCount] = new Array(3);
pics[objCount][0] = new Image();
pics[objCount][0].src = first;
pics[objCount][1] = new Image();
pics[objCount][1].src = second;
pics[objCount][2] = new Image();
pics[objCount][2].src = third;
pics[objCount][3] = name;
objCount++;
}

// If the mouse moves over a graphic, update the roll-over
function on(name){
for (i = 0; i < objCount; i++) {
if (document.images[pics[i][3]] != null)
if (name != pics[i][3]) { 
document.images[pics[i][3]].src = pics[i][0].src;
} else {
document.images[pics[i][3]].src = pics[i][1].src;
}
}
}

// If the mouse moves off a graphic, update the roll-over
function off(name){
for (i = 0; i < objCount; i++) {
if (document.images[pics[i][3]] != null) 
 if (name == pics[i][3]) { 
  document.images[pics[i][3]].src = pics[i][0].src;
 }
}
}

// If the mouse is clicked, update the roll-over graphic
function down(name){
for (i = 0; i < objCount; i++) {
if (document.images[pics[i][3]] != null)
 if (name == pics[i][3]) { 
  document.images[pics[i][3]].src = pics[i][2].src;
 }
}
}
