
<!-- Original:  Nicolas -->
<!-- Web Site:  http://www.javascript-page.com -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

function chkImage(imgId, imgDate, imgAltTxt) {
var imgFile
var imgWidth
var imgHeight
var filePath
var arrDirs
var dirsLvl
var expDate
var expYear
var currDate
if (imgId.toLowerCase() == "n") {
	imgFile = "/library/images/new.gif"
	imgWidth = 31
	imgHeight = 12
}
else {
	if (imgId.toLowerCase() == "u") {
		imgFile = "/library/images/updated.gif"
		imgWidth = 46
		imgHeight = 12
	}
	else {
		return;
	}
}
}
//determine directory level of current file relative to root
//filePath = location.pathname
//arrDirs =filePath.split("/")
//dirsLvl = arrDirs.length
//  *** next if blocks are temporary for local testing only! **
//if (navigator.appName == "Netscape") {
//	dirsLvl = dirsLvl - 2
//}
//if (navigator.appName == "Microsoft Internet Explorer") {
//	dirsLvl = dirsLvl + 2
//}
//while (dirsLvl > 3) {	
//	imgFile = "../" + imgFile
//	dirsLvl--
//}
if (typeof imgAltTxt == "undefined") {
	if (imgId.toLowerCase() == "n") {
		imgAltTxt = "New!"
	}
	else {
		if (imgId.toLowerCase() == "u") {
			imgAltTxt = "Updated!"
		}
	}
}
expDate = new Date(imgDate)
expYear = expDate.getYear()
if (expYear.toString().length < 4) {
	expDate.setFullYear(expYear + 2000)
}
currDate = new Date()
if (expDate.getTime() > currDate.getTime()) {
	document.write('<IMG SRC="' + imgFile + '" WIDTH="' + imgWidth)
	document.write('" HEIGHT="' + imgHeight + '" ALT="' + imgAltTxt + '">')
}
} //  End of chkImage function
