function getPageSizeWithScroll(){
	if (window.innerHeight && window.scrollMaxY) {// Firefox
		yWithScroll = window.innerHeight + window.scrollMaxY;
		xWithScroll = window.innerWidth + window.scrollMaxX;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		yWithScroll = document.body.scrollHeight;
		xWithScroll = document.body.scrollWidth;
	} else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari
		yWithScroll = document.body.offsetHeight;
		xWithScroll = document.body.offsetWidth;
  	}
	arrayPageSizeWithScroll = new Array(xWithScroll,yWithScroll);
	//alert( 'The height is ' + yWithScroll + ' and the width is ' + xWithScroll );
	//return arrayPageSizeWithScroll;
	return yWithScroll
}

function showf(id) {
	
	var divi;
	var xmlHttp;
	
  try
    {
    // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
    }
  catch (e)
    {
    // Internet Explorer
    try
      {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }
    catch (e)
      {
      try
        {
        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
      catch (e)
        {
        alert("Your browser does not support AJAX!");
        return false;
        }
      }
    }
    xmlHttp.onreadystatechange=function()
      {
      if(xmlHttp.readyState==4)
        {
			var x, divi;
			divi = document.getElementById('foti');
			divi.style.left = (parseInt((screen.width - 770)/2) + 59) + 'px';
			x = document.body.scrollTop;
			if( x>0 )
			{
				x = x - 125;
			}
			divi.style.top = parseInt((screen.height / 2) - 126 + x) + 'px';
			divi.innerHTML = xmlHttp.responseText;
			divi.style.visibility = 'visible';	
        }
      }
	document.getElementById('opac').style.height = parseInt(getPageSizeWithScroll()) + 'px';
	document.getElementById('opac').style.visibility = 'visible';	
    xmlHttp.open('GET','foto.asp?id=' + id,true);
    xmlHttp.send(null);	
}

function fotoc() {
	document.getElementById('foti').style.visibility = 'hidden';
	document.getElementById('opac').style.visibility = 'hidden';
}