
function initDate(){
	var monthNames = new Array("January","February","March","April", "May","June","July","August", "September","October","November","December");
	var now = new Date();
	var theYear = now.getYear()
	if (theYear < 2000)
    	theYear += 1900;
	if (document.getElementById("jsdate"))
		document.getElementById("jsdate").innerHTML = "Today's Date is " + monthNames[now.getMonth()] + " " + now.getDate() + ", " + theYear;
	else if (document.getElementById("jsdate"))
		document.getElementById("jsdate").innerHTML = "Today's Date is " + now.getDate() + " " + monthNames[now.getMonth()] + " " + theYear;

if (document.getElementById("bodyhome") && document.getElementById("h-photo")) homePhoto();
initImage();
}



function homePhoto() {
	var ph = genRand(4);
	var phbg = document.getElementById("h-photo");
	var title = document.getElementById("tag");
	phbg.style.backgroundImage = "url(img/h-photo" + ph + ".jpg)";
	title.style.backgroundImage = "url(img/h-tagline" + ph + ".gif)";
}

function genRand(x) {
 var range = x;
 return Math.floor(Math.random() * range) + 1;
}

window.onload = initDate;
