/**
 * compatibility.js
 *
 * Dit bestand bevat alle minimale javascript om de modules en componenten van edit werkend te houden.
 *
 * @author Maurice Bonemeijer
 */

/**
 * addLoadEvent
 * http://simonwillison.net/2004/May/26/addLoadEvent/
 *
 * Hiermee kan je diverse functies toevoegen aan window.onLoad
 * Onderin dit script worden de functies toegevoegd.
 *
 * voorbeeld:
 * mijnHenkFunctie = myHenk() {
 *    alert('henk is van mij!');
 * }
 * addLoadEvent(mijnHenkFunctie);
 * // myHenk() wordt nu uitgevoerd wanneer de pagina klaar is met laden :)
 *
 * @author Simon Willison
 * @param var func naam van je functie
 */
function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			if (oldonload) {
				oldonload();
			}
			func();
		}
	}
}

/** 
 * preloadImg() img proloaden b.v. voor een mouse over
 *
 * @param string img de afbeelding die je wilt preloaden
 */
preloadImg = function ( img ){
	image = new Image()
	image.src = img
}


/**
 *	De TAPE aanpassen als de strip kleiner is al het scherm
 *
 */
function stripe(){

	var sHeight = document.getElementById('stripe').offsetHeight;
	if (document.body && document.body.offsetWidth) {
		var bHeight = document.body.offsetHeight;
	}
	if (document.compatMode=='CSS1Compat' &&
		document.documentElement &&
		document.documentElement.offsetWidth ) {
		var bHeight = document.documentElement.offsetHeight;
	}
	if (window.innerWidth && window.innerHeight) {
		var bHeight = window.innerHeight;
	}
	
	if(sHeight < bHeight){

		document.getElementById('stripe').style.height = bHeight+'px';
		
	}
}

loadStripe = function(){
	stripe();	
}

addLoadEvent( loadStripe );



