// JavaScript Document
function Logo(){
	var fade=0,logo=document.getElementById("logo").style,ms=(logo.opacity==0)?0:1,pace=setInterval(Fade,40);
	function Fade(){
		if(fade<100){
			fade+=100;if(ms)logo.filter="alpha(opacity="+fade+")";else logo.opacity=(fade/100)
		} else clearInterval(pace)
	}
};
window.onload=Logo;

function Bg(){
	var fade=0,logo=document.getElementById("bg").style,ms=(logo.opacity==0)?0:1,pace=setInterval(Fade,40);
	function Fade(){
		if(fade<100){
			fade+=100;if(ms)logo.filter="alpha(opacity="+fade+")";else logo.opacity=(fade/100)
		} else clearInterval(pace)
	}
};
window.onload=Bg;

function Footer(){
	var fade=0,logo=document.getElementById("footer").style,ms=(logo.opacity==0)?0:1,pace=setInterval(Fade,40);
	function Fade(){
		if(fade<100){
			fade+=100;if(ms)logo.filter="alpha(opacity="+fade+")";else logo.opacity=(fade/100)
		} else clearInterval(pace)
	}
};
window.onload=Knop;

function Knop(){
	var fade=0,logo=document.getElementById("knop").style,ms=(logo.opacity==0)?0:1,pace=setInterval(Fade,40);
	function Fade(){
		if(fade<100){
			fade+=100;if(ms)logo.filter="alpha(opacity="+fade+")";else logo.opacity=(fade/100)
		} else clearInterval(pace)
	}
};
window.onload=Knop;


function resizeWindow() {
	var windowWidth = getWindowWidth();
	var windowHeight = getWindowHeight();
	document.getElementById("footer").style.bottom = 0 + "px";
	document.getElementById("footer").style.width = (windowWidth - 60) + "px";
	document.getElementById("logo").style.bottom = 45 + "px";
	document.getElementById("logo").style.left = ((windowWidth / 2.0408) - 90) + "px";
	document.getElementById("knop").style.bottom = 225 + "px";
	document.getElementById("knop").style.left = ((windowWidth / 2.0408) - 104) + "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;
}

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;
}
