<!-- HIDE FROM INCOMPATIBLE BROWSERS

/*
*	Action K9 JavaScript Code Snippets
*
*	By: Tammy C. Wilson, Agile Web Development
*	2/3/08
*/

function dateMod() {
/* Before we do anything make sure JavaScript is supported and the appropriate div exists */
	if (!document.getElementById) return false;
	if (!document.getElementById("footer")) return false;

	var days = new Array(7);
	days[0] = "Sunday";
	days[1] = "Monday";
	days[2] = "Tuesday";
	days[3] = "Wednesday";
	days[4] = "Thursday";
	days[5] = "Friday";
	days[6] = "Saturday";

	var months = new Array(12);
	months[0] = "January";
	months[1] = "February";
	months[2] = "March";
	months[3] = "April";
	months[4] = "May";
	months[5] = "June";
	months[6] = "July";
	months[7] = "August";
	months[8] = "September";
	months[9] = "October";
	months[10] = "November";
	months[11] = "December";

/* Get the date this page was last modified and pretty up the format */
	var dateObj = new Date(document.lastModified);
	var wday = days[dateObj.getDay()];
	var lmonth = months[dateObj.getMonth()];
	var date = dateObj.getDate();
	var fyear = dateObj.getFullYear();
	var lastMod = "Last Modified: " + wday + ", " + lmonth + " " + date + ", " + fyear;

/* Add a new paragraph to the pages footer div */
	var footerDiv = document.getElementById('footer');
	var para = document.createElement("p");
	footerDiv.appendChild(para);

/* Add the last modified text to the new paragraph node */
	var txt = document.createTextNode(lastMod);
	para.appendChild(txt);
}

/* This function is courtsey of: http://www.sitepoint.com/article/standards-compliant-world
It opens links marked external in a new Window. Use with PDF's and external websites */

function externalLinks() {
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
		var anchor = anchors[i];
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")
			anchor.target = "_blank";
		}
}

/* This function is courtsey of: http://www.sitepoint.com/blogs/2004/05/26/closures-and-executing-javascript-on-page-load/ */
/* It adds functions to the onload event, without screwing up any previous onload events */

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

addLoadEvent(dateMod);
addLoadEvent(externalLinks);

// STOP HIDING FROM INCOMPATIBLE BROWSERS -->