/**
 * id of content element, determines height of page
 **/
var cid = 'content';

/**
 * id of footer element, sticks to bottom of viewport, or bottom of content, depending on which is largest.
 **/
var fid = 'onderbalk';

function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}
function setFooter(contentID, footerID) {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var contentHeight = document.getElementById(contentID).offsetHeight;
			var footerElement = document.getElementById(footerID);
			var footerHeight  = 33;//footerElement.offsetHeight;
			if (windowHeight - (contentHeight + footerHeight) >= 0) {
				footerElement.style.position = 'relative';
				footerElement.style.top = (windowHeight - (contentHeight + footerHeight)) + 'px';
			}
//			else {
//				footerElement.style.position = 'static';
//			}
		}
	}
	//alert('setfooter');
	$(fid).show();
//	alert($(fid));
	jQuery(document).ready(
		function()
		{
			jQuery('#dock2').Fisheye(
				{
					maxWidth: 60,
					items: 'a',
					itemsText: 'span',
					container: '.dock-container2',
					itemWidth: 40,
					proximity: 80,
					alignment : 'left',
					valign: 'bottom',
					halign : 'center'
				}
			)
		}
	);
}

var debug;
var loadflash = false;
var loadplayer = false;
window.onload = function() {
	setFooter(cid, fid);
	if(loadflash) {
		UFO.create(FO, "flashkop");
	}
	
	if (loadplayer) {
		UFO.create(s1, "mediaspace");
	}
	//debug = document.getElementById("debug");
}
window.onresize = function() {
	setFooter(cid, fid);
}
