﻿function showPhoto(id){
	
	document.getElementById('frame').innerHTML = "<img src='base/photos/original/" + id + ".jpg' onclick='hidePhoto()'>";
	document.getElementById('frame').style.display = "block";

	framemove()
}

function framemove(){
	docwidth = document.width;
	
	width = document.getElementById('frame').offsetWidth;
	left = (docwidth - width) / 2;
//	document.getElementById('frame').style.left = left;
	
}

function hidePhoto(){
//alert(left + " docwidth^" + docwidth + " width^" + width);
	document.getElementById('frame').style.display = "none";
}

function showHide(id) {//функция показа\скрытия блоков
	  if (document.getElementById(id).style.visibility == "visible"){
	    document.getElementById(id).style.visibility = "hidden";
		document.getElementById(id).style.display = "none";
	  }else{
	    document.getElementById(id).style.visibility = "visible";
		document.getElementById(id).style.display = "inline";
		}
}

function ida(id){ return document.getElementById(id);}
function sh(id)
{
	if(ida(id).style.display == "none") ida(id).style.display = "block";
	else ida(id).style.display = "none";
}
