
function onPageLoad() {
	
	// Controleer resolutie; neem aan mobile device wanneer < 800x600
	redirectMobile();
	
	// Controleer resolutie; kies afwijkende stylesheet bij kleine schermen
	setStyle();
}


/**
 * viewportsize script i.v.m. juiste css bij 1024 768
 */
function setStyle() {
	var width, height;
	if(window.innerWidth) {
		width = window.innerWidth;
		height = window.innerHeight;
	}
	else if(document.documentElement.clientWidth) {
		width = document.documentElement.clientWidth;
		height = document.documentElement.clientHeight;
	}
	else if(document.body.clientWidth) {
		width = document.body.clientWidth;
		height = document.body.clientHeight;
	}
	var stylesheetLink = document.getElementById("stylesheetLink");
	var useSmall = (width <= 1024 && height <= 768);
	stylesheetLink.setAttribute("href", (useSmall ? smallStylesheetLink : normalStylesheetLink));
}


function redirectMobile() {
	
 if ( screen.width < 801 && screen.height < 601 ) {


		window.location.href = "http://www.buro7.nl";
	}
}


/**
 * overlay buttons in floatbox op 100% opacity (is geen standaard optie)
 */
function setNavOpacity() {
    var instance = fb.lastChild;
    if (instance.fbOverlayPrev) {
        var prevStyle = instance.fbOverlayPrev.style,
            nextStyle = instance.fbOverlayNext.style;
        prevStyle.opacity = nextStyle.opacity = '1';
        if (prevStyle.removeAttribute) {
            prevStyle.removeAttribute('filter');
            nextStyle.removeAttribute('filter');
        }
    }
}
fbPageOptions = { afterBoxStart: setNavOpacity };


function ShowHide(){
	$("#web").animate({"height": "toggle"}, { duration: 400 });
	$("#web2").animate({"height": "toggle"}, { duration: 400 });
	$("#web3").animate({"height": "toggle"}, { duration: 400 });
}

