function createWebcam(language, codename, mode)
{
    if (!Silverlight.isInstalled('2.0')) {
        return false;
    }
    

	Silverlight.createObjectEx({
		source: "/ClientBin/Visualiser.xap",
		parentElement: document.getElementById("silverlightControlHost"),
		id: "SilverlightControl",
		properties: {
			width: "994",
			height: "276",
			version: "2.0",
			background: "transparent",
			isWindowless: "true"
		},
		events: {
			
			onError: function(sender, args) {
			}
		}, initParams: "language="+language
	});
	
	return true;
}



function writeNoSilverlight(language, title, description) {
    var nosl = '<div class="noSilverlight{1}"><div class="leftTxt"><span><h2>{2}</h2><p>{3}</p></span><a href="javascript:Silverlight.getSilverlight(\'2.0\');" class="install"></a></div></div>';
    nosl = nosl.replace('{1}', language.toUpperCase());
    nosl = nosl.replace('{2}', title);
    nosl = nosl.replace('{3}', description);
    document.write(nosl);
}

		if (!window.Silverlight) 
			Silverlight = {};

		Silverlight.createDelegate = function(instance, method) {
			return function() {
				return method.apply(instance, arguments);
			}
		}
