// Created by Ian Wetherbee on 1/21/2009 to use the new templating system with the old function definitionsheader_file = "/javascripts/menu.html"footer_file = "/javascripts/footer.php"function echo_file(file, tag) {	new Ajax.Request(file,		{method: 'get',		onSuccess: function(trans) {replacetext(tag, trans.responseText)},		onFailure: function(){alert('Something went wrong getting header/footer');}	});}// Return html for rotating image masthead and sidebar navigation// set placeholder// start request// finish request// replace text// render

//Header:
header_text = '<div id="AJAX_HEADER">Header<div><div>'

//Footer:
footer_text = '</div></div>Footer</div><!--AJAX_FOOTER-->'

function lstemplate_top () {	echo_file(header_file, header_text);	return header_text}// Return html for content closing, footer and credits.function lstemplate_bot(updatedate) {	echo_file(footer_file, footer_text);	return footer_text}function replacetext(tag, text) {	body=document.getElementsByTagName('body')[0];
	bodytext = body.innerHTML;
	replaced = bodytext.replace(tag, text);
	body.innerHTML = replaced;}