
function goHome() {
 document.location.href = 'index.php';
}


// F A D E S //

function fadeImg() {new Effect.Appear('fadeImg', {duration: 1.0 });}





//===============[ general utilities ]================================================//

function getObj(name){ // returns an object with a specified id tag (name)
	if(document.getElementById) this.obj = document.getElementById(name);
	else if(document.all) this.obj = document.all[name];
	return this.obj;
}
function getElementsByClass(val){ // returns an array of objects with specified class name (val)
	var all = document.all || document.getElementsByTagName('*');
	var arr = [];
	for(var k = 0; k < all.length; k++)
		if(all[k].className == val) arr[arr.length] = all[k];
	return arr;
}


// Get today's current date.
var now = new Date();
// Array list of days.
var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
// Array list of months.
var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
// Calculate the number of the current day in the week.
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();
// Calculate four digit year.
function fourdigits(number)	{return (number < 1000) ? number + 1900 : number;}
// Join it all together
today =  
         months[now.getMonth()] + " " +
         date + ", " +
         (fourdigits(now.getYear())) ;





		function init(){ // initialization function, called from body onload event


		//ROLLOVERS
			var bArr = getElementsByClass("navRoll");
			for(var i = 0; i < bArr.length; i++)
				if(bArr[i].addEventListener){
					bArr[i].addEventListener('mouseover', function(event) { this.src = this.src.substring(0, this.src.lastIndexOf(".")-1) + "2.gif"; }, false);
					bArr[i].addEventListener('mouseout', function(event) { this.src  = this.src.substring(0, this.src.lastIndexOf(".")-1) + "1.gif"; }, false);
				}
				else{
					bArr[i].onmouseover = function() { this.src = this.src.substring(0, this.src.lastIndexOf(".")-1) + "2.gif"; }
					bArr[i].onmouseout = function() { this.src = this.src.substring(0, this.src.lastIndexOf(".")-1) + "1.gif"; }
				}

		} // end of function