

setCSS("#wrapper {display:none}");
//window.onload = function(){ showIntro(); }

$(document).ready(function(){
  showIntro();
});



function showIntro(){
	var flashFound = swfobject.hasFlashPlayerVersion("9");

		var intro_wrap = document.createElement("div");
		var intro_wrapid = document.createAttribute("id");
		intro_wrapid.nodeValue = "introwrap";
		intro_wrap.setAttributeNode(intro_wrapid);
		document.getElementsByTagName("body")[0].appendChild(intro_wrap);
	
		var div = document.createElement("div");
		document.getElementById("introwrap").appendChild(div);
	
		var intro = document.createElement("div");
		var introid = document.createAttribute("id");
		introid.nodeValue = "intro";
		intro.setAttributeNode(introid);
		intro_wrap.appendChild(intro);
		document.getElementById("introwrap").firstChild.appendChild(intro);

		setCSS("#wrapper {display:block; height:100px; overflow:hidden}");
		setCSS("#introwrap {display:block}");	
	
	if(flashFound){
		var flashvars = {};
		var params = {};
		var attributes = {};
		swfobject.embedSWF("/fileadmin/dyntempl/intro_en/kernbotschaft_en.swf", "intro", "900", "655", "9.0.43", "false", flashvars, params, attributes);

	} else {
		//window.location.reload();
		hideIntro();
	}
	
}

function hideIntro(){
	setCSS("#wrapper {height:auto; overflow:auto}");
	var introwrap = document.getElementById('introwrap');
	document.getElementsByTagName("body")[0].removeChild(introwrap);
}
				
function clickSkip(){
	//clickTracker("http://www.gerolsteiner.de/?skip=true"); 
	clickTracker('SkipIntro');
	hideIntro();
}
				
function clickNoSkip(){
	//clickTracker("http://www.gerolsteiner.de/?skip=false"); 
	hideIntro();
}

function setCSS(cssText){
	css = document.createElement('style');
	css.setAttribute('type', 'text/css');
	if(css.styleSheet) {
	        css.styleSheet.cssText = cssText
	} else {
	        css.appendChild(document.createTextNode(cssText));
	}
	document.getElementsByTagName("head")[0].appendChild(css);
}
