
// resizing
function ResizeSiteHeightAccueil()
{
    if  (document.body.clientWidth < 1000)
    	{
    	jQuery("#page").css("left", "0px");
    	jQuery("#page").css("marginLeft", "0px");    	        	    
    	}

 	var hauteur_content = jQuery("#content").outerHeight();
    hauteur_content += 560; //taille du schema et des articles
    var hauteur_leftColumn = jQuery("#leftColumn").outerHeight();
     
    var hauteur_max = Math.max(hauteur_content, hauteur_leftColumn);       
    hauteur_max += 190;            
    jQuery("#footer").css("top", hauteur_max);        
    jQuery("#page").css("visibility", "visible"); 
       
}

function ResizeSiteHeight()
{
    if  (document.body.clientWidth < 1000)
   	{
       	jQuery("#page").css("left", "0px");
       	jQuery("#page").css("marginLeft", "0px");    	        	    
   	}	    

    // handle bottom div
    var hauteur_max = Math.max(jQuery("#leftColumn").outerHeight(), jQuery("#content").outerHeight());            
    hauteur_max += 172;            
    jQuery("#footer").css("top", hauteur_max);        
    jQuery("#page").css("visibility", "visible");
    
    if (jQuery("#div_localisation") != null)
        jQuery("#div_localisation").css("visibility", "visible"); 
    
    jQuery("#footer").css("visibility", "visible");
    
}	  
        



// RS >> ajax menu loader
function LoadMenu()
{
   jQuery.ajax({
      url: '/sites/module/ajax/getTopMenu.php',
      data: "id_doc=" + jQuery("body").attr("currentDocId"),
      cache: false,
      async: false,       
      success: function(response) {
        //alert(response);
        jQuery('#menu_accueil').html(response);
      }
    });
}
// RS >> ajax last subscribers loader
function LoadLastSubscribers()
{
    jQuery.ajax({
      url: '/sites/module/ajax/getLastSubscribers.php',
      data: "id_doc=" + jQuery("body").attr("currentDocId") + "&nb_abonnes=8",
      cache: false,
      async: false,       
      success: function(response) {
        //alert(response);
        jQuery('#last_subscribers').html(response);
        SexyLightbox.refresh();
      }
    });        
}
//RS >> ajax offres d'emploi
function LoadJobOffers()
{
    jQuery.ajax({
      url: '/sites/module/ajax/getJobOffers.php',
      data: "id_doc=" + jQuery("body").attr("currentDocId"),
      cache: false,
      async: false,       
      success: function(response) {
        //alert(response);
        jQuery('#panelHeader_Temoignage .panelHeader_content').html(response);
      }
    });
    // recharger toutes les 7 secondes
    setTimeout("LoadJobOffers()", 7000);
}

function DepotCandidature(id_offre)
{
	document.location.href = "/DetailOffre?offre="+id_offre;
}




