function date_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 "&nbsp;";
	} else if (isNaN(lmd) == true) {
		//alert("webkit: not a valid date");
		return "&nbsp;";
	} else if ((now-lmd) < 2000) {
		//alert("firefox/ie: not a valid date");
		return "&nbsp;";
	} else {
		//	get lmd in human readable format
		date.setTime(lmd);
		return "Last Updated: " + date;
	}
}

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

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 language="JavaScript"> {PageLastUpdated();} <\/script><\/p>';
	str+='	<\/div>';
	str+='	<div id="copyright">';		
	str+='		<p class="widthFix">Copyright &copy; 2009 School District of Philadelphia. All Rights Reserved.<\/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) {}

