if (!window.BannerSLEvent)
	window.BannerSLEvent = {};

BannerSLEvent.Page = function() 
{
}

BannerSLEvent.Page.prototype =
{
	handleLoad: function(control, userContext, rootElement) 
	{
		this.control = control;
		var downloader = control.createObject("downloader");
		downloader.addEventListener("Completed",Silverlight.createDelegate(this, this.dlComplete));
		downloader.Open("GET","font/GOTHIC.TTF");
		downloader.Send();
		// Sample event hookup:	
		rootElement.addEventListener("MouseLeftButtonDown", Silverlight.createDelegate(this, this.handleMouseDown));		
	},
	
	// Sample event handler
	handleMouseDown: function(sender, eventArgs) 
	{
		window.open('http://www.ventigrate.be/events.aspx','_self');
	},
	dlComplete: function(sender, eventArgs) 
	{
		  // Retrieve the TextBlock object.
        var myTextBlock = sender.findName("textBlock");
        var myTextBlock1 = sender.findName("textBlock_Copy");
        var myTextBlock2 = sender.findName("textBlock_Copy1");
        var myTextBlock3 = sender.findName("textBlock_Copy2");
        var myTextBlock4 = sender.findName("textBlock_Copy3");
        var myTextBlock5 = sender.findName("textBlock_Copy4");

        // Add the font files in the downloaded object to the TextBlock's type face collection.
        myTextBlock.setFontSource(sender);
        myTextBlock1.setFontSource(sender);
        myTextBlock2.setFontSource(sender);
        myTextBlock3.setFontSource(sender);
        myTextBlock4.setFontSource(sender);
        myTextBlock5.setFontSource(sender);

        // Set the FontFamily property to the friendly name of the font.
        myTextBlock.fontFamily = "Century Gothic";       
        myTextBlock1.fontFamily = "Century Gothic";     
        myTextBlock2.fontFamily = "Century Gothic";  
        myTextBlock3.fontFamily = "Century Gothic";  
        myTextBlock4.fontFamily = "Century Gothic";  
        myTextBlock5.fontFamily = "Century Gothic";  
	}
}