function SequenceFrame(g,b,i,e,f,c,h,a,d){this.Visible=g;this.Duration=b;this.Effect=i;this.EffectDuration=e;this.Blur=f;this.NewText=c;this.TextSize=h;this.TextColor=a;if(d!=null){this.NewImage=new Image();this.NewImage.src=d}}function AnimatedSequence(a){this.Index=0;this.Frames=new Array();this.HTMLElements=new Array();this.Timer;this.loop=a}var AnimatedSequences=new Array();function CreateAnimatedSequence(a){var b=new AnimatedSequence(a);AnimatedSequences[AnimatedSequences.length]=b;return(AnimatedSequences.length-1)}function AddHTMLElement(d,c){var b;var a=false;for(b=0;b<AnimatedSequences[c].HTMLElements.length;b++){if(AnimatedSequences[c].HTMLElements[b]==d){a=true}}if(!a){AnimatedSequences[c].HTMLElements[AnimatedSequences[c].HTMLElements.length]=d}}function AddFrame(d,f,b,a,e,c){if((b==0)||((b!=0)&&(a<f))){AnimatedSequences[c].Frames[AnimatedSequences[c].Frames.length]=new SequenceFrame(d,f,b,a,e,null,null,null,null)}}function AddStyledTextFrame(f,b,i,d,e,c,g,a,h){if((i==0)||((i!=0)&&(d<b))){AnimatedSequences[h].Frames[AnimatedSequences[h].Frames.length]=new SequenceFrame(f,b,i,d,e,c,g,a,null)}}function AddImageFrame(e,g,c,a,f,b,d){if((c==0)||((c!=0)&&(a<g))){AnimatedSequences[d].Frames[AnimatedSequences[d].Frames.length]=new SequenceFrame(e,g,c,a,f,null,null,null,b)}}function PlaySequence(b){var a;if((AnimatedSequences[b].HTMLElements.length>0)&&(AnimatedSequences[b].Frames.length>0)){if(AnimatedSequences[b].Index==AnimatedSequences[b].Frames.length){if(AnimatedSequences[b].loop==1){return}else{if(AnimatedSequences[b].loop>1){AnimatedSequences[b].loop--}}AnimatedSequences[b].Index=0}if(AnimatedSequences[b].Frames[AnimatedSequences[b].Index].Visible){for(a=0;a<AnimatedSequences[b].HTMLElements.length;a++){if(AnimatedSequences[b].Frames[AnimatedSequences[b].Index].NewImage!=null){document.getElementById(AnimatedSequences[b].HTMLElements[a]).innerHTML="<img src='"+AnimatedSequences[b].Frames[AnimatedSequences[b].Index].NewImage.src+"'>"}else{if(AnimatedSequences[b].Frames[AnimatedSequences[b].Index].NewText!=null){document.getElementById(AnimatedSequences[b].HTMLElements[a]).innerHTML=AnimatedSequences[b].Frames[AnimatedSequences[b].Index].NewText}if(AnimatedSequences[b].Frames[AnimatedSequences[b].Index].TextSize!=null){document.getElementById(AnimatedSequences[b].HTMLElements[a]).style.fontSize=AnimatedSequences[b].Frames[AnimatedSequences[b].Index].TextSize}if(AnimatedSequences[b].Frames[AnimatedSequences[b].Index].TextColor!=null){document.getElementById(AnimatedSequences[b].HTMLElements[a]).style.color=AnimatedSequences[b].Frames[AnimatedSequences[b].Index].TextColor}}FadeIn(AnimatedSequences[b].HTMLElements[a],AnimatedSequences[b].Frames[AnimatedSequences[b].Index].Effect,AnimatedSequences[b].Frames[AnimatedSequences[b].Index].EffectDuration,AnimatedSequences[b].Frames[AnimatedSequences[b].Index].Blur)}AnimatedSequences[b].Timer=setTimeout("PlaySequence("+b+")",AnimatedSequences[b].Frames[AnimatedSequences[b].Index++].Duration)}else{for(a=0;a<AnimatedSequences[b].HTMLElements.length;a++){FadeOut(AnimatedSequences[b].HTMLElements[a],AnimatedSequences[b].Frames[AnimatedSequences[b].Index].Effect,AnimatedSequences[b].Frames[AnimatedSequences[b].Index].EffectDuration,AnimatedSequences[b].Frames[AnimatedSequences[b].Index].Blur)}AnimatedSequences[b].Timer=setTimeout("PlaySequence("+b+")",AnimatedSequences[b].Frames[AnimatedSequences[b].Index++].Duration)}}}function StopSequence(c,b){var a;clearTimeout(AnimatedSequences[b].Timer);AnimatedSequences[b].Index=0;if(c){for(a=0;a<AnimatedSequences[b].HTMLElements.length;a++){FadeIn(AnimatedSequences[b].HTMLElements[a],0,0,0)}}else{for(a=0;a<AnimatedSequences[b].HTMLElements.length;a++){FadeOut(AnimatedSequences[b].HTMLElements[a],0,0,0)}}};