
!! \tooltip{texte}{option}{popup text}
!set parms=!slashsubst $parms
!set parmscnt=!itemcnt $parms
!set parm1=!item 1 of $parms
!if $parmscnt=2
  !set text=!item 2 of $parms
  !set option=
!else
  !set text=!item 3 to -1 of $parms
  !set option=!item 2 of $parms
!endif
!set option=!trim $option
!set option=!declosing $option
!if $parm1 = $empty
  !set special_out=$text
  !goto end
!else
  !set text=!replace internal &#59; by ; in $text
  !set text=!replace internal &#44; by , in $text
  !set text=!replace internal $\
$ by $ in $text
  !set option_=!lowercase $option
  !!for small compatibility : use the old tooltip without option if no DURATION
  !! the new option will be the css option (very small use with the old tooltip)
  !if option!=$empty and $option=$option_
    !set class=!getopt class in $option
    !set style=!getopt style in $option
    !if $style!=$empty
      !set style=$ style="$style"
    !endif
  !endif
  !set test_div=!detag $text
  !if $test_div=$text
    !set div0=span
  !else
    !set div0=div
  !endif
  !set special_out=$special_out\
    <$div0 class="wims_tooltip">$parm1\
      <$div0 class="wims_tooltiptext $class" $style>$text</$div0>\
    </$div0>
!endif
:end
$special_out

!reset special_out
