//Show different title image depending on URL
function setTitleImg() {
	var docPath = window.location.pathname;
	if (docPath.indexOf("about")>=0 || docPath.indexOf("bio")>=0) {
		document.images["titleImg"].src = "images/aboutUsTitle.jpg";
	}
	else if (docPath.indexOf("archive")>=0) {
		document.images["titleImg"].src = "images/archiveTitle.jpg";
	}
	else if (docPath.indexOf("bulletin")>=0) {
		document.images["titleImg"].src = "images/bulletinTitle.jpg";
	}
	else if (docPath.indexOf("comments")>=0) {
		document.images["titleImg"].src = "images/commentsTitle.jpg";
	}
	else if (docPath.indexOf("getInvolved")>=0) {
		document.images["titleImg"].src = "images/involveTitle.jpg";
	}
	else if (docPath.indexOf("news")>=0) {
		document.images["titleImg"].src = "images/newsTitle.jpg";
	}
	else if (docPath.indexOf("search")>=0) {
		document.images["titleImg"].src = "images/searchTitle.jpg";
	}
	else if (docPath.indexOf("resources")>=0) {
		document.images["titleImg"].src = "images/resourcesTitle.jpg";
	}
}

function displayLink() {
	//first 9 char: /archive_
	var beginIndex = 9 + location.pathname.lastIndexOf("/");
	var yyyy = "20" + location.pathname.substring(beginIndex, beginIndex+2);
	var mm = location.pathname.substring(beginIndex+2, beginIndex+4);
	var dd = location.pathname.substring(beginIndex+4, beginIndex+6);

	if (mm.substring(0,1)=="0") {
		mm = mm.substr(1);
	}
	mm = mm-1;

	if (dd.substring(0,1)=="0") {
		dd = dd.substr(1);
	}

	var today = new Date();
	var showDate = new Date(yyyy,mm,dd);
	if (today > showDate && (today.getMonth()>showDate.getMonth() || today.getDate()>showDate.getDate()) && document.getElementById("aLink")!=null) {
		document.getElementById("aLink").style.display = "inline";
	}
}

<!-- dropdown menu support for IE-->
function expand(obj) {
	obj.className += " over";
}
function collaps(obj) {
	obj.className = obj.className.replace(" over", "");
}


