function setup() {

//global vars
	var docRef, ctrContentRef;
	var contentAreaH, contentAreaW, contentAreaTop, contentAreaLeft;
	var wWidth = 0;
	var wHeight = 0;
	
// set the reference to the IFRAME and to the 
// white centered box arwa
 	if (document.all){
	docRef = document.all.ifr
	ctrContentRef = document.all.centerContent;
	}
	else{
	docRef = document.getElementById("ifr");
	ctrContentRef = document.getElementById("centerContent");
	}
	
// load content into the IFRAME
	if (docRef){
		docRef.src = initialContent;
	}
	


// 
// Get the center position for the 
// white square (ctrContentRef)
//

 	//get the width and height of thecurrent browser window
	if (document.all) {
		wWidth=document.body.clientWidth;
		wHeight=document.body.clientHeight;
	} 
	else {
		wWidth=window.innerWidth;
		wHeight=window.innerHeight;
	}
	

 	// get the width and height of the content 
	// area; strip out the "px" if it exists
	if (ctrContentRef.style.height.indexOf("px") == -1){
		contentAreaH = ctrContentRef.style.height;
		contentAreaW = ctrContentRef.style.width;
	}
	else{
		contentAreaH = ctrContentRef.style.height.slice(0,ctrContentRef.style.height.length - 2);
		contentAreaW = ctrContentRef.style.width.slice(0,ctrContentRef.style.width.length - 2);
	}

	contentAreaTop = wHeight/2 - (contentAreaH/2)
	contentAreaLeft = wWidth/2 - (contentAreaW/2);
	

	if (contentAreaTop < 75){
		contentAreaTop = 75;
		ctrContentRef.style.top = 75;
	}
	else{
		ctrContentRef.style.top = contentAreaTop;
	}
	
	
	if (contentAreaLeft < 185){
		contentAreaLeft = 185;
		ctrContentRef.style.left = 185;
	}
	else{
		ctrContentRef.style.left = contentAreaLeft;
	}


	
//
// position the IFRAME so it's visible
//
	if (docRef){
		docRef.style.top = scrollTop + contentAreaTop;
		docRef.style.left = scrollLeft + contentAreaLeft;
		docRef.style.width = scrollWidth;
  		docRef.style.height = scrollHeight;
		docRef.style.zIndex = 100;
 	}
  }




/*
	This appears to cause BIG problems with WinNT Netscape4
	Use the following MM stuff instead, having removed 'onresize' from <body>

function doReload(){
window.location.href = window.location.href;
}
*/



function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);




function launchLightbox(){
	window.open('../lightbox/index.php','lightBox','toolbar=no,menubar=no,location=no,directories=no,status=no,scrollbars=no,scrolling=no,resizable=yes,copyhistory=no,width=417,height=377');
}

function showTips(){
	window.open('../search/tips.php','tips','toolbar=no,menubar=no,location=no,directories=no,status=no,scrollbars=no,scrolling=no,resizable=yes,copyhistory=no,width=200,height=225');
}

function swapGraphic(section,a,b){
	document.images[a].src = "../images/" + section + '_' + a + '_' + b + ".gif"
}

function swapGnav(docsubroot,section,a,b){
	document.images[a].src = docsubroot + "../images/" + section + '_' + a + '_' + b + ".gif"
}

function swapDbGnav(relUp, section, a, b) {
	document.images[a].src = relUp + "../images/db_gnav/" +
		section + '_' + a + '_' + b + ".gif"
}

