if (!window.RssNotebook)
	window.RssNotebook = {};

RssNotebook.Page = function() 
{
}

RssNotebook.Page.prototype =
{
	handleLoad: function(control, userContext, rootElement) 
	{
		this.control = control;
		this.root = control.content.findName("Main");
		
		this.header = control.content.findName("ItemHeader");
		this.itemtext = control.content.findName("ItemContent");
		
		this.downloader = control.createObject("downloader");
		this.downloader.addEventListener("completed", Silverlight.createDelegate(this, this.handleFontDownloaded));
		this.downloader.open("GET", "timheuer.ttf");
		this.downloader.send();
		
		this.header.Text = rss[0].Channel.Items[1].Title;
		this.itemtext.Text = rss[0].Channel.Items[1].Description;
	},
	
	handleFontDownloaded: function(sender, eventArgs)
	{
        this.header.setFontSource(sender);
        this.itemtext.setFontSource(sender);
        this.header.fontFamily = "Tim Heuer Normal";
        this.itemtext.fontFamily = "Tim Heuer Normal";
	}
}