// 	filename: new_window.js
//	purpose: popup window script for task pages
//	author: hkww, ecos
//	last modified: May 2008
//	external dependencies: included in nucleus pages */ --->

<!-- //begin
// This function opens the specifed URL in a new window, positioned in the right-upper corner of the screen
function new_window(newWinURL,scrollbars,winWidth,winHeight) 
{
	var newWinTitle = 'nucleus'
	var winStats='toolbar=0,location=0,directories=0,menubar=0,resizable=1,dependent=0';
	var xFactor = screen.width - winWidth;
	
 	winStats+=',scrollbars=' +scrollbars +',width='+winWidth+',height='+winHeight;
  	if (navigator.appName.indexOf("Microsoft")>=0) {
      winStats+=',left='+xFactor+',top=0';
    }else{
      winStats+=',screenX='+xFactor +',screenY=0';
    }
 	var new_window_handle=window.open(newWinURL,newWinTitle,winStats);   
	new_window_handle.focus();
	if (!new_window_handle.opener) new_window_handle.opener = self;     
}
// end -->