/* external javascript file for my kronometric.ORG website
	started 0907210806
	090508	a script to put up a standard page format with left nav and one content cell
			the data is filled in from the calling body, using access to the HTML DOM
	090606  swapped 'last modified' and 'back to top'
	090718  this file moved to KRONO_NEW for development
	090720 added test for document.write object - this page now contains true/false in pageResult
	090802 reverted empty tags to plain old '>'
*/
// test for document.write object
	var pageResult = true;
	if (document.write && document.getElementById) {

// start page
	document.write ('<table id="t1" class="main" style="padding:8px;">');
	// top of page
	document.write ('<a id="top" name="top"></a>');
	// header row
	document.write	('<tr  id="t1r1"><td id="t1r1c1" class="hdr1">');
	document.write	('<img src="http://kronometric.org/images/page/krono_hdr.jpg" style="width:586px;height:72px" alt="krono_logo">');
	document.write	('</td></tr>');

// title row with the logos and page title + where-at
	document.write	('<tr  id="t1r2"><td id="t1r2c1" class="hdr2">');
	document.write	('<img class="lt"src="http://kronometric.org/images/page/arms.gif" style="width:62px;height:80px" alt="left image">');
	document.write	('<img class="rt"src="http://kronometric.org/images/page/nawcc_logo2.jpg" style="width:112px;height:66px" alt="right image">');
	document.write ('<span id="span01" style="font-weight:bold"></span>'); // empty span filled from body of calling page
// where AT placeholder
	document.write	('<span id="span02" style="font-size:12pt;font-style:normal;"></span>'); // empty span filled from body
	document.write	('</td></tr>');

// MainRow3 one cell with a table in it one row two cells, left =  nav, right = content
	document.write ('<tr id="t1r3"><td id="t1r3c1" class="hdr2"><table id="t2" class="sub"><tr>');
// this is the main nav in the cell at left of the page
	document.write	('<td id="t2r1c1"class="nav"></td>'); // empty nav cell is filled from body

// the content
	document.write ('<td id="t2r1c2" class="cont">');
	document.write ('</td></tr>'); // filled from body

// begin footer
	document.write ('<tr id="t1r4"><td id="t1r4c1">');
	// the 'last modified' routine
	document.write ('<span style="font-size:10pt">Last modified on: '+document.lastModified+'</span>');
	document.write ('</td><td id="t1r4c2">');
	// 'back to top'
	document.write ('<span style="color:#0000FF;font-size:12pt"><a href="#top">back to top</a></span>');
	document.write ('</td></tr>');
	// close out main table
	document.write ('</table>');

// define Site Nav panel as a global variable

var navCell=document.getElementById("t2r1c1"); // the left side panel
var newPara="";


// add the data from the calling page

function addTitle(title) {
document.getElementById("span01").innerHTML=title;
} // end addTitle

function addWhere(where) {
document.getElementById("span02").innerHTML=('<p>'+loc+'</p>');
} //end addWhere


	} // endif document.write
	else {
	pageResult = false;
	}
// end of page

/* end of javascript */

