function margintop(_flashDIV,_divHeight)
{	_mtop=(viewportHeight()-_divHeight)/2;
	if(_mtop<0){_mtop=0;}
	document.write("<style type=\"text/css\">");
	document.write("div#"+_flashDIV);
	document.write("{	margin-top: "+_mtop+"px;");
	document.write("}");
	document.write("</style>");	
}

function viewportHeight()
{  viewport_h=500;
	if(self.innerHeight) //tutti tranne Explorer
   {   viewport_h=self.innerHeight;
   }
   else if(document.documentElement && document.documentElement.clientHeight) 
   {  viewport_h=document.documentElement.clientHeight; //ie7
   }
   else if(document.documentElement && document.documentElement.offsetHeight) 
   {  viewport_h=document.documentElement.offsetHeight; //ie5 e 6
   }
   else if(document.body)
   {  viewport_h=document.body.clientHeight;
   }
	return viewport_h;
}

function swfc(_div,_swf,_vars,_fVers,_transp,_bg,_w,_h)
{  if(_vars!="false"){_swf+="?"+_vars;}	
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '); 
	document.write('codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+_fVers+',0,0,0" '); 
	document.write('width="'+_w+'" height="'+_h+'" id="'+_div+'" align="middle"><param name="allowScriptAccess" value="sameDomain" />'); 
	document.write('<param name="movie" value="'+_swf+'.swf" /><param name="quality" value="high" /><param name="bgcolor" value="'+_bg+'" />');
	if(_transp=="true"){document.write('<param name="wmode" value="transparent" />');}
	document.write('<embed src="'+_swf+'.swf" quality="high" bgcolor="'+_bg+'" width="'+_w+'" height="'+_h+'" name="'+_div+'" align="middle" ');
	document.write('allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
}function flashobject(){	if (window!=top){top.location.href=location.href;}}
function dswfc(_div,_swf,_vars,_fVers,_transp,_bg,_wh,_risoluzione,_risoluzioni)
{  _w=_h=0;
	if(_risoluzione=="1280")
   {  _w=_wh[0];_h=_wh[1];
      if(_risoluzioni>=100){_swf+="";}
      else if(_risoluzioni>=10){_swf+="_1024";}
      else{_swf+="_800";}
   }
   else if(_risoluzione=="1024")
   {  _w=_wh[2];_h=_wh[3];
      if((_risoluzioni-100)>=10){_swf+="_1024";}
      else if(_risoluzioni>=100){_swf+="";}
      else{_swf+="_800";}
   }
   else if(_risoluzione=="800")
   {  _w=_wh[4];_h=_wh[5];
      if((_risoluzioni-100)==10){_swf+="_1024";}
		else if((_risoluzioni-100)>0){_swf+="_800";}
   }
	swfc(_div,_swf,_vars,_fVers,_transp,_bg,_w,_h);  
}