function ouvrirPopup (pFichier, pLargeur, pHauteur)
{
  var posX = (screen.width / 2) - (pLargeur / 2);
  var posY = (screen.height / 2) - (pHauteur / 2);
  wiwin=window.open(pFichier,"popup","width = " + pLargeur + ", height = " + pHauteur + ", left = " + posX + ", top = " + posY + ", resizable = 0");
  if (self.focus) wiwin.focus();
}

function closeDiv(millisec) 
{
  if(document.getElementById('div_popup') && document.getElementById('div_layout'))
  {
    var speed = Math.round(millisec / 100);
    var timer = 0;
    for(i = 100; i >= 0; i--)
    {
      setTimeout("transparent("+i+",'div_popup')",(timer * speed));
      setTimeout("transparent("+(i/2)+",'div_layout')",(timer * speed)); 
      timer++;
    }
    setTimeout("document.body.removeChild(document.getElementById('div_popup'))",(timer * speed));
    setTimeout("document.body.removeChild(document.getElementById('div_layout'))",(timer * speed));
  }
}

function ChangeImageOver (objImg) 
{
  intLongueur = objImg.src.length;
  objImg.src = objImg.src.substr(0,intLongueur-4)+"_over.gif";
}

function ChangeImageOut (objImg) 
{
	intLongueur = objImg.src.length;
	objImg.src = objImg.src.substr(0,intLongueur-9)+".gif";
}
function check_radio() { 
  document.forms['frm_recherche_doc'].type_recherche[1].checked=true

}

function Compter(target, max, nomchamp)
{        
   StrLen = target.value.length 
   
   if (StrLen > max )         
   {
     target.value = target.value.substring(0,max);
     CharsLeft = max;
   }
   else
   {
     CharsLeft = max-StrLen;
   }
   	 
   nomchamp.value = CharsLeft;
} 
