/*
	version		1.00
	project		Website 'www.active-personeelsdiensten.com' (2006-12)
	client		Active Uitzendorganisatie Venray BV

	author		Guilty by Design (www.guiltybydesign.eu)
	copyright	Guilty by Design (www.guiltybydesign.eu)
				Dynamic Drive (www.dynamicdrive.com)
				Roy Whittle (www.javascript-fx.com)

	remarks		
*/
AddLoadEvent(DivFloat);

function iecompattest(){
	return(document.compatMode && document.compatMode!="BackCompat") ? document.documentElement : document.body;
}
function DivFloat(){
	barheight = document.getElementById('bottommenu').offsetHeight;
	var ns = (navigator.appName.indexOf("Netscape") != -1) || window.opera;
	var bottommenuDiv = document.getElementById('bottommenu');
	var topmenuDiv = document.getElementById('topmenu');
	bottommenuDiv.style.visibility = "visible";
	topmenuDiv.style.visibility = "visible";
	if(document.layers){
		bottommenuDiv.style = bottommenuDiv;
		topmenuDiv.style = topmenuDiv;
	}
	bottommenuDiv.setPosition = function(x,y){
		this.style.left = x + 'px';
		this.style.top = y + 'px';
	};
	topmenuDiv.setPosition = function(x,y){
		this.style.left = x + 'px';
		this.style.top = y + 'px';
	};
	bottommenuDiv.x = 943;
	bottommenuDiv.y = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight;
	bottommenuDiv.y -= 0;
	topmenuDiv.x = 938;
	topmenuDiv.y = 0;
	window.Float = function(){
		var PageBottom = ns ? pageYOffset + innerHeight - barheight: iecompattest().scrollTop + iecompattest().clientHeight - barheight;
		var PageTop = ns ? pageYOffset : iecompattest().scrollTop;
		bottommenuDiv.y += (PageBottom - 5 - bottommenuDiv.y)/8;
		topmenuDiv.y += (PageTop + 0 - topmenuDiv.y)/8;
		bottommenuDiv.setPosition(bottommenuDiv.x, bottommenuDiv.y);
		topmenuDiv.setPosition(topmenuDiv.x, topmenuDiv.y);
		setTimeout("Float()", 10);
	}
	Float();
}

