var SitePrefix = '/dyo';
var lastTableID = 0;
if( window.innerWidth ) {
	document.getElementById('FullImage').style.width = window.innerWidth;
	document.getElementById('FullImage').style.height = window.innerHeight;
} 
else {
	document.getElementById('FullImage').style.width = document.body.clientWidth;
	document.getElementById('FullImage').style.height = document.documentElement.clientHeight;
}

function ShowPicture (URL) {
	var x = SitePrefix + '/CMSPages/GetFile.aspx?guid=' + URL;
	var FI = document.getElementById('FullImage');
	var FITD = document.getElementById('FullImageTD');
	FITD.innerHTML += "<img style='border:4px solid #ED1C24; cursor:pointer;' vspace='2' src='" + x + "' alt='Kapat'>";
	
	if (document.documentElement && document.documentElement.scrollTop)
	theTop = document.documentElement.scrollTop;
	else if (document.body)
	theTop = document.body.scrollTop;
	
	objh = parseFloat(FI.style.height)/2;
	objw = parseFloat(FI.style.width)/2;
	FI.style.top = Math.floor(Math.round((document.documentElement.offsetHeight/2)+theTop)-objh)+'px';
	FI.style.left = Math.floor(Math.round((document.documentElement.offsetWidth/2)+document.body.scrollLeft)-objw)+'px';

	FI.style.display = 'block';
}
function CloseTable(Table) {
	document.getElementById(Table+'TD').innerHTML = '';
	document.getElementById(Table).style.display='none';
}

function openTable(id) {
	if (lastTableID) document.getElementById(lastTableID).style.display = 'none';
	if (lastTableID != id) {
		document.getElementById(id).style.display = 'block';
		lastTableID = id;
	}
	else lastTableID=0;	
}


