/* Program      : functions.js
 * Author       : Anouk de Leeuw - AYZ sites
 * Version      : 28 augustus 2007
 * Description  : Wordpress-template janneke.biz - javascript-functies 
//-------------------------------------------------------------------------------------------*/
function addEventSimple(obj,evt,fn){
	if(obj.addEventListener) // W3C DOM
		obj.addEventListener(evt,fn,false);
	else if (obj.attachEvent) //IE
		obj.attachEvent('on'+evt, fn);
}
//-------------------------------------------------------------------------------------------
function init(){
	// replace 'boek' to emulate background-stretch
	var boek = document.getElementById("boek");
	var myImg = document.createElement('img');
	myImg.src = boek.className;
	boek.parentNode.replaceChild(myImg,boek);
	myImg.id = "boek";
	// ie fix
	if(typeof iePngSupport == "function") iePngSupport(myImg);
}
//-------------------------------------------------------------------------------------------
// preload images
var image = new Image();
image.src = "wordpress/wp-content/themes/janneke/css/img/kop.jpg";
//init 
var W3CDOM = document.createElement && document.getElementsByTagName;
if (W3CDOM){
   addEventSimple(window,'load',init);
}  