<pre>on togglePalette paletteName  toComputer  ---------------------------------------------------------------------------  if paletteName is "Outils" then    if the visible of tool window is true then      hide tool window      set checkMark of menuItem "Outils" of menu "Fichier" to false    else      show tool window      set checkMark of menuItem "Outils" of menu "Fichier" to true    end if  end if  ---------------------------------------------------------------------------  if paletteName is "Motifs" then    if the visible of pattern window is true then      hide pattern window      set checkMark of menuItem "Motifs" of menu "Fichier" to false    else      show pattern window      set checkMark of menuItem "Motifs" of menu "Fichier" to true    end if  end if  ---------------------------------------------------------------------------  if paletteName is "Navigation" then    if there is a window "Navigator" then      close window "Navigator"      set checkMark of menuItem "Navigation" of menu "Fichier" to false    else      palette navigator      set checkMark of menuItem "Navigation" of menu "Fichier" to true    end if  end if  ---------------------------------------------------------------------------end togglePalette</pre>