<!--

// -----------------------------------------------------------

function footnotes(contID,noteID) {

// This function uses CSS and javascript to render footnotes.
// You can put the footnotes in the body of the text, and the script will render 
// them in a div at the bottom of the page. The footnotes will be numbered and 
// linked automatically. Taken from www.brandspankingnew.net; so thanks to them!
// I've simplified it a little: I removed code to allow the reader to show or hide footnotes.
// In my world, dammit, you're gonna get footnotes whether you want them or not.
// Also modified it so that the within the end notes, clicking the note number will
// return you to the location of that footnote within the text.
// Finally, I added backslashes in the script to avoid choking HTML validators.
//
// For this to work right, you need to include this function in the "onload" event 
// in the body tag. The script also requires two div IDs, which I've called
// "annotated_text" and "footnotes"

	var cont = document.getElementById(contID);
	var noteholder = document.getElementById(noteID);
	var spans = cont.getElementsByTagName("span");
	var notes = 0;
	
	for (i=0;i<spans.length;i++)
	{
		if (spans[i].className == "footnote")
		{
			notes++;
			noteholder.innerHTML += "<div class='footnote'><a name='note"+notes+"'><\/a>" + "<a href='#nlink"+notes+"' title='return to text'>" + notes + "." + "<\/a>  " + spans[i].innerHTML + "<\/div>";
			spans[i].innerHTML = "<a name='nlink"+notes+"' href='#note" + notes + "' title='view footnote'>" + "&nbsp;(" + notes + ")&nbsp;" + "<\/a>";
		}
	}
		
}

// -----------------------------------------------------------
//Functions below open windows of varying size

function openWindow(windowURL) {
	window.name = 'parentWnd';
	newWindow = window.open(windowURL,"Slideshow",'scrollbars=no,resizable=no,width=768,height=512,Status=no');
	newWindow.focus();
}

function openSmWindow(windowURL) {
	window.name = 'parentWnd';
	newWindow = window.open(windowURL,"Cambodia",'scrollbars=no,resizable=no,width=450,height=450,Status=no');
	newWindow.focus();
}

function openLgWindow(windowURL) {
	window.name = 'parentWnd';
	newWindow = window.open(windowURL,"Slideshow",'scrollbars=no,resizable=no,width=800,height=600,Status=no');
	newWindow.focus();
}

function openPcardWindow(windowURL) {
  window.name = 'parentWnd';
  newWindow = window.open(windowURL,"Postcard",'scrollbars,resizable,width=740,height=520,Status="no"');
  newWindow.focus();
}


function openSlideWindow(windowURL) {
	window.name = 'slideWnd';
	slideWindow = window.open(windowURL,"Slideshow",'scrollbars=no,resizable=no,width=900,height=600,Status=no');

	if (typeof(slideWindow)!="object") {
		slideWindow = window.open(windowURL)
	}
	else {
		if (!slideWindow.closed) {
			slideWindow.location.href = windowURL;
		}
		else {
			slideWindow = window.open(windowURL);
		}
	}

	slideWindow.focus();
}


// -----------------------------------------------------------
//Functions below perform image rollover substitions

	btn_nextpic = new Image();
	btn_nextpic.src = "graphics/btn_nextpic_a.gif";

	btn_prevpic = new Image();
	btn_prevpic.src = "graphics/btn_prevpic_a.gif";



//-->

