//<!--
// Construit les modules de facon à les faire derouler
// Compatible avec les structures over-blog V1.0 et v1.10
// v2.0a - 2005 - francisek.over-blog.com
// Pour modifier les modules, c'est en fin de fichier !!
// 
function showHideEl(elId){
if (elId.indexOf("_img") < 0) return;
obj = document.getElementById(elId.substr(0, elId.indexOf("_img") )+"_Content");
im = document.getElementById(elId);
if (im.className.indexOf("box-up-img") >= 0){
im.className = "box-down-img"; im.title="Afficher";
obj.style.display = "none";}else{
im.className = "box-up-img"; im.title="Masquer";
obj.style.display = "block";}}

var derouleModule;

// Pour OB v1.10
function derouleModulev2(theID, visible) {
var theTag = "H2";
if (document.getElementById){
  try{
  var block = document.getElementById(theID);
  if (!block) return;
  var n = block;
  while(n.tagName != theTag){
    if (n.nodeType == 1) n = n.firstChild; else n = n.nextSibling;
  }
// N contient la balise du titre du module
  if (n.tagName == theTag){
    cin = n.parentNode;
    cin.appendChild(document.createElement("div"));
    cin.childNodes[cin.childNodes.length-1].id = theID+"_img";
    if (visible){
      cin.childNodes[cin.childNodes.length-1].title = "Masquer";
      cin.childNodes[cin.childNodes.length-1].className = "box-up-img";}else{
      cin.childNodes[cin.childNodes.length-1].title = "Afficher";
      cin.childNodes[cin.childNodes.length-1].className = "box-down-img";}
      cin.childNodes[cin.childNodes.length-1].border = 0;
      cin.childNodes[cin.childNodes.length-1].onclick = function(){ showHideEl(this.id);}
      // IE ne prends pas de :hover sur les DIV
      if (window.navigator.appName.indexOf("Netscape") == -1){
      cin.childNodes[cin.childNodes.length-1].onmouseover = function(){ 
      if (this.className.indexOf("-hover") == -1) this.className+="-hover";}
      cin.childNodes[cin.childNodes.length-1].onmouseout = function(){ 
        pos = this.className.indexOf("-hover");
        if (pos>0) this.className= this.className.substr(0, pos);}
      }
      if (navigator.appName.indexOf("Netscape") != -1) k=2;else k=1;
     var caninsert = false;
     for (; k < block.childNodes.length && !caninsert;k++){
     if (block.childNodes[k].nodeType == 1 && block.childNodes[k].className == "box-content") {caninsert = true; block.childNodes[k].id = theID+"_Content";
     block.childNodes[k].style.display = (visible==true ? "block": "none");};

    }
  }
} catch(E) {;}
}
}


/* Reconstruit les blocs pour pouvoir les masquer et les renommer, 
theID = id du module à reconstruire
visible = etat d'affichage initial du contenu : true = affiché, false = masqué
*/
function derouleModulev1(theID, visible){
var theTag = "H2";
if (document.getElementById){
try{
var block = document.getElementById(theID);
if (!block) return;
var n = block;
while(n.tagName != theTag){
if (n.nodeType == 1)
n = n.firstChild;
else n = n.nextSibling;}
// N contient la balise du titre du module
if (n.tagName == theTag){
var newNode= document.createElement("DIV");
newNode.className = "box";
newNode.id = theID;
newNode.appendChild(document.createElement("DIV"));
newNode.firstChild.className = "box-top";
cin = newNode.firstChild;

cin.appendChild(document.createElement("DIV"));
cin = cin.firstChild;
cin.className = "box-topLeft";
cin.appendChild(document.createElement("DIV"));
cin = cin.firstChild;
cin.className = "box-topRight";

cin.appendChild(document.createElement("DIV"));
cin = cin.firstChild;
cin.className = "box-titre";
cin.id = theID+"_Title";

cin.appendChild(document.createElement(theTag));
cin = cin.firstChild;
cin.appendChild(n.firstChild);
cin.appendChild(document.createElement("div"));
cin.childNodes[cin.childNodes.length-1].id = theID+"_img";
if (visible){
cin.childNodes[cin.childNodes.length-1].title = "Masquer";
cin.childNodes[cin.childNodes.length-1].className = "box-up-img";}else{
cin.childNodes[cin.childNodes.length-1].title = "Afficher";
cin.childNodes[cin.childNodes.length-1].className = "box-down-img";}
cin.childNodes[cin.childNodes.length-1].border = 0;
cin.childNodes[cin.childNodes.length-1].onclick = function(){ showHideEl(this.id);}
// IE ne prends pas de :hover sur les DIV
if (window.navigator.appName.indexOf("Netscape") == -1){
cin.childNodes[cin.childNodes.length-1].onmouseover = function(){ 
if (this.className.indexOf("-hover") == -1) this.className+="-hover";}
cin.childNodes[cin.childNodes.length-1].onmouseout = function(){ 
pos = this.className.indexOf("-hover");
if (pos>0) this.className= this.className.substr(0, pos);}}
newNode.appendChild(cin = document.createElement("DIV"));
cin.id = theID+"_Content";
if (visible){
cin.style.display = "block";}else{
cin.style.display = "none";}
cin.appendChild(document.createElement("DIV"));
cin = cin.firstChild;
cin.className = "box-bottom";
cin.appendChild(document.createElement("DIV"));
cin = cin.firstChild;
cin.className = "box-left";
cin.appendChild(document.createElement("DIV"));
cin = cin.firstChild;
cin.className = "box-bottomLeft";
cin.appendChild(document.createElement("DIV"));
cin = cin.firstChild;
cin.className = "box-right";
cin.appendChild(document.createElement("DIV"));
cin = cin.firstChild;
cin.className = "box-bottomRight";
cin.appendChild(document.createElement("DIV"));
cin = cin.firstChild;
cin.className = "box-content";
cin.id = theID+"_Content";
if (navigator.appName.indexOf("Netscape") != -1) k=2;
else k=1;
for (; k < n.parentNode.childNodes.length;k++){
cin.appendChild(n.parentNode.childNodes[k].cloneNode(true));}
n = block.parentNode;
n.replaceChild(newNode, block);}}catch(E){;}}}

try {
  derouleModule = (document.getElementById("centrePage") ?  derouleModulev2: derouleModulev1);
} catch(E) {};

/* 
Reconstruit les modules pour pouvoir les masquer.
Pour chaque module a renommer inserer une ligne
derouleModule("theID", visible);
avec 
theID = id du module à reconstruire
visible = etat d'affichage initial du contenu :
true = affiche, false = masque
N'oubliez pas de modifier votre CSS !!
C'EST ICI QUE VOUS POUVEZ MODIFIER !!*/
derouleModule("LeftPart", false);
derouleModule("RightPart", false);
//-->
