// JavaScript Document
//min dimensions for the SWF
var min_width = 960;
var min_height = 630;

//to get the viewport size
function getViewportSize() { 
	var size = [0, 0]; 
	if (typeof window.innerWidth != "undefined") { 
		size = [window.innerWidth, window.innerHeight];
	} 
	else if (typeof document.documentElement != "undefined" && typeof document.documentElement.clientWidth != "undefined" && document.documentElement.clientWidth != 0) {
		size = [document.documentElement.clientWidth, document.documentElement.clientHeight]; 
	}
	else {
		size = [document.getElementsByTagName("body")[0].clientWidth, document.getElementsByTagName("body")[0].clientHeight]; 
	}
	return size; 
}

//resizer
function resize() {
	var el = document.getElementById("yetinachtjacht");
	if(el) {
		var size = getViewportSize(); 
		el.style.width = size[0] < min_width ? min_width+"px" : "100%";
		el.style.height = size[1] < min_height ? min_height+"px" : "100%";
	}
}

//onload handler
window.onload = function() {
	resize();
}

//resize handler
window.onresize = function() {
	resize();
}		

//GOOGLE ANALYTICS FUNCTIONS
function pushEvent(category, action, opt_label, opt_value){	
	_gaq.push(['_trackEvent', category, action, opt_label, opt_value]);
}

function pushPageview(code){	
	_gaq.push(['_trackPageview', code]);
}

function pushCustomVar(index, name, value, opt_scope){	
	_gaq.push(['_setCustomVar', index, name, value, opt_scope]);		
}
