function creaheader(){
codice ='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="900" height="180" id="header" align="middle">'
+'<param name="allowScriptAccess" value="sameDomain" />'
+'<param name="allowFullScreen" value="false" />'
+'<param name="movie" value="g/cozzaro.swf" />'
+'<param name="quality" value="high" />'
+'<param name="bgcolor" value="#680000" />'
+'<embed src="g/cozzaro.swf" quality="high" bgcolor="#680000" width="900" height="180" name="header" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />'
+'</object>';
document.getElementById('header').innerHTML=codice;
}
function creapres(){
codice='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" id="pres" width="640" height="200">'
+'<param name="movie" value="g/pres.swf"><param name="quality" value="high"><param name="allowscriptaccess" value="samedomain">'
+'<embed type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" name="pres" width="640" height="200" src="g/pres.swf" quality="high" allowscriptaccess="samedomain" />'
+'</object>';
document.getElementById('pres').innerHTML=codice;
}
function getX(){return document.documentElement.clientWidth;}
function getY(){if (document.documentElement.clientHeight > document.body.scrollHeight)return document.documentElement.clientHeight;else return document.body.scrollHeight+50;}
function initfoto(){var anchors = document.getElementsByTagName("a");for (var i=0; i<anchors.length; i++) if (anchors[i].getAttribute("href") && (anchors[i].getAttribute("rel") == "foto")) anchors[i].onclick = function () {showfoto(this); return false;}}
function nascondiBox(){document.getElementsByTagName("body").item(0).removeChild(document.getElementById('psfondo'));document.getElementsByTagName("body").item(0).removeChild(document.getElementById('pfoto'));}
function showfoto(url){
	var urlfoto = url;
	sfondo = document.createElement("div");
    sfondo.setAttribute("id","psfondo");
    sfondo.onclick=function (){nascondiBox(); return false;}
    sfondo.style.width=getX()+'px';
    sfondo.style.height=getY()+'px';
    document.getElementsByTagName("body").item(0).appendChild(sfondo);
	foto = document.createElement("img");
	foto.setAttribute("id","pfoto");
	foto.setAttribute("src",""+urlfoto+"");
	foto.onclick=function (){nascondiBox(); return false;}
	document.getElementsByTagName("body").item(0).appendChild(foto);
}
function init() {
	creaheader();
	initfoto();
}
window.onload = init;