var NS = (navigator.appName=="Netscape")?true:false; 
function FitPic() { 
iWidth = (NS)?window.innerWidth:document.body.clientWidth; 
iHeight = (NS)?window.innerHeight:document.body.clientHeight; 
iWidth = document.images[0].width - iWidth; 
iHeight = document.images[0].height - iHeight; 
window.resizeBy(iWidth, iHeight); 
self.focus(); 
} 

function PopupPic(sPicURL) { 
  newWin=window.open( sPicURL, 'newWin', 
  'resizable=0,HEIGHT=500,WIDTH=500'); 
  newWin.focus(); 
} 

function NewWindow(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
	win = window.open(mypage, myname, winprops)
		if (parseInt(navigator.appVersion) >= 4) { win.window.focus();
		}
}