function popup(image, width, height, copyright){
  /*var theImage = new Image();
  theImage.src = image;
  var height = theImage.height;
  var width = theImage.width;

  width+=100;
  height+=200;*/
	height=(height*100)/100;
/* 	height=height+20; */

  var windowMarkup = '<html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" href="/css/universal.css" type="text/css" media="screen">><link rel="stylesheet" href="/css/hogwood_07.css" type="text/css" media="screen"><title>Hogwood Gallery Image</title></head><body class="popup"><div class="popupImage"><img class="galleryimage" src="'+image+'" \><div class="clearboth popupFooter"> © '+copyright+'</div></div></body>';
  cuteLittleWindow = window.open('', image, "location=0,scrollbars=auto, width="+width+", height="+height+"");
  cuteLittleWindow.document.write(windowMarkup);
  //cuteLittleWindow.document.write('<div style="font-size: 9px; padding-left: 40px; padding-right: 40px; padding-top: 40px; padding-bottom: 100px; position: absolute; width: 100%; height: 100%; z-index: 1; left:0px; top:0px"><table cellpadding="0" cellspacing="0" width="100%" height="100%"><tr><td align="center"><img id="IMG" onload="window.resizeTo(this.width+10,this.height+100);" src="'+image+'"><br /><p style="font-size:9px; font-face: Verdana"> © '+copyright+'</p></td></tr></table></div>');
}

function popupUrl(image, width, height, copyright) {
	URL="/gallery/viewer.php?image="+image+"&copyright="+copyright;
	winref=window.open(URL,"Title","status=no,location=no, menubar=no,toolbar=no,directories=no,resizable=no, scrollbars=no,width="+width+",height="+height+",");
}