!if $classcnt1+$classcnt2<1 and $kw = $empty
  $name_noclass
  !if $excls!=yes and ($supertype!=4 or ($supertype=4 and $ctypename iswordof course program)) and ($class_type!=2)
    <div class="wimscenter">
!!   !set wims_ref_class=wims_button
!!   !href cmd=reply&job2=sharelist $name_infoshare
    !set wims_ref_class=wims_button
    !href cmd=reply&keyword=*&excls=yes $name_exampleclass
    </div>
 !endif
 !exit
!endif

!if $job2!=first
  !read neighbor/$job2.phtml
  !if $class_type!=3
  !! not a program
    <div class="wimscenter">
    !set wims_ref_class=wims_button
    !href cmd=reply&job2=first $wims_name_back2
    !if $job2!=sharelist and $excls!=yes
      !set wims_ref_class=wims_button
      !href cmd=reply&job2=sharelist $name_infoshare
    !endif
    </div>
  !endif
  !exit
!endif

<p>
$name_help
 $
!set wims_ref_class=wims_button_help
!href cmd=help&special_parm=neighbor $wims_name_help
&nbsp;&nbsp;
!set wims_ref_class=wims_button_help
!href cmd=help&special_parm=neiexample $name_example
</p>

!if $excls!=yes and ($supertype!=4 or ($supertype=4 and $ctypename iswordof course program))
  <div class="wimscenter">
  !set wims_ref_class=wims_button
  !href cmd=reply&job2=sharelist $name_infoshare
  !set wims_ref_class=wims_button
  !href cmd=reply&keyword=*&excls=yes $name_exampleclass
  </div>
!endif

!if $excls=yes
  <div class="wimscenter">
  !href cmd=reply&job=neighbor&excls=no $name_listclass
  </div>
!endif

!if $toomany=yes
  !form reply
  !if $kw=$empty
    <label for="keyword2">$name_toomany
  !else
    $name_toomany2
  !endif
  <p class="wimscenter">
  <input size="20" name="keyword" value="$keyword" id="keyword2">
  <input type="submit" value="$wims_name_tosave">
  </p>
  !formend
!else
  !if $kw != $empty or $classcnt1 + $classcnt2 > 20
    !form reply
    <label for="keyword1">$name_research</label>
    <input size="20" name="keyword" value="$keyword" id="keyword1">
    <input type="submit" value="$wims_name_tosave">

    !formend
  !endif
!endif
!if $classcnt1 + $classcnt2 < 1
  $name_noclass
  !exit
!endif

!if $toomany=yes
  !exit
!endif
<p>
$name_changeneigh
</p>
!if $classcnt1>0
  !set clst=$clist1
  $table_header
    <caption>$name_samelanguage</caption>
  !read neighbor/clist.phtml
  $table_end
!endif

!if $classcnt2>0

  !set clst=$clist2
  $table_header
  <caption>$name_otherlanguage</caption>
  !read neighbor/clist.phtml
  $table_end
!endif
