var i=0;
function resize() {
  if (navigator.appName == 'Netscape') i=10;
  if (document.images[0]) {
  imgHeight = document.images[0].height+65-i;
  imgWidth = document.images[0].width+30;
  var height = screen.height;
  var width = screen.width;
  var leftpos = width / 2 - imgWidth / 2;
  var toppos = height / 2 - imgHeight / 2; 
  window.moveTo(leftpos, toppos);  
  window.resizeTo(imgWidth, imgHeight);
  }
  self.focus();
}
function popupImage(url, imageHeight, imageWidth) {
	var newImageHeight = (parseInt(imageHeight) + 40);
	var yPos = ((screen.height / 2) - (parseInt(newImageHeight) / 2));
	var xPos = ((screen.width / 2) - (parseInt(imageWidth) / 2));
	imageWindow = window.open(url,'popupImages','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=' + imageWidth + ',height=' + newImageHeight + ',screenY=' + yPos + ',screenX=' + xPos + ',top=' + yPos + ',left=' + xPos);
	imageWindow.moveTo(xPos, yPos);
	imageWindow.resizeTo(parseInt(imageWidth), parseInt(newImageHeight));
	if (window.focus) {
		imageWindow.focus();
	}
}
