function nw(oFile,wWidth,wHeight)
{
	var cWidth=window.screen.width;
	var cHeight=window.screen.height;
	if(cHeight && cWidth){
		var leftOffset=Math.ceil((cWidth-wWidth)/2);
		var topOffset=Math.ceil((cHeight-wHeight)/2);
		var a=window.open(oFile, set_name(oFile), 'width='+wWidth+',height='+wHeight+',top='+topOffset+',left=' + leftOffset);
		a.focus();
	}
	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!='=') new_str+=my_char;
	}
	return new_str;
}

function showPic( name, w, h ) {
	var sb;
	if(w>(screen.width-100)) { sb='yes'; ww=screen.width-100; } else { sb='no'; ww=w; }
	if(h>(screen.height-100)) { sb='yes'; wh=screen.height-100; } else { sb='no'; wh=h; }
	pic = window.open( '', 'picWindow', 'width=' + ww + ',height=' + wh + ',scrollbars=' + sb );
	pic.document.open();
	pic.document.write( "<HTML><HEAD><SCRIPT>window.focus();</SCRIPT></HEAD><BODY LEFTMARGIN=\"0\" TOPMARGIN=\"0\" MARGINHEIGHT=\"0\" MARGINWIDTH=\"0\"><table border=0 cellpadding=0 cellspacing=0><tr><td><IMG SRC=\"" + name + "\" WIDTH=\"" + w + "\" HEIGHT=\"" + h + "\" ALT=\"" + name + " (" + w + "x" + h + ")\"></td></tr></table></BODY></HTML>" );
	pic.document.close();
}

