// JavaScript Document
function showFlashObject(source, width, height, url){
	
	document.writeln('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="' + width + '" height="' + height + '" id="flashobject" align="middle">');
	document.writeln('<param name="allowScriptAccess" value="sameDomain" />');
	document.writeln('<param name="movie" value="' + source + '?link='+ url +'" />');
	document.writeln('<param name="quality" value="high" />');
	document.writeln('<param name="bgcolor" value="#ffffff" />');
	document.writeln('<param name="wmode" value="transparent" />');
	document.writeln('<embed src="' + source + '?link='+ url + '" quality="high" wmode="transparent" bgcolor="#ffffff" width="' + width + '" height="' + height + '" name="flashobject" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.writeln('</object>');
	
} // function showFlashObject

function showFlashBanner(sMovie, sVars, iWidth, iHeight){
	document.writeln('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+iWidth+'" height="'+iHeight+'" id="bannerjfghdghg" align="middle">');
	document.writeln('<param name="allowScriptAccess" value="sameDomain" />');
	document.writeln('<param name="movie" value="'+sMovie+'" />');
	document.writeln('<param name="quality" value="high" />');
	document.writeln('<param name="bgcolor" value="#ffffff" />');
	document.writeln('<param name="wmode" value="transparent" />');
	document.writeln('<param name="FlashVars" value="'+sVars+'" />');
	document.writeln('<embed src="'+sMovie+'?'+sVars+'" wmode="transparent" quality="high" bgcolor="#ffffff" width="'+iWidth+'" height="'+iHeight+'" name="banner" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.writeln('</object>');
}

// De volgende functies hebben betrekking op de hoek-flash-animatie
// vraag browserbreedte op
function getBrowserWidth(){  
	var breedte = 0;
	var hoogte = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		breedte = window.innerWidth;
		hoogte = window.innerHeight;
	} else {
		if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
			breedte = document.documentElement.clientWidth;
			hoogte = document.documentElement.clientHeight;
		} else {
			if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
				breedte = document.body.clientWidth;
				hoogte = document.body.clientHeight;
			}
		}
	}
	return(breedte);
}

var IE = 0;
function checkBrowser(){
	var identstring = navigator.userAgent;
	var IE = 0;
	if (identstring.indexOf("MSIE 5.",0) != -1) { 
		IE = 1; 
	} else if (identstring.indexOf("MSIE 6.",0) != -1) {
		IE = 1;
	} else if (identstring.indexOf("MSIE 7.",0) != -1) {
		IE = 1;
	} else {
		IE = 0;
	}
	
	if(IE == 1){
		//document.getElementById('mainContainer').style.zIndex = 0;
		//document.getElementById('mainContainer').style.position = 'relative';
	}
	
	return IE;
}

function contentUp(){
	var IE = checkBrowser();
	if(document.getElementById('fObject')){	
	
		if(IE == 0){
			document.getElementById('fObject').style.zIndex = 99;
			if(document.getElementById('mainContainer')){				
				document.getElementById('mainContainer').style.zIndex = 100;
				document.getElementById('mainContainer').style.position = 'absolute';
				document.getElementById('mainContainer').style.width = 1010 + 'px';
				document.getElementById('mainContainer').style.marginLeft = (getBrowserWidth() - 1010)/2 + 'px';
			}
		} else {
			document.getElementById('fObject').style.zIndex = 99;
			document.getElementById('mainContainer').style.zIndex = 100;
			document.getElementById('mainContainer').style.position = 'absolute';
			document.getElementById('mainContainer').style.width = 1010 + 'px';
			document.getElementById('mainContainer').style.marginLeft = (getBrowserWidth() - 1010)/2 + 'px';
		}
	}
}

function contentDown(){
	var IE = checkBrowser();
	if(document.getElementById('fObject')){	
		
		if(IE == 0){
			document.getElementById('fObject').style.zIndex = 101;
			if(document.getElementById('mainContainer')){		
				document.getElementById('mainContainer').style.zIndex = 1;
				document.getElementById('mainContainer').style.position = 'relative';
			}
		} else {
			document.getElementById('fObject').style.zIndex = 101;
			if(document.getElementById('mainContainer')){		
				document.getElementById('mainContainer').style.zIndex = 1;
				document.getElementById('mainContainer').style.position = 'absolute';
			}
		}
	}
}
