// popwin.js
// opens a popup browser window

function popupWindow(sourceFile, windowTitle, 	windowWidth, 	windowHeight)
{
	sourceFile = sourceFile
	
	// set the distance from the upper left corner of the screen
	var windowOffset = 100

	var windowOptions = 
		"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,copyhistory=0";
		
	windowOptions = 
		windowOptions + ",copyhistory=0,resizable=0";
		
	// sizing options	
	windowOptions = 
		windowOptions + ",left=" + windowOffset +
			",top=" + windowOffset+
			",screenX=" + windowOffset +
			",screenY=" + windowOffset;
		

	windowOptions =
		windowOptions +  
		',width=' + windowWidth +
		',height=' + windowHeight;

	windowOptions =
		windowOptions +  
		',innerWidth=' + windowWidth +
		',innerHeight=' + windowHeight;

	window.open(sourceFile,
		windowTitle,
		windowOptions);
}