//File: scripts.js
//Author: Jason Tablante
//URL: http://library.advanced.org/15816
//Purpose: DHTML animation and image rollovers

//function for time label
function whattime(){
var month = new Array();
var day = new Array();
var curdate = new Date();
var isanniv = (curdate.getMonth() + 1 == 2 && curdate.getDate() == 24);
var thedate
month[1] = "J a n u a r y";
month[2] = "F e b r u a r y";
month[3] = "M a r c h";
month[4] = "A p r i l";
month[5] = "M a y";
month[6] = "J u n e";
month[7] = "J u l y";
month[8] = "A u g u s t";
month[9] = "S e p t e m b e r";
month[10] = "O c t o b e r";
month[11] = "N o v e m b e r";
month[12] = "D e c e m b e r";
day[1] = "S u n d a y";
day[2] = "M o n d a y";
day[3] = "T u e s d a y";
day[4] = "W e d n e s d a y";
day[5] = "T h u r s d a y";
day[6] = "F r i d a y";
day[7] = "S a t u r d a y";
thedate = "<font face=Tahoma, sans-serif size=1>- " + month[curdate.getMonth() + 1] + " - " + curdate.getDate() + " - " + day[curdate.getDay() + 1] + " -</font>";
document.write(thedate);
//if anniversary is true
if (isanniv){
	popup('anniversary.html','anniversary','400','340','0');
	}
}

button1_on = new Image();
button2_on = new Image();
button3_on = new Image();
button4_on = new Image();
button5_on = new Image();
button6_on = new Image();

button1_off = new Image();
button2_off = new Image();
button3_off = new Image();
button4_off = new Image();
button5_off = new Image();
button6_off = new Image();

button1_on.src = 'media/main.button1b.jpg'
button2_on.src = 'media/main.button2b.jpg'
button3_on.src = 'media/main.button3b.jpg'
button4_on.src = 'media/main.button4b.jpg'
button5_on.src = 'media/main.button5b.jpg'
button6_on.src = 'media/main.button6b.jpg'

button1_off.src = 'media/main.button1.jpg'
button2_off.src = 'media/main.button2.jpg'
button3_off.src = 'media/main.button3.jpg'
button4_off.src = 'media/main.button4.jpg'
button5_off.src = 'media/main.button5.jpg'
button6_off.src = 'media/main.button6.jpg'

function on(image) {
      imagesrc = eval(image + '_on.src');
      document[image].src = imagesrc;

}

function off(image) {
      imagesrc = eval(image + '_off.src');
      document[image].src = imagesrc;

}