/*******************************
Short functions to handle news
items in the news display pages.
********************************/

function LoadMary(maryindex) {
	var itemname = "mary/mary" + nws_sht[maryindex] + ".htm";

	var mary = frames['maryframe'];
	//mary.location.href = itemname;

        mary.location.replace(itemname);

}


function ShowMary() {

	var mary = frames['maryframe'];

	divitem=document.getElementById('maryitem');
	divitem.innerHTML = mary.document.body.innerHTML;

}
		
// this allows dynamic updating of the right-hand image list
// based on the contents of the news item arrays from the page header
function MaryLister(){
	for (var index = nws_sht.length-1; index >= 0; --index) {
		document.write("<p align='center'><a href='#top'><img onclick='LoadMary(");
		document.write(index);
		document.write(") ' alt='");
		document.write(nws_tip[index]);
		document.write("' src='");
		var im = "mary/marymail.jpg" 
		document.write(im);
		document.write("' height='22' width='32' border='0'></a><br>");
		document.write(nws_lng[index]);
		document.write("</p>");
	}
}


//	var lyr = document.getElementById("maryitem");
//	lyr.src = frames['maryframe'].document.body.innerhtml;
//	lyr.target = "_self";

