// JavaScript Document

var pageLoaded = false;

function getDimensions() {
	var x,y,z;
	if (self.innerHeight) // all except Explorer
	{
		x = self.innerWidth;
		y = self.innerHeight;
		z = 0;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
		// Explorer 6 Strict Mode
	{
		x = document.documentElement.clientWidth;
		y = document.documentElement.clientHeight;
		z = 17;
	}
	else if (document.body) // other Explorers
	{
		x = document.body.clientWidth;
		y = document.body.clientHeight;
		z = 17;
	}
	
	return {x:x, y:y, z:z};
}

var catPath = "images/";
    var catWidth = 134;
    var catHeight = 49;

    var catPics = new Array (
        "knop1_on.png",
        "knop2_on.png",
        "knop3_on.png",
        "knop4_on.png",
        "knop5_on.png",
        "knop6_on.png" );

    var myPics = preloadImages (catPath,catPics,catWidth,catHeight);

    function preloadImages(path,pics,width,height) {

        var images = new Array;

        for (var picNum=0; picNum<pics.length; picNum++) {
            images[picNum] = new Image(width,height);
            images[picNum].src = (path + pics[picNum]);
        }

        return(images);
    }


function nutricia(){
	var dims = getDimensions();
	if(dims.z == 0){
		var the_width=dims.x;
		var the_height=dims.y;
	}else{
		var the_width=dims.x;
		var the_height=dims.y + 130;
	}
	var the_atts='width='+the_width+',height='+the_height+',toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes';
	window.open('http://www.nutriciakindervoeding.nl/','nutricia',the_atts);
}
function nutrilon(){
	var dims = getDimensions();
	if(dims.z == 0){
		var the_width=dims.x;
		var the_height=dims.y;
	}else{
		var the_width=dims.x;
		var the_height=dims.y + 130;
	}
	var the_atts='width='+the_width+',height='+the_height+',toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes';
	window.open('http://www.nutriciakindervoeding.nl/Onzeproducten/Nutrilon/','nutrilon',the_atts);
}
function fisherprice(){
	var dims = getDimensions();
	if(dims.z == 0){
		var the_width=dims.x;
		var the_height=dims.y;
	}else{
		var the_width=dims.x;
		var the_height=dims.y + 130;
	}
	var the_atts='width='+the_width+',height='+the_height+',toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes';
	window.open('http://www.fisher-price.com/nl/','fisherprice',the_atts);
}
function babywalz(){
	var dims = getDimensions();
	if(dims.z == 0){
		var the_width=dims.x;
		var the_height=dims.y;
	}else{
		var the_width=dims.x;
		var the_height=dims.y + 130;
	}
	var the_atts='width='+the_width+',height='+the_height+',toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes';
	window.open('http://www.baby-walz.nl/','babywalz',the_atts);
}


function hideFlash() {
	document.getElementById("flashcontent").style.display = 'none';
	document.getElementById("homebody").style.overflow = 'auto';
}
function hideFlashBack() {
	document.getElementById("flashback").style.display = 'none';
}

function sizeFlash() {
	var dims = getDimensions();
	//alert(dims.x);
	var productElement = document.getElementById("flashcontent");
	if (productElement != null){
		//document.getElementById("flashcontent").style.display = 'block';
		//alert(Math.round((dims.y - 650)) + "px");
		if(dims.y > 650){
			document.getElementById("flashcontent").style.top = "-" + Math.round((dims.y - 650)) + "px";
			document.getElementById("flashcontent").style.height = Math.round(((dims.y - 650)*2)+650) + "px";
		}else{
			document.getElementById("flashcontent").style.top = "0px";
			document.getElementById("flashcontent").style.height = "650px";
		}
	}
}

window.onload = function() {
	pageLoaded = true;
	//var dims2 = $('frame').getDimensions(); 
	var dims = getDimensions();
	//alert(dims.x);
	var productElement = document.getElementById("flashcontent");
	if (productElement != null){
		//document.getElementById("flashcontent").style.display = 'block';
		if(dims.y > 650){
			document.getElementById("flashcontent").style.top = "-" + Math.round((dims.y - 650)) + "px";
			document.getElementById("flashcontent").style.height = Math.round(((dims.y - 650)*2)+650) + "px";
		}else{
			document.getElementById("flashcontent").style.top = "0px";
			document.getElementById("flashcontent").style.height = "650px";
		}
	}
	
	var productElement = document.getElementById("pag3foto");
		if (productElement != null){
			if(dims.x > 984){
				document.getElementById("pag3foto").style.width = Math.round((((dims.x - 984)/2)+362)) + "px";
				document.getElementById("pag3foto").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
			if(dims.y < 650){
				document.getElementById("pag3foto").style.height = (650 - 312) + "px";
			}else{
				document.getElementById("pag3foto").style.height = Math.round((dims.y - 312)) + "px";
			}
		}
	var productElement = document.getElementById("pag5foto");
		if (productElement != null){
			if(dims.x > 984){
			document.getElementById("pag5foto").style.width = Math.round((((dims.x - 984)/2)+242)) + "px";
			document.getElementById("pag5foto").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
		}
	var productElement = document.getElementById("pag6foto");
		if (productElement != null){
			if(dims.x > 984){
			document.getElementById("pag6foto").style.width = Math.round((((dims.x - 984)/2)+562)) + "px";
			document.getElementById("pag6foto").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
			if(dims.y < 650){
				document.getElementById("pag6foto").style.height = (650 - 376) + "px";
			}else{
				document.getElementById("pag6foto").style.height = Math.round((dims.y - 376)) + "px";
			}
		}
	var productElement = document.getElementById("pag8foto");
		if (productElement != null){
			if(dims.x > 984){
			document.getElementById("pag8foto").style.width = Math.round((((dims.x - 984)/2)+300)) + "px";
			document.getElementById("pag8foto").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
		}
	var productElement = document.getElementById("pag15foto");
		if (productElement != null){
			if(dims.x > 984){
			document.getElementById("pag15foto").style.width = Math.round((((dims.x - 984)/2)+370)) + "px";
			document.getElementById("pag15foto").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
			if(dims.y < 650){
				document.getElementById("pag15foto").style.height = (650 - 200) + "px";
			}else{
				document.getElementById("pag15foto").style.height = Math.round((dims.y - 200)) + "px";
			}
		}
	var productElement = document.getElementById("pag16foto");
		if (productElement != null){
			if(dims.y < 650){
				document.getElementById("pag16foto").style.height = (650 - 446) + "px";
			}else{
				document.getElementById("pag16foto").style.height = Math.round((dims.y - 446)) + "px";
			}
		}
	var productElement = document.getElementById("pag23foto");
		if (productElement != null){
			if(dims.x > 984){
			document.getElementById("pag23foto").style.width = Math.round((((dims.x - 984)/2)+340)) + "px";
			document.getElementById("pag23foto").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
			if(dims.y < 650){
				document.getElementById("pag23foto").style.height = (650 - 155) + "px";
			}else{
				document.getElementById("pag23foto").style.height = Math.round((dims.y - 155)) + "px";
			}
		}
	var productElement = document.getElementById("pag22foto");
		if (productElement != null){
			if(dims.y < 650){
				document.getElementById("pag22foto").style.height = (650 - 421) + "px";
			}else{
				document.getElementById("pag22foto").style.height = Math.round((dims.y - 421)) + "px";
			}
		}
	var productElement = document.getElementById("product25kader");
		if (productElement != null){
			if(dims.x > 984){
			document.getElementById("product25kader").style.width = Math.round((((dims.x - 984)/2)+753)) + "px";
			document.getElementById("product25kader").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
		}
	var productElement = document.getElementById("product26kader");
		if (productElement != null){
			if(dims.x > 984){
			document.getElementById("product26kader").style.width = Math.round((((dims.x - 984)/2)+280)) + "px";
			document.getElementById("product26kader").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
			document.getElementById("product26kader").style.height = 252 + "px";
		}
	var productElement = document.getElementById("product28kader");
		if (productElement != null){
			if(dims.x > 984){
			document.getElementById("product28kader").style.width = Math.round((((dims.x - 984)/2)+330)) + "px";
			document.getElementById("product28kader").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
		}
	var productElement = document.getElementById("spel_sub_back");
		if (productElement != null){
			if(dims.y < 650){
				document.getElementById("spel_sub_back").style.height = 650 + "px";
			}else{
				document.getElementById("spel_sub_back").style.height = Math.round((dims.y)) + "px";
			}
			if(dims.x > 984){
			document.getElementById("spel_sub_back").style.width = Math.round((((dims.x - 984)/2)+46)) + "px";
			document.getElementById("spel_sub_back").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
		}
	var productElement = document.getElementById("productactiekader");
		if (productElement != null){
			if(dims.x > 984){
			document.getElementById("productactiekader").style.width = Math.round((((dims.x - 984)/2)+753)) + "px";
			document.getElementById("productactiekader").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
		}
	var productElement = document.getElementById("pagactiefoto");
		if (productElement != null){
			if(dims.x > 984){
			//document.getElementById("pagactiefoto").style.width = Math.round((((dims.x - 984)/2)+166)) + "px";
			document.getElementById("pagactiefoto").style.width = Math.round((((dims.x - 984)/2)+246)) + "px";
			document.getElementById("pagactiefoto").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
		}
	var productElement = document.getElementById("paghelaasfoto");
		if (productElement != null){
			if(dims.x > 984){
			document.getElementById("paghelaasfoto").style.width = Math.round((((dims.x - 984)/2)+244)) + "px";
			document.getElementById("paghelaasfoto").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
		}
	var productElement = document.getElementById("producthelaaskader");
		if (productElement != null){
			if(dims.x > 984){
			document.getElementById("producthelaaskader").style.width = Math.round((((dims.x - 984)/2)+753)) + "px";
			document.getElementById("producthelaaskader").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
		}
	var productElement = bericht;
		if (productElement != null){
			if (bericht != null && bericht != false) {
				alert(bericht);
			}
		}
}

window.onresize = function() {
	//var dims2 = $('site').getDimensions(); 
	var dims = getDimensions();
	//alert(dims.x);
	var productElement = document.getElementById("flashcontent");
	if (productElement != null){
		if(dims.y > 650){
			document.getElementById("flashcontent").style.top = "-" + Math.round((dims.y - 650)) + "px";
			document.getElementById("flashcontent").style.height = Math.round(((dims.y - 650)*2)+650) + "px";
		}else{
			document.getElementById("flashcontent").style.top = "0px";
			document.getElementById("flashcontent").style.height = "650px";
		}
	}
	var productElement = document.getElementById("pag3foto");
		if (productElement != null){
			if(dims.x > 984){
			document.getElementById("pag3foto").style.width = Math.round((((dims.x - 984)/2)+362)) + "px";
			document.getElementById("pag3foto").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
			if(dims.y < 650){
				document.getElementById("pag3foto").style.height = (650 - 312) + "px";
			}else{
				document.getElementById("pag3foto").style.height = Math.round((dims.y - 312)) + "px";
			}
		}
	var productElement = document.getElementById("pag5foto");
		if (productElement != null){
			if(dims.x > 984){
			document.getElementById("pag5foto").style.width = Math.round((((dims.x - 984)/2)+242)) + "px";
			document.getElementById("pag5foto").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
		}
	var productElement = document.getElementById("pag6foto");
		if (productElement != null){
			if(dims.x > 984){
			document.getElementById("pag6foto").style.width = Math.round((((dims.x - 984)/2)+562)) + "px";
			document.getElementById("pag6foto").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
			if(dims.y < 650){
				document.getElementById("pag6foto").style.height = (650 - 376) + "px";
			}else{
				document.getElementById("pag6foto").style.height = Math.round((dims.y - 376)) + "px";
			}
		}
	var productElement = document.getElementById("pag8foto");
		if (productElement != null){
			if(dims.x > 984){
			document.getElementById("pag8foto").style.width = Math.round((((dims.x - 984)/2)+300)) + "px";
			document.getElementById("pag8foto").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
		}
	var productElement = document.getElementById("pag15foto");
		if (productElement != null){
			if(dims.x > 984){
			document.getElementById("pag15foto").style.width = Math.round((((dims.x - 984)/2)+370)) + "px";
			document.getElementById("pag15foto").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
			if(dims.y < 650){
				document.getElementById("pag15foto").style.height = (650 - 200) + "px";
			}else{
				document.getElementById("pag15foto").style.height = Math.round((dims.y - 200)) + "px";
			}
		}
	var productElement = document.getElementById("pag16foto");
		if (productElement != null){
			if(dims.y < 650){
				document.getElementById("pag16foto").style.height = (650 - 446) + "px";
			}else{
				document.getElementById("pag16foto").style.height = Math.round((dims.y - 446)) + "px";
			}
		}
	var productElement = document.getElementById("pag23foto");
		if (productElement != null){
			if(dims.x > 984){
			document.getElementById("pag23foto").style.width = Math.round((((dims.x - 984)/2)+340)) + "px";
			document.getElementById("pag23foto").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
			if(dims.y < 650){
				document.getElementById("pag23foto").style.height = (650 - 155) + "px";
			}else{
				document.getElementById("pag23foto").style.height = Math.round((dims.y - 155)) + "px";
			}
		}
	var productElement = document.getElementById("pag22foto");
		if (productElement != null){
			if(dims.y < 650){
				document.getElementById("pag22foto").style.height = (650 - 421) + "px";
			}else{
				document.getElementById("pag22foto").style.height = Math.round((dims.y - 421)) + "px";
			}
		}
	var productElement = document.getElementById("product25kader");
		if (productElement != null){
			if(dims.x > 984){
			document.getElementById("product25kader").style.width = Math.round((((dims.x - 984)/2)+753)) + "px";
			document.getElementById("product25kader").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
		}
	var productElement = document.getElementById("product26kader");
		if (productElement != null){
			if(dims.x > 984){
			document.getElementById("product26kader").style.width = Math.round((((dims.x - 984)/2)+280)) + "px";
			document.getElementById("product26kader").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
			document.getElementById("product26kader").style.height = 252 + "px";
		}
	var productElement = document.getElementById("product28kader");
		if (productElement != null){
			if(dims.x > 984){
			document.getElementById("product28kader").style.width = Math.round((((dims.x - 984)/2)+330)) + "px";
			document.getElementById("product28kader").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
		}
	var productElement = document.getElementById("spel_sub_back");
		if (productElement != null){
			if(dims.y < 650){
				document.getElementById("spel_sub_back").style.height = 650 + "px";
			}else{
				document.getElementById("spel_sub_back").style.height = Math.round((dims.y)) + "px";
			}
			if(dims.x > 984){
			document.getElementById("spel_sub_back").style.width = Math.round((((dims.x - 984)/2)+46)) + "px";
			document.getElementById("spel_sub_back").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
		}
	var productElement = document.getElementById("productactiekader");
		if (productElement != null){
			if(dims.x > 984){
			document.getElementById("productactiekader").style.width = Math.round((((dims.x - 984)/2)+753)) + "px";
			document.getElementById("productactiekader").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
		}
	var productElement = document.getElementById("pagactiefoto");
		if (productElement != null){
			if(dims.x > 984){
			//document.getElementById("pagactiefoto").style.width = Math.round((((dims.x - 984)/2)+166)) + "px";
			document.getElementById("pagactiefoto").style.width = Math.round((((dims.x - 984)/2)+246)) + "px";
			document.getElementById("pagactiefoto").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
		}
	var productElement = document.getElementById("paghelaasfoto");
		if (productElement != null){
			if(dims.x > 984){
			document.getElementById("paghelaasfoto").style.width = Math.round((((dims.x - 984)/2)+244)) + "px";
			document.getElementById("paghelaasfoto").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
		}
	var productElement = document.getElementById("producthelaaskader");
		if (productElement != null){
			if(dims.x > 984){
			document.getElementById("producthelaaskader").style.width = Math.round((((dims.x - 984)/2)+753)) + "px";
			document.getElementById("producthelaaskader").style.left = Math.round((((dims.x - 984)/2)*-1)) + "px";
			}
		}
}


var AutoPrint = true; // Indien 'false' wordt de pagina niet automatisch uitgeprint 

function printDiv(){ 
if (document.getElementById != null){ 
var html = '<HTML>\n<HEAD>\n'; 
//if (document.getElementsByTagName != null){ 
//var headTags = document.getElementsByTagName("head"); 
//if (headTags.length > 0) 
//html += headTags[0].innerHTML;} 
html += '\n<title>Club van Wakkere Ouders</title>\n<link href="css/printer.css" rel="stylesheet" type="text/css">\n<style type="text/css"><!-- body { font-family: Arial; font-size: 12px; margin: 20px; overflow:auto;background-image:none; background-color:#FFFFFF;} td {font-family: Arial; font-size: 12px;} --></style>\n</HE' + 'AD>\n<BODY scroll="yes">\n<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td align="center" valign="top" height="130" bgcolor="#FFFFFF"><img src="images/printkop.jpg"></td></tr></table>'; 
var PrintKlaarElem = document.getElementById("printopzet"); 
if (PrintKlaarElem != null){ 
html += PrintKlaarElem.innerHTML;} 
html += '\n</BO' + 'DY>\n</HT' + 'ML>'; 
var printWin = window.open("","PrintPagina"); 
printWin.document.open(); 
printWin.document.write(html); 
printWin.document.close(); 
if (AutoPrint)printWin.print();}} 
