+ set scriptQuery query.egw
+ set scriptTarget targets.egw
+
+ set useIcons 1
+
+ button-main
+ if {[info exists nextSetNo]} {
+ button-view-history
+ }
+ button-define-target
+ html "<h2>Select a target</h2><br>\n"
+ html "<dl>\n"
+
+ if {1} {
+ proc headlineC {h} {
+ html {<dt><h2>} $h \n {</h2>}
+ }
+ proc targetC {t} {
+ global targets
+ global env
+ global sessionId
+
+ html {<dt><b><a href="http:} $env(SCRIPT_NAME) /
+ html "$sessionId/query.egw;/-1+$t" {"> } [lindex $targets($t) 0]
+ html {</a></b>}
+
+ html {<dd>}
+ set desc [lindex $targets($t) 4]
+ if {[string length $desc] > 0} {
+ html "$desc<br>\n"
+ }
+ html "<br>\n"
+ }
+ serverList headlineC targetC
+
+ } else {
+ proc targetsCmp {l r} {
+ global targets
+ return [string compare [string tolower [lindex $targets($l) 0]] \
+ [string tolower [lindex $targets($r) 0]]]
+ }
+ set tt [array names targets]
+ set tn [lsort -command targetsCmp $tt]
+ foreach t $tn {