// bepaalt breedte Flashcontainer

function setFlashBox() {
	if (document.getElementById) {
		var windowWidth=getWindowWidth();
		if (windowWidth>0) {
			document.getElementById('flashcontainer').style.width=400+((windowWidth-950)/2)+'px';
		}
	}
}

function getWindowWidth() {
		var windowWidth=0;
		if (typeof(window.innerWidth)=='number') {
			windowWidth=window.innerWidth;
		} else {
			if (document.documentElement&&
				document.documentElement.clientWidth) {
				windowWidth=
				document.documentElement.clientWidth;
			} else {
				if (document.body&&document.body.clientWidth) {
					windowWidth=document.body.clientWidth;
				}
			}
		}
	return windowWidth;
}

//BrowserDetection

browsername=navigator.appName;        
if (browsername.indexOf("Netscape")!=-1) {
	browsername="NS"
	} else {
	if (browsername.indexOf("Microsoft")!=-1) {
		browsername="MSIE"
		} else {
		browsername="N/A"
	}
}

function getWindowHeight() {
	var windowHeight=0;
		if (typeof(window.innerHeight)=='number') {
			windowHeight=window.innerHeight;
		} else {
			if (document.documentElement&&
				document.documentElement.clientHeight) {
				windowHeight=
				document.documentElement.clientHeight;
			} else {
				if (document.body&&document.body.clientHeight) {
					windowHeight=document.body.clientHeight;
				}
			}
		}
		return windowHeight;
	}

function setContentHeight() {
	var windowHeight=getWindowHeight();
		if(windowHeight>0){
				if (document.getElementById('maincontainer').clientHeight > windowHeight) {
					document.getElementById('maincontainer').style.height=auto;
				} else {
					document.getElementById('maincontainer').style.height=(windowHeight-200)+'px';
				};
		}
}

function openPopup(theURL,winName,w,h){
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no,resizable=no'
	win = window.open(theURL,winName,settings)
}
