function dateModified() {
	if(document.lastModified != "") {
		// last modified date in milliseconds since epoch
		lmd = Date.parse(document.lastModified);
		// current date and time
		date = new Date();
		now = date.getTime();
		if (lmd == 0) {
			//alert("opera: not a valid date");
			return "";
		} else if (isNaN(lmd) == true || Math.round(lmd) == 0) {
			//alert("webkit: not a valid date");
			return "";
		} else if ((now-lmd) < 2000) {
			//alert("firefox/ie: not a valid date");
			return "";
		} else {
			//	get lmd in human readable format
			date.setTime(lmd);
			return "Last Updated: " + date;
		}
	} else {
		return ""
	}
}

// keep this function in case a page uses the old footer
function PageLastUpdated(){
	document.write(dateModified() );
}

function copyWrite(){
	var d = new Date();
	document.write("Copyright &copy; " + d.getFullYear() + " School District of Philadelphia. All Rights Reserved");
}

function writeJS(){
	var str='';
	str+='<p>&nbsp;</p>';
	str+='<div id="footer"> ';
	str+='	<div class="widthFix">';
	str+='		<address class="widthFix"> ';
	str+='			<b>The School District of Philadelphia<\/b><br \/> ';
	str+='			440 N. Broad Street<br \/> ';
	str+='			Philadelphia PA 19130<br \/> ';
	str+='			215-400-4000';
	str+='		<\/address> ';
	str+='		<p class="updated"><script type="text/javascript"> {PageLastUpdated();} <\/script><\/p>';
	str+='	<\/div>';
	str+='	<div id="copyright">';		
	str+='		<p class="widthFix"><script type="text/javascript">{copyWrite();}<\/script><\/p> ';
	str+='	<\/div> ';
	str+='<\/div> ';
	document.write(str);
}

writeJS();

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

try {
var pageTracker = _gat._getTracker("UA-15142614-1");
pageTracker._trackPageview();
} catch(err) {}
