﻿function createSilverlight(name, component, appKey, initParams) {

	Silverlight.inject({
		source: applicationPath + "ClientBin/Sonnema.Slideshow.xap",
		parentElement: "placeholder_" + name.toLowerCase(),
		id: "silverlightControl." + name,
		properties:
			{
				width: "100%",
				height: "100%",
				version: "3.0.40624.0",
				background: "Transparent",
				isWindowless: "true"
			},
		events:
			{
				onError: null,
				onLoad: null
			},
			initParams: "applicationpath=" + applicationPath + ",appkey=" + appKey + ",component=" + component + initParams,
		installerUiConfig:
		    {
    			component: component
			}
	});
}


