function nw(oFile,wWidth,wHeight,noReturn)
{
	var cWidth=window.screen.width;
	var cHeight=window.screen.height;
	var scrollbars='no';
	
	if(wWidth>cWidth || wHeight>cHeight){
		if(wWidth>cWidth) wWidth=cWidth;
		if(wHeight>cHeight) {wHeight=cHeight-200; wWidth=parseInt(wWidth); wWidth+=20;}
		scrollbars='yes';
	}
	
	if(cHeight && cWidth){
		var leftOffset=Math.ceil((cWidth-wWidth)/2);
		var topOffset=Math.ceil((cHeight-wHeight)/2)-20;
		var a=window.open(oFile, set_name(oFile), 'width='+wWidth+',height='+wHeight+',top='+topOffset+',left=' + leftOffset + ',scrollbars=' + scrollbars);
		a.focus();
	}
	if(noReturn==null) return false;
}

function nWindow(oFile,wWidth,wHeight,noReturn)
{
	var cWidth=window.screen.width;
	var cHeight=window.screen.height;
	var scrollbars='no';
	
	if(wWidth>cWidth || wHeight>cHeight){
		if(wWidth>cWidth) wWidth=cWidth;
		if(wHeight>cHeight) {wHeight=cHeight-200; wWidth=parseInt(wWidth); wWidth+=20;}
		scrollbars='yes';
	}
	
	if(cHeight && cWidth){
		var leftOffset=Math.ceil((cWidth-wWidth)/2);
		var topOffset=Math.ceil((cHeight-wHeight)/2)-20;
		var a=window.open(oFile, set_name(oFile), 'width='+wWidth+',height='+wHeight+',top='+topOffset+',left=' + leftOffset + ',scrollbars=' + scrollbars);
		a.focus();
	}
	if(noReturn==null) return false;
}

function set_name(str)
{
	var new_str='';
	var my_char='';
	for(var i=0;i<str.length;i++)
	{
		my_char=str.substr(i,1);
		if(my_char!='/' && my_char!='.' && my_char!='?' && my_char!='=' && my_char!='-') new_str+=my_char;
	}
	return new_str;
}
