function getBrowserWidth() {
	if (window.innerWidth) return window.innerWidth;
	else if (document.documentElement && document.documentElement.clientWidth != 0) return document.documentElement.clientWidth;
	else if (document.body) return document.body.clientWidth;
	else return 0;
}

function getBrowserHeight() {
	if (window.innerHeight) return window.innerHeight;
	else if (document.documentElement && document.documentElement.clientHeight != 0) return document.documentElement.clientHeight;
	else if (document.body) return document.body.clientHeight;
	return 0;
}

function fixbgpos() {
	var windowWidth = getBrowserWidth();
	var myBody = document.getElementById("q");
	if(windowWidth<950 && windowWidth>0) {
		myBody.style.backgroundPosition = '-805px 0px';
	}else{
		myBody.style.backgroundPosition = 'top center';
	}
}





	
	function goQ(ziel){
	
		var qbreit = 1024;
		var qhoch = 768;
		
		qMain = window.open(ziel,"q","status=no,toolbar=no,location=no,directories=no,scrollbars=auto,menu=no,width="+screen.width+",height="+screen.height+",screenX=0,screenY=0,resizable=yes");
		qMain.focus();
	}
	
	
	
	
	
		function resizeSWF() {
			
			var pagesize = getPageSize();
			var FL_WIDTH = pagesize[0];
			var FL_HEIGHT = pagesize[1];
			
			document.getElementById("qlicksflash").style.width = FL_WIDTH+"px";
			document.getElementById("qlicksflash").style.height = FL_HEIGHT+"px";
			fixbgpos();
			
		}
		
		function getPageSize(){
		
			var de = document.documentElement;
			var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
			var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
			
			arrayPageSize = [w,h];
			return arrayPageSize;
			
		}
		
		function hideQlickErrorLayer(){
			document.getElementById("qlicksflash").style.visibility = "hidden";
		}
		
		function hideQlickFlashLayer(){
			document.getElementById("qlicksflash").removeChild(document.getElementById("qlicksFullscreen"));
			document.getElementById("qlicksflash").style.visibility = "hidden";
		}
		
		function hideQlickFlash(){
		
			if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion < "7"){
				document.getElementById("q").parentNode.style.overflow = "auto";
			}
			
			window.onresize = fixbgpos;
			window.setTimeout("hideQlickFlashLayer()", 100);
			
		}
		
		function showQlickFlash(){
			
			if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion < "7"){
				window.scrollTo(0, 0);
				document.getElementById("q").parentNode.style.overflow = "hidden";
			}			
			
			document.getElementById("qlicksflash").style.visibility = "visible";
            
            // <![CDATA[
            var so = new SWFObject("qlicks/qlicks.swf", "qlicksFullscreen", "100%", "100%", "8");
            so.addParam("menu", "false");
            so.addParam("quality", "high");
            so.addParam("scale", "noscale");
            so.addParam("allowScriptAccess", "always");
            so.addParam("align", "left");
			so.addParam("salign", "lt");
            so.addParam("wmode", "transparent");
            so.write("qlicksflash");
            // ]]>
            
            /*
           	// <![CDATA[
            swfobject.embedSWF("qlicks/qlicks.swf", "qlicksflash", "100%", "100%", "8.0.0", "",{},{id:"qlicksFullscreen",name:"qlicksFullscreen",quality:"high",menu:"false",wmode:"transparent",align:"left",salign:"lt",scale:"noscale",allowScriptAccess:"always",allowFullScreen:"false"});
			// ]]>
            */
			
			resizeSWF();
			window.onresize = resizeSWF;
			
		}
		
		/*
		window.onresize = function (Ereignis) {
			var pagesize = getPageSize();
			TB_WIDTH = pagesize[0];
			TB_HEIGHT = pagesize[1];
			document.getElementById("TB_iframeContent").style.width = TB_WIDTH+"px";
			document.getElementById("TB_iframeContent").style.height = TB_HEIGHT+"px";
				 return true;
		}
       
	   */ 