//UTILITY function below  ********************************************
//********************************************************************
function Up(index) {
	if (document.images)
		document.images['nav' + index].src = navimg2[index].src
}

function Down(index) {
	if (document.images)
		document.images['nav' + index].src = navimg1[index].src
}

function hilite(name, source){
	if(document.images)
		document.images[name].src = eval(source +'.src');
}// hilite

var wini; //Reference to a window
function PopWin(url, name, width, height) {
	h = (height) ? height : 500;
	w = (width) ? width : 600;
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings =  'height='+ h +',width='+ w +',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,resizable';
	//if (wini && !wini.closed)
	//		wini.resizeTo(w, h);
	wini = window.open(url,name,settings);
	if (wini)
		wini.focus();
	return ( !wini )
}// PopWin()

function Popper(els) {
	for (var i = 0; i < els.length; i++) {
		if (els[i].className == 'popup') { //Show only 'A' tags with class="popup" within the content pane in a controlled popup window
			if (els[i].target == 'photo') {
				els[i].onclick = function() { return PopWin(this.href, this.target, 650,530); }
			}
			else if (els[i].target == 'journal') {
				els[i].onclick = function() { return PopWin(this.href, this.target, 650,530); }
			}
			else {
				els[i].onclick = function() { return PopWin(this.href, this.target, 500,570); }
			}// if(els[i].target)
		}// if(els[i].className)
	}// for
}// Popper()

//IF defining other Initialization Routines. Call init() before returning to ensure no funtionality is lost, please.
function init(){
	if(document.getElementById && document.getElementsByTagName)
		els = document.getElementById('content').getElementsByTagName('A');
	else if(document.all)
		els = document.all['content'].all.tags('A');
	else	return;
	Popper(els);
}// init()
//window.onload = init;
