function swfobject_include(siteurl, id, title, type) {

	if(jQuery.cookie('openvarexhuis') == null) {
		if(type != '') {
			jQuery.cookie('openvarexhuis', 'showonceaday', { expires: 1 });
			setTimeout("swfobject_frontpagelayeradd('"+siteurl+"', '"+id+"', '"+title+"', '"+type+"')", 2000);
		}
	}
	//jQuery.cookie('openvarexhuis', null);

	if(document.getElementById('frontpageanimation')) {
		swfobject_frontpageanimation(siteurl, id, title);
	}
	if(document.getElementById('openhuisanimation')) {
		swfobject_openhuisanimation(siteurl, id, title, type);
	}

}
function swfobject_frontpageanimation(siteurl, id, title, type) {
	var randomload = Math.floor(Math.random() * 10000 + 1);
	var flashvars = {
		XMLfile: siteurl + "/image/web/animatie/voorpagina/voorpagina.xml?r=" + randomload,
		siteurl: siteurl
	};
	var params = {
		menu: "false",
		allowfullscreen: "true",
		allowscriptaccess: "always",
		wmode: "transparent",
		quality: "best"
	};
	var attributes = {
		id: "frontpageanimationani",
		name: "frontpageanimationani"
	};
	swfobject.embedSWF(siteurl+"/image/web/animatie/voorpagina/voorpagina.swf?r=" + randomload, "frontpageanimation", "580", "430", "8.0.0", "", flashvars, params, attributes);
}
function swfobject_openhuisanimation(siteurl, id, title, type) {
	if(siteurl == 'http://www.varexhuis.nl') {
		gKey = 'ABQIAAAADijT4-80XxVFYvH4YQhqexTMSbSz7riDh8XpghdLco_oR_E_zhS8_9e-lgAlPjRNhmiSxIY3X8FPJQ';
	} else if(siteurl == 'http://varexhuis.nl') {
		gKey = 'ABQIAAAADijT4-80XxVFYvH4YQhqexQg5XeEPYm3CWOKxEXvC0SoClNLbRTzmxoY-xeJPgithZ2zIwcBgnt9dA';
	} else if(siteurl == 'http://192.168.50.1/VAREXHUIS') {
		gKey = 'ABQIAAAADijT4-80XxVFYvH4YQhqexSeDW3ne0Bi-GfUPKpzv0r1i5J91xTER1EsqNNTa5D5WVr74zBLfQTx9Q';
	} else if(siteurl == 'http://192.168.50.5/VAREXHUIS') {
		gKey = 'ABQIAAAAe08uJSn9glgvj0IhnTPA1RQgUzaW5GRlqcEpXWnrajIQyxQpthQEG7jzX1uj25agupxbdJyfmK9MbQ';
	} else if(siteurl == 'http://192.168.50.5/varexhuis') {
		gKey = 'ABQIAAAAe08uJSn9glgvj0IhnTPA1RS15aSsclT-S0DMsUswBKIQoA8jahSmIZq138xVuGXJ8C0YtcH2CmLpKw'
	}
	var flashvars = {
		pageID: type,
		pageFile: siteurl + "/image/web/animatie/3d/" + type + ".swf",
		googleXML: siteurl + "/include/openhuislocaties.xml.php?id="+id,
		googleKey: gKey,
		googleMarker: siteurl + "/image/web/animatie/openhuis/marker.png",
		XMLfile: siteurl + "/include/openhuis.xml.php?id="+id,
		siteurl: siteurl
	};
	var params = {
		menu: "false",
		allowfullscreen: "true",
		allowscriptaccess: "always",
		wmode: "transparent",
		quality: "best"
	};
	var attributes = {
		id: "openhuisanimationani",
		name: "openhuisanimationani"
	};
	swfobject.embedSWF(siteurl+"/image/web/animatie/openhuis/openhuis.swf", "openhuisanimation", "580", "430", "9.0.0", "", flashvars, params, attributes);
}
function swfobject_frontpagelayeradd(siteurl, id, title, type) {
	var flashvars = {
		pageID: type,
		pageTitle: title,
		siteurl: siteurl
	};
	var params = {
		menu: "false",
		allowfullscreen: "true",
		allowscriptaccess: "always",
		wmode: "transparent",
		align: "t",
		quality: "best"
	};
	var attributes = {
		id: "frontpagelayeraddani",
		name: "frontpagelayeraddani"
	};
	swfobject.embedSWF(siteurl+"/image/web/animatie/openhuis/layeradd.swf", "frontpagelayeradd", "100%", "650", "8.0.0", "", flashvars, params, attributes);
	show_frontpagelayeradd();
}
function hide_frontpagelayeradd() {
	var elem = document.getElementById('frontpagelayer');
	if(elem) {
		elem.innerHTML = '';
		elem.style.display = 'none';
	}
}
function show_frontpagelayeradd() {
	var elem = document.getElementById('frontpagelayer');
	if(elem) {
		elem.style.display = 'block';
	}
}
