// JavaScript Document
function getPageSizeWithScroll(){
	if( window.innerHeight && window.scrollMaxY ) // Firefox 
		{
			pageWidth = window.innerWidth + window.scrollMaxX;
			pageHeight = window.innerHeight + window.scrollMaxY;
		}
	else if( document.body.scrollHeight > document.body.offsetHeight ) // all but Explorer Mac
		{
			pageWidth = document.body.scrollWidth;
			pageHeight = document.body.scrollHeight;
		}
	else // works in Explorer 6 Strict, Mozilla (not FF) and Safari
		{ 
			pageWidth = document.body.offsetWidth + document.body.offsetLeft; 
			pageHeight = document.body.offsetHeight + document.body.offsetTop; 
		}
	arrayPageSizeWithScroll = new Array(pageWidth,pageHeight);
	//alert( 'The height is ' + pageWidth + ' and the width is ' + pageHeight );
	return arrayPageSizeWithScroll;
}


function openPopUpNews(anno,immagine,citta,luogo,data,risultato,testo)
{
	var altezza = getPageSizeWithScroll();

	var trgScheda = document.getElementById("popUpNews");
	var trgLayer =document.getElementById("backPopUpNews");

	trgScheda.style.visibility = "visible";
	trgLayer.style.visibility = "visible";
	trgLayer.style.height = altezza[1]+"px";

	document.getElementById('scheda-anno').innerHTML = anno;
	document.getElementById('scheda-anno-bis').innerHTML = anno;
	document.getElementById('scheda-foto').src = immagine;
	document.getElementById('scheda-citta').innerHTML = citta;
	document.getElementById('scheda-luogo').innerHTML = luogo;
	document.getElementById('scheda-data').innerHTML = data;
	document.getElementById('scheda-risultato-dett').innerHTML = risultato;
	document.getElementById('scheda-testo').innerHTML = testo;
}

function closePopUpNews()
{
	var trgScheda = document.getElementById("popUpNews");
	var trgLayer = document.getElementById("backPopUpNews");
	trgScheda.style.visibility = "hidden";
	trgLayer.style.visibility = "hidden";
}