var t_backgrounddiv = 0;
var t_home = 0;
var t_skip = 0;


function flashDetection() {
						if ((navigator.plugins) && (navigator.plugins.length > 0)) {
							for(var i=0; i<navigator.plugins.length; i++) {
								if(navigator.plugins[i].name.indexOf("Shockwave Flash") != -1) {
									return true;
								}
							}
						} else if (typeof(ActiveXObject) == "function") {
							for(var i = 8; i < 10; i++) {
								try {
									if(typeof(new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i)) == "object") {
											return true;
									}
								} catch(error) {
									
								} //ende try/catch
							} //ende for
						} else {
							return false;
						}
					}
					
					

function chgHomeFlash(){

                if (flashDetection()) {
				  if (document.getElementById('home_flash')) document.getElementById('home_flash').style.display = 'block';
		}

        t_backgrounddiv = setTimeout(function(){setBackground();}, 4000);
       
       	if(navigator.appName == "Microsoft Internet Explorer") t_skip = setTimeout(function(){noDisplaySkip();}, 8200); 
	else  t_skip = setTimeout(function(){noDisplaySkip();}, 9500); 
            
	t_home = setTimeout(function(){setZindex();}, 10500);	
}

function setZindex(){
	document.getElementById('home_flash').style.zIndex = 1;
	document.getElementById('home_flash').style.display= 'none';
}

function setBackground(){
	document.getElementById('home_flash').style.backgroundColor = 'transparent';
}

function noDisplayFlashDiv(){
	document.getElementById('home_flash').style.display= 'none';
}


function noDisplaySkip(){
	document.getElementById('home_skip').style.display= 'none';
	document.getElementById('home_skip').style.zIndex = 1;
}



/*	
function setZindex(){
	//document.getElementById('home_flash').style.zIndex  = 1;

  //document.getElementById('home_flash').style.display  = 'none';
			 
			 
	var bottom_doc = document;
	if (bottom_doc && bottom_doc.getElementsByName) {
		// Find all 'object' tags in the document.
		flashObjects = bottom_doc.getElementsByTagName('object');

		var flashNode = flashObjects[0];
		var paramNodes = flashNode.getElementsByTagName('param');
		var embedNodes = flashNode.getElementsByTagName('embed');
		if (flashNode && paramNodes) {
			var new_elem = bottom_doc.createElement('PARAM');
			new_elem.setAttribute("wmode", "transparent");
			flashNode.appendChild(new_elem);
		}
		
		if (bottom_doc.getElementsByName("terhuerne-home")) bottom_doc.getElementsByName("terhuerne-home").wmode = 'transparent';
	}
}
	
	
*/