function getElementByClass(theClass) {
	var allHTMLTags = new Array();
	var childs = new Array();

	var allHTMLTags=document.getElementsByTagName("*");
	for (i = 0; i < allHTMLTags.length; i++) {
		if (allHTMLTags[i].className==theClass) {
			childs = allHTMLTags[i].childNodes;
			for(j = 0; j < childs.length; j++) {
				if(childs[j].getAttribute("id") != "" && childs[j].getAttribute("id") != null) {
					return childs[j].getAttribute("id");
				}
			}
		}
	}
}

function createSilverlight()
{
	Silverlight.createObjectEx({
		source: "/poland/edukacja/js/pl_pl_SLWindowPane.xaml",
		parentElement: document.getElementById("WindowPane"),
		id: getElementByClass("WindowPane"),
		properties: {
			width: "844",
			height: "325",
			version: "1.0",
			background:'transparent', 
			inplaceInstallPrompt:'true',
			isWindowless: 'true'
		},
		events: { }
	});
}

//if(Silverlight.isInstalled("1.0") || Silverlight.isInstalled("1.1") || Silverlight.isInstalled("2.0")) setTimeout('createSilverlight()', 15);