// GLOBALS
// all headshots in directory "photographs/" hw1.jpg, hw2.jpg, etc.
var MAX_HEADSHOTS = 6;	// maximum number of headshots to randomly cycle thru
// END GLOBALS

function getObj(name) {
	var obj;
	
	if (document.getElementById) {
		obj = document.getElementById(name);
	} else if (document.all) {
		obj = document.all[name];
	} else {
		obj = document.layers[name];
	}

	return obj;
}

function getYear() {
	var curdate = new Date();
	return curdate.getFullYear();
}

function loadRandHeadShot() {
	var obj = getObj('contact_headshot');
	var index = (Math.floor(Math.random()*MAX_HEADSHOTS))+1;
	obj.style.backgroundImage = 'url(photographs/hs'+index+'.jpg)';
}


