﻿// JScript File

function afficheCalque(calque) 
{ 
	var afficheCalque = document.getElementById(calque);
	
	if (afficheCalque != null)
	    afficheCalque.style.display = 'inline'; 
} 

function cacheCalque(calque) 
{ 
	var cacheCalque = document.getElementById(calque);
	
	if (cacheCalque != null)
	    cacheCalque.style.display = 'none'; 
}

function resizeContent()
{
    var header = document.getElementById('header');
    //var content = document.getElementById('content');
    var title = document.getElementById('title');
    var mainContent = document.getElementById('mainContent');
    var footer = document.getElementById('footer');
    
    if (mainContent == null)
        return;
    
    var contentHeight = document.documentElement.clientHeight - (header.offsetHeight + footer.offsetHeight);
    
    var titleHeight = title != null ? title.offsetHeight : 0;
    var mainContentHeight = contentHeight - titleHeight;
    
    //contentHeight = contentHeight > 0 ? contentHeight : 0;
    mainContentHeight = mainContentHeight > 0 ? mainContentHeight : 0;
    mainContent.style.height = mainContentHeight + "px";
    
    //content.style.height = contentHeight + "px";
}

