if(document.images)   
{
  var pep_path = "modules/mod_menupep/images/";

  pic1_out = new Image(61,44);
  pic1_out.src=pep_path+"grandes-cultures.gif";  
  pic2_out = new Image(61,44);
  pic2_out.src=pep_path+"horticole.gif";  
  pic3_out = new Image(61,44);
  pic3_out.src=pep_path+"vins.gif";  
  pic4_out = new Image(61,44);
  pic4_out.src=pep_path+"ppam.gif";  
  pic5_out = new Image(61,44);
  pic5_out.src=pep_path+"fruits.gif";  
  pic6_out = new Image(61,44);
  pic6_out.src=pep_path+"legumes.gif";  
  pic7_out = new Image(61,44);
  pic7_out.src=pep_path+"bovins.gif";  
  pic8_out = new Image(61,44);
  pic8_out.src=pep_path+"apicole.gif";  
  pic9_out = new Image(61,44);
  pic9_out.src=pep_path+"aquacole.gif";  
  pic10_out = new Image(61,44);
  pic10_out.src=pep_path+"caprins.gif";  
  pic11_out = new Image(61,44);
  pic11_out.src=pep_path+"avicole.gif";  

  pic1_over = new Image(61,44);
  pic1_over.src=pep_path+"grandes-cultures_over.gif";  
  pic2_over = new Image(61,44);
  pic2_over.src=pep_path+"horticole_over.gif";  
  pic3_over = new Image(61,44);
  pic3_over.src=pep_path+"vins_over.gif";  
  pic4_over = new Image(61,44);
  pic4_over.src=pep_path+"ppam_over.gif";  
  pic5_over = new Image(61,44);
  pic5_over.src=pep_path+"fruits_over.gif";  
  pic6_over = new Image(61,44);
  pic6_over.src=pep_path+"legumes_over.gif";  
  pic7_over = new Image(61,44);
  pic7_over.src=pep_path+"bovins_over.gif";  
  pic8_over = new Image(61,44);
  pic8_over.src=pep_path+"apicole_over.gif";  
  pic9_over = new Image(61,44);
  pic9_over.src=pep_path+"aquacole_over.gif";  
  pic10_over = new Image(61,44);
  pic10_over.src=pep_path+"caprins_over.gif";  
  pic11_over = new Image(61,44);
  pic11_over.src=pep_path+"avicole_over.gif";  

  pic1_over_act = new Image(61,44);
  pic1_over_act.src=pep_path+"home_ro_act.gif";  
  pic2_over_act = new Image(61,44);
  pic2_over_act.src=pep_path+"presentation_ro_act.gif";  
  pic3_over_act = new Image(61,44);
  pic3_over_act.src=pep_path+"services_ro_act.gif";  
  pic4_over_act = new Image(61,44);
  pic4_over_act.src=pep_path+"references_ro_act.gif";  
  pic5_over_act = new Image(61,44);
  pic5_over_act.src=pep_path+"contact_ro_act.gif";  

  pic1_out_act = new Image(61,44);
  pic1_out_act.src=pep_path+"home_act.gif";  
  pic2_out_act = new Image(61,44);
  pic2_out_act.src=pep_path+"presentation_act.gif";  
  pic3_out_act = new Image(61,44);
  pic3_out_act.src=pep_path+"services_act.gif";  
  pic4_out_act = new Image(61,44);
  pic4_out_act.src=pep_path+"references_act.gif";  
  pic5_out_act = new Image(61,44);
  pic5_out_act.src=pep_path+"contact_act.gif";  
}


function pepImageOver(imgName, rootUrl)
{
  if(document.images)
  {
    var imgOver = eval(imgName + "_over.src");
    var reg = /.+\//i; //Récupère tout ce qui se trouve avant le nom du fichier.
    //Supprime tout ce qui se trouve avant le nom du fichier.
    var fileName = imgOver.replace(reg, ""); //Nom du fichier.
    imgOver = rootUrl+pep_path+fileName; //Construit le path vers le fichier.
    document[imgName].src = imgOver;
  }
}

function pepImageOut(imgName, rootUrl)
{
  if(document.images)
  {
    var imgOut = eval(imgName + "_out.src");
    var reg = /.+\//i;
    var fileName = imgOut.replace(reg, "");
    imgOut = rootUrl+pep_path+fileName;
    document[imgName].src = imgOut;
  }
}

function pepImageOverAct(imgName, rootUrl)
{
  if(document.images)
  {
    var imgOverAct = eval(imgName + "_over_act.src");
    var reg = /.+\//i;
    var fileName = imgOverAct.replace(reg, "");
    imgOverAct = rootUrl+pep_path+fileName;
    document[imgName].src = imgOverAct;
  }
}

function pepImageOutAct(imgName, rootUrl)
{
  if(document.images)
  {
    var imgOutAct = eval(imgName + "_out_act.src");
    var reg = /.+\//i;
    var fileName = imgOutAct.replace(reg, "");
    imgOutAct = rootUrl+pep_path+fileName;
    document[imgName].src = imgOutAct;
  }
}


