﻿function flAnim(IdOggetto,Url,Stile,MaxAttesa){
	document.write( ''
	+'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
	+'style="'+Stile+'"'
	+'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+IdOggetto+'" >'
	+'<param name="movie" value="'+Url+'" >'
	+'<param name="quality" value="best" >'
	+'<param name="wmode" value="transparent">'
	+'<param name="play" value="false">'
	+'<param name="loop" value="false">'
	+'<param name="allowScriptAccess" value="sameDomain">'
	+'<embed style="'+Stile+'" src="'+Url+'" quality="best" id="'+IdOggetto+'" play="true" loop="false" wmode="transparent" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">'
	+'<\/embed>'
	+'<\/object>'
	+'');
	var flAnim_int = 0
	var This=this
	this.Avvio = function (){
		var flPlugin = false
		try{
			var s = document.getElementById(IdOggetto).GetVariable('$version').split(" ")
			var s1 = s[s.length-1].split(",")
			if (s1[0]*1>=7){flPlugin=true}
		}catch(e){}	
		if(flPlugin==true){
			document.getElementById(IdOggetto).play();
			flAnim_int=setInterval(flAnim_contr,50);
		}else{}
	}
	function flAnim_contr(){
		if (document.getElementById(IdOggetto).IsPlaying()==false){clearInterval(flAnim_int);This.Arresto()}
	}
	setTimeout(ArrestoForzato,MaxAttesa)
	function ArrestoForzato(){This.Arresto()}
	this.Arresto = function (){}

}

