﻿var applicationPath = "http://localhost/BGCHM/";

function createSilverlight(id) {

	Silverlight.inject({
		source: applicationPath + "ClientBin/BGCHM.Calendar.xap",
		parentElement: "placeholder_calendar",
		id: "silverlightControl.calendar",
		properties:
			{
				width: "100%",
				height: "100%",
				version: "4.0",
				background: "Transparent",
				isWindowless: "true",
				enableHtmlAccess: "true"
			},
		events:
			{
				onError: null,
				onLoad: null
			},
		initParams: "applicationpath=" + applicationPath,
		installerUiConfig:
	    {
	    	component: "calendar"
	    }
	});
}

function encodeTelegram(text) {
	return text.replace(/;/g, '|');
}


