// other way see http://www.ajaxschmiede.de/javascript/fenstergrose-und-scrollposition-in-javascript-auslesen/

function getWindowWidth() {
	var de = document.documentElement;
	var myWidth = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
	return myWidth;
}

if(!modularweb.flashOn && modularweb.isFrontpage){

	window.location = modularweb.baseUrl + modularweb.home + '/?ui=html';
	
}else if(modularweb.flashOn && getWindowWidth() > 2* boxLayout.COLWIDTH + 3 * boxLayout.COLMARGIN){ //  getWindowWidth() > boxLayout.COLWIDTH + 2 * boxLayout.COLMARGIN 
	
	if(modularweb.isFrontpage){
		var attributes = {id:"container"};
		var flashvars = {};
		var params = {};
		params.play = "true";
		params.allowfullscreen = "true";
		params.allowscriptaccess = "always";
		params.allownetworking = "all";
		swfobject.embedSWF(modularweb.baseUrl + '/flash/' + modularweb.flashTemplate + '/website.swf', 'container', '100%', '100%', '10', null, flashvars, params, attributes);
	}else{
		swfobject.embedSWF(modularweb.baseUrl + '/flash/flashchecker.swf', 'container', '100%', '100%', '10', null, null, null, null);
	}
	
}
