
function photopopup(url) {
  width = 300;
  height = 300;
	winname = "photo_popup";
  var top = 0;
  var left = (screen.width-width) / 2 ;
  var win_arg = "scrollbars=no,status=no,location=no,toolbar=no,resizable=yes,width=" + width + ",height=" + height + ",top=" + top + ",left=" + left;
  window.open(url, winname, win_arg);
}

function photopopup2(url) {
  width = 800;
  height = 640;
	winname = "photo_popup";
  var top = 0;
  var left = (screen.width-width) / 2 ;
  var win_arg = "scrollbars=no,status=no,location=no,toolbar=no,resizable=yes,width=" + width + ",height=" + height + ",top=" + top + ",left=" + left;
  window.open(url, winname, win_arg);
}

function ShowLayer(divname) {
	whichDog = eval("document.all.fload");
	whichDog.style.visibility="hidden";
	whichDog = eval("document.all."+divname);
	whichDog.style.visibility="visible";
	img = eval("document.all.mimage");
	w = img.width;
	h = img.height;
	if (h > w) {
		if ((screen.height < 768) && h > 600) {
			ratio = w/h;
			h = 500;
			w = parseInt(h*ratio);
			img.height = h;
			img.width = w;
		}
	}
	var left = (screen.width-(w+80)) / 2 ;
	self.moveTo(left, 0);
	self.resizeTo(w+80, h+120);
}
