var popupwin;
function popupWindow(popupURL,windowName,width,height)
{
	// open the popup window
  	var popupDetails = 'width='+width+',height='+height;
	
	// set default window attributes if not specified
	if (arguments[4]) {
		popupDetails += ','+arguments[4];
	}

	// open popup window
	popupwin=window.open(popupURL,windowName,popupDetails);

	// set the opener if it's not already set.  
	if( navigator.appName.substring(0,8) == "Netscape" )
	{
		popupwin.location = popupURL;
	}
	
	// set focus to popup
	if (window.focus) {popupwin.focus()}
}