/**
 * @author Marcel Fiedrich
 */

window.addEvent('domready', function() {
	var flashSwitcher = function(pid, xmlpid, baseurl, lang) {
		var flashContainer = $$('div.loeweMainFlash');
		var flashObject = flashContainer[0].getElement('object');
		flashObject.dispose();
		var mainFlashCon = new Swiff('fileadmin/flash/container_large.swf', {
			id: 'flashCon',
			width: 972,
			height: 498,
			params: {
				wmode: 'transparent',
				movie: 'fileadmin/flash/container_large.swf',
				swLiveConnect: true,
				allowScriptAccess: true
			},
			vars: {
				pid: pid,
				xmlpid: xmlpid,
				lang: lang,
				baseurl: 'http://'+baseurl+'/',
				loeweconfig: ''
			}
		});
		mainFlashCon.inject(flashContainer[0]);
	};
	
	if(window.location.hash == '#ch') {
		flashSwitcher('20091126'+activeLang, 3, window.location.host, activeLang);
		//console.log('CH Linked');
		//console.log(refActLang);
		//console.log(window.location.host);
	}
	
});
