// UnikAvecListe
//
//0 : Eteint
//1 : Allumé  
//2 : Sélectionné

if (typeof permananentSelection_UNIK == "undefined") permananentSelection_UNIK = true;
if (typeof TimerDelayForOff_UNIK == "undefined") TimerDelayForOff_UNIK = 1500;
if (typeof pressedDest_UNIK == "undefined") pressedDest_UNIK = null;

function TimerGo_UNIK(dest, id)
{
  if (dest != null)
  {
    document[dest].src = eval(id + '_0' + '.src');
    
    pressedDest_UNIK = null;
  }
}

function ShowUNIK(id, dest) // "NT_n","NT345"
{
  IdChaine = id.substring(0,id.length-2);// "NT"
  Extention = id.substring(id.length-1,id.length);// "n"
  
  if(pressedDest_UNIK == dest) return;
  if(Extention == '2')
  {
    if (pressedDest_UNIK != null) document[pressedDest_UNIK].src = eval(IdChaine + '_0' + '.src');
    pressedDest_UNIK = dest;
    
    if (!permananentSelection_UNIK)
    {
      if (dest) setTimeout("TimerGo_UNIK('" + dest + "','" + IdChaine + "')",TimerDelayForOff_UNIK);
    }
  }
  
  if (dest != null)
  {
    document[dest].src = eval( id + '.src');
    //alert('id = <'+id+'>  -  dest = <'+dest+'>');
  }
}
// alert('dest = <'+dest+'>');
//alert('id = <'+id+'>  -  dest = <'+dest+'>');
//if(pressedItem_UM == IdChaine && (Extention == '1' || Extention == '0')) return;
//alert("pressedDest_UM = "+pressedDest_UM+"   -   dest = "+dest);
//alert("pressedItem_UM = "+pressedItem_UM+"  -  pressedDest_UM = "+pressedDest_UM+"  -   Id = "+id+"   -    IdChaine = "+IdChaine+"   -    dest = "+dest);
//alert("dest = <"+dest+">   -    IdChaine = <"+IdChaine+'>');

