  function fnResizeEnd()
  {
    window.clearTimeout(window.resizeEnd);

    var oTableMain = document.getElementById('tableMain');
    var oDivMaster = document.getElementById('divMaster');
    var oHeight01 = document.getElementById('imgHeight01');
    var oHeight02 = document.getElementById('imgHeight02');
    var oHeight03 = document.getElementById('imgHeight03');
    var oHeight04 = document.getElementById('imgHeight04');

    oDivMaster.style.width = '100%'// (document.body.clientWidth - 300) +  'px';
    oDivMaster.style.height = '90px';
    oDivMaster.style.display = '';
    oDivMaster.style.overflowY = 'scroll';
    var nHeight = document.body.clientHeight - (document.body.topMargin || 15) - (document.body.bottomMargin || 15)
                              - Math.max(document.getElementById('tdTitre').scrollHeight, oHeight01.height)
                              - oHeight02.height
                              - oHeight04.height;

    nHeight = Math.max(nHeight, 80);
    oHeight03.height = nHeight;
    oDivMaster.style.height = oHeight03.height + oHeight02.height;

    document.getElementById('marqueeTemoignages').style.height = oHeight03.height + oHeight04.height - 79;
  }
  //
  function resize()
  {
    window.resizeEnd = (window.resizeEnd || true);
    window.clearTimeout(window.resizeEnd);
    window.resizeEnd = window.setTimeout(fnResizeEnd, 100, 'JavaScript');
  }
  //
  function showPopup(event, bForce)
  {
    var sMenuId = 'menuDO';
    if (event == null)
      event = window.event;
    if (event && event.srcElement == null)
      event.srcElement = event.target;

    var oMenu = document.getElementById(sMenuId);
    if (oMenu != null)
    {
      if (bForce != null)
      {
        oMenu.style.display = (bForce == true ? '' : 'none') ;
      }
      else if (oMenu.style.display != 'none')
      {
        if (!oMenu.isMouseOver)
          oMenu.style.display = 'none' ;
      }
      else
      {
        oMenu.style.pixelLeft = event.clientX + document.body.scrollLeft;
        oMenu.style.pixelTop  = event.clientY + document.body.scrollTop;
        oMenu.style.left      = event.clientX + document.body.scrollLeft;
        oMenu.style.top       = event.clientY + document.body.scrollTop;
        oMenu.onmouseover = new Function('this.isMouseOver = true;');
        oMenu.onmouseout  = new Function('this.isMouseOver = false;');
        oMenu.style.display = '';
      }
      document.onmousedown  = (oMenu.style.display == 'none' ? null : showPopup );
    }
  }

  //
  function setRowColor(oObj, bOn, nColorSet)
  {
    //var aColorSet = [['#26AD92','white']];
    var aColorSet = [['#26AD92','black']];
    nColorSet = nColorSet || 0;
    nColorSet = Math.min(nColorSet, aColorSet.length-1);

    oObj.style.color = aColorSet[nColorSet][(bOn ? 0:1)];
    //oObj.style.backgroundColor = aColorSet[nColorSet][(bOn ? 0:1)];
  }
  //
  function rndCol()
  {
    return '#' + ('0' + Math.round(Math.random() * 256).toString(16)).replace(/^0(..)/, '$1') +
                 ('0' + Math.round(Math.random() * 256).toString(16)).replace(/^0(..)/, '$1') +
                 ('0' + Math.round(Math.random() * 256).toString(16)).replace(/^0(..)/, '$1');
  }
  //
  function windowOnBeforePrint()
  {
      document.getElementById('tdTitrePrint').innerHTML = document.getElementById('tdTitre').innerHTML;
      document.getElementById('tdMasterPrint').innerHTML = document.getElementById('divMaster').innerHTML;
  }

