// inc_common.js


/*******************************************************************
NN_reloadPage
Reloads the window content if the window is resized in Netscape v4
*******************************************************************/
function NN_reloadPage(init) {  //reloads the window if Nav4 resized
	if(!top.bwsr) bwsr = new Browser();
	else bwsr = top.bwsr;

	if (init==true) {
		if (bwsr.nav4) {
			document.NN_pgW=innerWidth;
			document.NN_pgH=innerHeight;
			onresize=NN_reloadPage;
		}
	} else if (innerWidth!=document.NN_pgW || innerHeight!=document.NN_pgH)
		location.reload();
}
NN_reloadPage(true);



/*******************************************************************
openPopup  &  closePopup  &  jumpToPage
Funcitons to control navigation between popups and the parent
window.
*******************************************************************/
function openPopup(url, wd, ht, winname) {

	if(!top.bwsr) bwsr = new Browser();
	else bwsr = top.bwsr;

	if (wd == undefined || wd > screen.width) wd = screen.width;
	if (ht == undefined || ht > screen.height) ht = screen.height;

	x = ((wd+50 > screen.width) ? Math.round((screen.width - wd) / 2) : 50);
	y = ((ht+200 > screen.height) ? Math.round((screen.height - ht) / 2) : 200);

//	var winOptions = "titlebar=yes,location=yes,menubar=yes,status=no,toolbar=yes,resizable=yes,scrollbars=yes";
	var winOptions = "titlebar=yes,location=no,menubar=no,status=no,toolbar=no,resizable=yes,scrollbars=yes";

	if (bwsr.platform != "hpux10"){winOptions += ",dependent";}
	if (bwsr.nav4) winOptions += ",screenX="+x+",screenY="+y+",outerHeight="+ht+",outerWidth="+wd;
	if (!bwsr.nav4)  winOptions += ",left="+x+",top="+y+",height="+ht+",width="+wd;

    parent.popupWin = window.open(url, winname, winOptions);
}

/*
function closePopup() {
	url = location.href;
	self.close();
}
*/
