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() {
	var windowHeight = getWindowHeight();
	var headerHeight = $("header").getHeight() + 20;
	var contentHeight = $("content").getHeight();
	var footerHeight = $("footer").getHeight();
	
	if (windowHeight<(contentHeight+headerHeight+footerHeight+20)) windowHeight = (contentHeight+headerHeight+footerHeight+20);
	
	if (windowHeight<650) windowHeight = 650;
	
	$("menu").setStyle({
	  height: (((windowHeight-headerHeight)-footerHeight-20)+'px')
	});
	
	$("menu_content_separator").setStyle({
	  height: (((windowHeight-headerHeight)-footerHeight)+'px')
	});
	
	$("polaris").show();
	$("footer").show();
}

function showGeneralMap() {
	$("map_details").hide();
	$("map_general").show();
}

function showDetailsMap() {
	$("map_general").hide();
	$("map_details").show();
}

function showContacts(service) {
	$("compta").hide();
	$("legal").hide();
	$("audit").hide();
	$("societes").hide();
	$("secretariat").hide();
	$("rh").hide();
	$("finance").hide();
	$("comptes").hide();
	$("normes").hide();
	$(service).show();
}

window.onload = function() {
	setFooter();
}
window.onresize = function() {
	setFooter();
}