// JavaScript code for info.deimel.org

// Create global variable for new window
var popWindow;

// Open popup window named of size w x h that displays the page whose name is pgname.
// If such a window is already open, it is first closed to assure a window of the proper size is created.

function popup(pgname,w,h) {

	// Close existing window. This may not work if such a window exists that was not opened from the current window.
	// Actually, this line is useful only for very old browsers because of the lines that follow. (See below.)
	if (typeof(popWindow) != "undefined" && !popWindow.closed){popWindow.close()};

	// Create new window. If the window is not new, its size and position may not be set by this statement,
	// depending upon the browser.
	popWindow = window.open(pgname,"popWin", "resizable=yes,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,top=40,left=40,copyhistory=0,width="+w+",height="+h);

	// Assure proper size, position, and visibility. The top two statements may not work for very old browsers.
	popWindow.resizeTo(w,h);
	popWindow.moveTo(40,40);
	popWindow.focus();

	}
