  var pv_id = "";
  var pv_w = 1;
  var pv_height = 0;
  var_pv_width = 0;
  var pv_top = 230;
  var pv_oMask = "";
  var pv_oImage = "";
  function showPhoto(id) {
    pv_id = id;
    pv_w = 1;
    pv_oImage = pv_getObject("pv_image");
    pv_oImage.style.display = 'none';
    pv_oImage.src = "new_img/spacer.png";
    pv_oImage.src = "image.php?id="+id+"&s=la";

    pv_oContents = pv_getObject("pv_contents");
    
    pv_oMask = pv_getObject("pv_mask");
    pv_oMask.style.display = 'block';
    pv_oMask.style.width = "1%";
    pv_setWindowSize();
    pv_oMask.style.height = (pv_height - pv_top) + "px";
    pv_oMask.style.top = pv_top + "px";
    pv_oMask.style.left = "50%";
    window.setTimeout(pv_growMask,100);
  }
  function hidePhoto(id) {
    pv_oMask.style.display = 'none';
    pv_oContents.style.display = 'none';
  }
  function pv_growMask() {
    pv_w = (50 + pv_w*1/2);
    pv_oMask.style.width = pv_w + "%";
    pv_oMask.style.left = (50 - pv_w/2) + "%";
    if(pv_w < 95) window.setTimeout(pv_growMask,100);
    else {
      pv_w = 100;
      pv_oMask.style.width = pv_w + "%";
      pv_oMask.style.left = (50 - pv_w/2) + "%";
      pv_oContents.style.left = pv_oMask.style.left;
      pv_oContents.style.width = pv_oMask.style.width;
      pv_oContents.style.top = pv_oMask.style.top;
      pv_oContents.style.height = pv_oMask.style.height;
      setPhoto();
    }
  }
  function setPhoto() {
    pv_oContents.style.display = 'block';
    pv_oImage.style.display = 'inline';
    pv_oImage.style.height = (pv_vpHeight*1 - 30 - pv_top) + "px";
  }
  function pv_setWindowSize() {
    var x,y;
    if (self.innerHeight) // all except Explorer
    {
    	x = self.innerWidth;
    	y = self.innerHeight;
    }
    else if (document.documentElement && document.documentElement.clientHeight)
    	// Explorer 6 Strict Mode
    {
    	x = document.documentElement.clientWidth;
    	y = document.documentElement.clientHeight;
    }
    else if (document.body) // other Explorers
    {
    	x = document.body.clientWidth;
    	y = document.body.clientHeight;
    }
    var temp_var = pv_getObject("pv_layer");
    pv_vpHeight = y;
    pv_height = Math.max(temp_var.scrollHeight, y);
    pv_width = x;
  }
  
  function pv_getObject(id, oParent) {
		if(!oParent) oParent = document;
		if (oParent.getElementById) {
			elem = oParent.getElementById(id);
		} else if (oParent.layers) {
			elem = oParent.layers(id);
		} else {
			elem = oParent.all(id);
		}
		return elem;
	}