﻿if (!window.iteliosHeader)
	window.iteliosHeader = {};

iteliosHeader.Scene = function() 
{
}

iteliosHeader.Scene.prototype =
{
	handleLoad: function(plugIn, userContext, rootElement) 
	{
	
	   
	    this.plugIn = plugIn;
	    
	    var sl = rootElement.getHost();
	     
	    MainCanvas=rootElement.findName("MainCanvas");
	    
	    rootElement.findName("textBlock_header").Text=text_anim;
	    
	    
	    var downloader = sl.createObject("downloader");
	
	    downloader.addEventListener("Completed", Silverlight.createDelegate(this, this.CompletedFont));
	    downloader.open("GET", "GOTHIC.TTF");
        downloader.send();
    },
    
    
    CompletedFont: function(rootElement, eventArgs)
	{
	    var ObjXaml=rootElement.findName("textBlock_header");
        ObjXaml.setFontSource(rootElement);
        ObjXaml.fontFamily = "Century Gothic";
        ObjXaml.Visibility="Visible";  
        
        var text_width=ObjXaml.findName("textBlock_header").ActualWidth;    	   
	    
	    rootElement.findName("width_value").Value=630-text_width-20;        
	    rootElement.findName("leftStart").Begin();
	    rootElement.findName("rightMove").Begin();
        rootElement.findName("ellipseMove").Begin();
        rootElement.findName("anim_cercle_01").Begin();
        rootElement.findName("textMove").Begin();

	    
	}
	
	
	    
}

