function ShowImg(sImgPath, width, height){
	var scroll = 'no';
	var top=0, left=0;
	if(width > screen.width-10 || height > screen.height-28) scroll = 'yes';
	if(height < screen.height-28)	top = Math.floor((screen.height - height)/2-14);
	if(width < screen.width-10) left = Math.floor((screen.width - width)/2);
	width = Math.min(width, screen.width-10);	
	height = Math.min(height, screen.height-28);	
	window.open('/tools/imagepg.php?img='+sImgPath,'','scrollbars='+scroll+',resizable=yes,width='+width+',height='+height+',left='+left+',top='+top);
}
function ShowDoc(sDocPath, width, height, scr){
	if(scr != 'no')scr = 'yes';
	var top, left;
	top = Math.floor((screen.height - height)/2-14);
	left = Math.floor((screen.width - width)/2);
	window.open(sDocPath,'','scrollbars='+scr+',resizable=yes,width='+width+',height='+height+',left='+left+',top='+top);
}
