// Ajoute la classe 'active' au ul du topMenu en detectant sur quelle page on se trouve grace à la variable $page alimentée dans config.php
function setActiveTopMenu(page){
	$('#topMenu ul li').each(function(){
		if ($(this).children().attr('href') == page)
			{
				$(this).addClass('active');
			}		
		})
}

function setActiveSubMenu(page){
	$('#subMenu ul li').each(function(){
		if ($(this).children().attr('href') == page)
			{
				$(this).addClass('active');
			}		
		})
}

function setActiveFooterMenu(page){
	$('#footer ul li').each(function(){
		if ($(this).children().attr('href') == page)
			{
				$(this).addClass('active');
			}		
		})								
}


function getServiceMail(service){
	var mail = '';
	switch(service)
    {
		case "Direction générale" : 
			mail = "info@simat.ci";  break; /////////////
		case "San Pedro" : 
			mail = "info@simat.ci";  break; /////////////
		case "Commercial" : 
			mail = "commercialcotation@simat.ci";  break;
		case "Transit maritime" : 
			mail = "transitexport@simat.ci";  break;
		case "Informatique" : 
			mail = "info@simat.ci";  break;
		case "Manutention / Entreposage" : 
			mail = "acconage@simat.ci";  break;
		case "Aéroport" : 
			mail = "aerien@simat.ci";  break;
		case "Garage" : 
			mail = "garage@simat.ci";  break;
		case "Juridique" : 
			mail = "juridique@simat.ci";  break;
		case "Administration" : 
			mail = "personnel@simat.ci";  break;
		case "Shipping" : 
			mail = "shipping@simat.ci";  break;
		case "Groupage / Dégroupage" : 
			mail = "degroupage@simat.ci";  break;
		case "Facturation" : 
			mail = "facturation@simat.ci";  break;
		case "Hinterland" : 
			mail = "info@simat.ci";  break; /////////////
		case "Comptabilite" : 
			mail = "comptabilite@simat.ci";  break;
		case "Contact Général" : 
			mail = "info@simat.ci";  break; /////////////
		case "Communication" : 
			mail = "communication@simat.ci";  break; 
		default :
			mail = "info@simat.ci";  break; /////////////
    }
	return mail;
}

function fixDivSize()
{
	var heightLeft = $('#corp #content').innerHeight();
	var heightRight = $('#right').innerHeight();
	var heightFooter = $('.footer').innerHeight();

	if (heightLeft < heightRight){$('#corp #content').css('min-height',heightRight - 48 + 'px');}
	if (heightLeft > heightRight){}
}

