function intestazione(){

document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="100%" height="550" id="intro" align="middle">');

document.write('<param name="allowScriptAccess" value="sameDomain" />');

document.write('<param name="movie" value="intro.swf" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#000000" />');

document.write('<embed src="intro.swf" quality="high" scale="noscale" wmode="transparent" bgcolor="#000000" width="100%" height="550" name="intro" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');

document.write('</object>');

}



function intestazione2(){

document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="100%" height="140" id="intro" align="middle">');

document.write('<param name="allowScriptAccess" value="sameDomain" />');

document.write('<param name="movie" value="intestazione.swf" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#000000" />');

document.write('<embed src="intestazione.swf" quality="high" scale="noscale" wmode="transparent" bgcolor="#000000" width="100%" height="140" name="intro" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');

document.write('</object>');

}


function MostraDiv(foto,wd){ 

      // crea il div 

      var aux=document.getElementById("divFoto");

      if(aux==null){

		      var elemento=document.getElementById("body");

		      var divFoto = document.createElement("div"); 

		      divFoto.id = "divFoto"; 

		      divFoto.style.zIndex = 10001;

		      //divFoto.style.width ="510px"; 

		      //divFoto.style.height ="390px"; 

		      divFoto.className="mask2";

		      elemento.appendChild(divFoto);

		      var iframe=document.createElement("iframe");

					iframe.id='divFoto_iframe';

					iframe.className='iframe_window';

					iframe.style.left = divFoto.style.left;

					iframe.style.top = divFoto.style.top;

					iframe.width = divFoto.offsetWidth;

					iframe.height = divFoto.offsetHeight;

					elemento.appendChild(iframe);
					 
					var html='<div style="width:auto;padding:5px;background-color:transparent; border:1px solid white;">';
					html=html+'<table cellpadding="0" cellspacing="0">';
					html=html+'	<tr>';
					html=html+'		<td height="20px" align="right" valign="middle"><span class="foto_x" onclick="NascondiDiv();">CHIUDI</span></td>';
					html=html+'	</tr>';
					html=html+'	<tr>';
					html=html+'		<td><img id="foto" count="0" src="'+foto+'" height="500px" width=\"'+wd+'px\"/></td>';
					html=html+'	</tr>';
					html=html+'</table>';
					html=html+'</div>';
					divFoto.innerHTML=html;
					
					var y=divFoto.offsetWidth;
					
					if (document.all){

		      	divFoto.style.top ="30px";

						divFoto.style.left = (document.body.clientWidth -wd)/ 2+"px";

					}else{

						divFoto.style.top = "30px";

						divFoto.style.left = (window.innerWidth -wd)/ 2+"px";

					} 
		   }
}

function NascondiDiv(){ 

			// rimuove div

			var elemento=document.getElementById("body");

			var divFoto = document.getElementById("divFoto");

			var iframe = document.getElementById("divFoto_iframe");

			elemento.removeChild(divFoto);

			elemento.removeChild(iframe);

}