<!--
//	script_common.js contains JavaScript functions used by
//	the Taylor Statten Camping Bursary Fund site.
//	Created by David Shapiro 2006-04-18
//	Updated to move the menu out 2006-04-22 22:44:56
//	Updated for webmaster e-mail address 2006-09-13 10:57:10
//	****************************************
//	globally establish the calling document's lastModified date
	var lm = new Date(document.lastModified);
	var ludate = formatDate(lm);
// ****************************************
//	"formatDate" takes a date object and formats it as yyyy-mm-dd hh:mm:ss
//	Syntax: formatDate(date_object);
//		script by Bernhard Friedrich; should work in all browsers
//		adapted by David Shapiro 2000-02-13 10:28:45
function formatDate(a){
	year=a.getYear();year=((year<1000)?((year<70)?2000:1900):0)+year;
	month=a.getMonth()+1;month=((month<10)?'0':'')+month;
	day=a.getDate();day=((day<10)?'0':'')+day;
	hour=a.getHours();hour=((hour<10)?'0':'')+hour;
	minute=a.getMinutes();minute=((minute<10)?'0':'')+minute;
	second=a.getSeconds();second=((second<10)?'0':'')+second;
	var formatted_date = "";
	formatted_date += year+'-'+month+'-'+day+' '+hour+':'+minute+':'+second; 
	return formatted_date;
}
// ****************************************
//	Construct an e-mail call, not easily crawled by web spiders
//	usage: contact('left','right','tld','subj','link')
function contact(left,right,tld,subj,link) {
	text=(link)?link:left+'&#64;'+right+'.'+tld;
	var line='<a href="mailto:'+left+'&#64;'+right+'.'+tld+'?subject='+subj+'">'+text+'<\/a>';
	document.write(line);
}
// ****************************************
//	"pageFooter" displays a bottom of page message:
//			- request for feedback to the webmaster
//			- Copyright information.
//		If the "updated" parameter is passed,
//			it will also output a standard string
//			of last-modified date and time.
//	Syntax: pageFooter("updated");
//		by David Shapiro 2006-04-17 16:25:20
function pageFooter(updated){
	var domain_name = "www.tscbf.com";
	var slashBeforeFile = document.location.pathname.substring(1).indexOf("/");
	var file_name = document.location.pathname.substring(slashBeforeFile+1);
	var whole_name = file_name
	var copyyear = ludate.substring(0,4);
	var footer = "";
	footer += '<table width="100%" border="0" cellspacing="0" cellpadding="3" bgcolor="#f0f0f0"><tr><td class="footer">';
	footer += 'The URL of this page is '+domain_name+whole_name;
	footer += '<br>Please report any problems with this page to the <a href="mailto:webmaster@tscbf.com?subject=Problem report for page '+domain_name+whole_name+' version '+ludate+'">webmaster</a>.';
	footer += '<br>Copyright &copy;&nbsp;'+copyyear+'&nbsp;Taylor Statten Camping Bursary Fund.';
	footer += '&nbsp;All rights reserved.';
	if (updated == 'updated') {
		footer += '&nbsp;<i>Last updated&nbsp;:&nbsp;'+ludate+"</i>";
	}
	footer += '</td></tr></table>';
	document.write(footer);
}
//	****************************************
// -->
