﻿var SeasonCards = null;
var xmlDoc = null;

function createSeasonCard()
{   
	SeasonCards = new SeasonCardsBuilder.App();
	
	Silverlight.createObjectEx({
		source: "UI.xaml",
		parentElement: document.getElementById("div_Content"),
		id: "SilverlightControl",
		properties: {
			width: "800px",
			height: "600px",
			version: "1.0",
			isWindowless:'true',
			background:'transparent'
		},
		events: {
			onLoad: Silverlight.createDelegate(SeasonCards, SeasonCards.handleLoad),
			onError: function(){}
		}
	});
}


if (!window.Silverlight) 
	window.Silverlight = {};

Silverlight.createDelegate = function(instance, method) {
	return function() {
		return method.apply(instance, arguments);
	}
}