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();
}


var newWindow;

function openPlainWin(thisURL,winName,winWidth,winHeight,xPos,yPos) {
	if (!newWindow || newWindow.closed) {
		winOpts = "width=" + winWidth + ",height=" + winHeight + ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes";
		if (xPos != "") winOpts += ",screenX=" + xPos + ",left=" + xPos;
		if (yPos != "") winOpts += ",screenY=" + yPos + ",top=" + yPos;
		newWindow = window.open("",winName,winOpts);
		newWindow.location.href = thisURL;
		if (!newWindow.opener) newWindow.opener = window;
	}
  else {
    // window's already open; bring to front
    newWindow.focus();
    newWindow.location.href = thisURL;
  }
}

function openHTML(whichShow,theSrc,windowName,imgWidth,imgHeight,imgTitle) {
	newPage = "/lib/showimg_" + whichShow + ".php?i=" + escape(theSrc);
	newPage += "&w=" + escape(imgWidth);
	newPage += "&h=" + escape(imgHeight);
	newPage += "&t=" + escape(imgTitle);
	newWindow = window.open(newPage, windowName,"toolbar=no,location=0,width=" + eval(parseInt(imgWidth) + 40) + ",height=" + eval(parseInt(imgHeight) + 65) + ",directories=no,status=no,scrollbars=no,resizable=yes,menubar=no");
}

//Initialization
MM_reloadPage(true);
