function newWindow(file,window,opts,$width,$height) {
	 var $left = (screen.width - $width) / 2;
     var $top = (screen.height - $height) / 2;
     var $options = opts+',width='+$width+',height='+$height+',top='+$top+',left='+$left;	 
     msgWindow=open(file,window,$options);
     if (msgWindow.opener == null) msgWindow.opener = self;
}	 