winWidth = 0
winHeight = 0
screenCenter = 0
glossaryWindow = null
referenceWindow = null
nolcWindow = null
wrapDateStart = "October 28"
wrapDateEnd = "November 4"
wrapDateYear = "2001"
wrapDateFull = "Sunday, " + wrapDateStart + ", through Sunday, " + wrapDateEnd + ", " + wrapDateYear
wrapDateShort = wrapDateStart + " through " + wrapDateEnd
wrapDateDash = wrapDateStart + " - " + wrapDateEnd

if (screen) {
	winWidth = screen.width-220
	winHeight = screen.height-90
	screenCenter = screen.height/2
}
else {
	winWidth = 420
	winHeight = 240
	screenCenter = 240
}

function openGlossary(entry) {
	glossaryWindow = window.open(entry,'glossary','width='+winWidth+',height=125,left=110,top='+screenCenter+',scrollbars=yes')
	glossaryWindow.window.focus()
}

function openReference(pageName) {
	referenceWindow = window.open(pageName,'reference','width='+winWidth+',height='+winHeight+',left=110,top=20,scrollbars=yes')
	referenceWindow.window.focus()
}

function openNolc(pageName) {
	nolcWindow = window.open(pageName,'nolc')
	nolcWindow.window.focus()
}

function openPopup(pageName) {
	popupWindow = window.open(pageName,'popup','width='+winWidth+',height='+winHeight+',left=110,top=20,scrollbars=yes')
	popupWindow.window.focus()
}

function gotoPage(pageName, button, buttonFrame){
	parent.viewer.document.location.href = pageName
	if (buttonFrame == "upper"){
		parent.upper.pressButton(button)
	}
	else if (buttonFrame == "middle"){
		parent.middle.pressButton(button)
	}
	else{
		parent.left.pressButton(button)
	}
}
