function openWin(sName,sQuery,iWidth,iHeight,iScrolls)
{
// opens a new browser window
// parameters:
// - unique window name
// - a querystring (optional)
// - width of the window
// - height of the window
// - flag to switch scrolling on/off
	
	var iLeft = 100;
	var iLocate = 0;
	var iResize = 0;
	var iTop = 100;
	var sLocation;
	
	sLocation = '/generic/openwin.asp?id=' + sName
	
	switch(sName)
	{
		case 'image':
			// added functionality if pop window
			// contains an enlarged image
			sLocation = sLocation + '&path=' + sQuery;
			break

		default:
			sLocation = sLocation + sQuery;
			break
	}
	
	window.open(sLocation,sName,
	'left=' + iLeft +
	',width=' + iWidth +
	',height=' + iHeight +
	',location=' + iLocate +
	',resizable=' + iResize +
	',scrollbars=' + iScrolls +
	',top=' + iTop);
}

function fitImage()
{
// resizes a browser window based on the size of an image
	
	var NS = (navigator.appName=="Netscape")?true:false;
	
	// find the browser's window width and height (depending on the browser)
	iWidth = (NS)?window.innerWidth:document.body.clientWidth;
	iHeight = (NS)?window.innerHeight:document.body.clientHeight;
	
	// access the document's image collection and collect the image properties
	// subtract the initial browser width/height from the actual image width/height
	iWidth = document.images[0].width - iWidth;
	iHeight = document.images[0].height - iHeight;
	
	// add 20px to the height of the window to allow for a close window
	// link at the bottom of the window
	iHeight = iHeight + 20
	
	// add a bit more to the height for NS browsers, don't know why, just add it
	// 50px seems to do it
	if(navigator.appName=="Netscape")
	{
		iHeight = iHeight + 50
	}
	
	// resize the current browser window by the difference calculated above
	window.resizeBy(iWidth, iHeight);
	
	// set as main focus
	self.focus();
}

function JumpMenu(targ,selObj,restore)
{
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	if (restore) selObj.selectedIndex=0;
}