+proc button-europagate {} {
+ global useIcons
+ html {<a href="http://europagate.dtv.dk/">}
+ if {$useIcons} {
+ html {<img src="/egwgif/button-egw.gif" alt="Europagate" border=0></a>}
+ } else {
+ html {Europagate</a> | }
+ }
+}
+
+proc button-define-target {more} {
+ global useIcons
+ global env
+ global sessionId
+
+ html {<a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/tform.egw}
+ if {$useIcons} {
+ html {"><img src="/egwgif/button-define-target.gif" }
+ html {alt="Define Target" border=0></a>}
+ } else {
+ html {">Define Target</a>}
+ if {$more} {
+ html " | \n"
+ } else {
+ html "\n"
+ }
+ }
+}
+
+proc button-new-target {more} {
+ global useIcons
+ global env
+ global sessionId
+ global mMode
+
+ html {<a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId
+ if {$mMode} {
+ html {/mtargets.egw}
+ } else {
+ html {/targets.egw}
+ }
+ if {$useIcons} {
+ html {"><img src="/egwgif/button-new-target.gif" }
+ html {alt="New Target" border=0></a>}
+ } else {
+ html {">New Target</a>}
+ if {$more} {
+ html " | \n"
+ } else {
+ html "\n"
+ }
+ }
+}
+
+proc button-view-history {more} {
+ global useIcons
+ global env
+ global sessionId
+ global nextSetNo
+
+ html {<a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/history.egw;}
+ catch { html "/" $nextSetNo}
+ if {$useIcons} {
+ html {"><img src="/egwgif/button-view-history.gif" alt="View History" }
+ html {border=0></a>}
+ } else {
+ html {">View History</a>}
+ if {$more} {
+ html " | \n"
+ } else {
+ html "\n"
+ }
+ }
+}
+
+proc button-new-query {more setNo} {
+ global useIcons
+ global env
+ global sessionId
+ global hist
+ global mMode
+
+ html {<a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId
+ if {$mMode} {
+ html {/mquery.egw/} $setNo
+ } else {
+ html {/query.egw/} $hist($setNo,0,host) + $setNo
+ }
+ html {">}
+ if {$useIcons} {
+ html {<img src="/egwgif/button-new-query.gif" }
+ html {alt="New Query" border=0></a>}
+ } else {
+ html {New Query</a>}
+ if {$more} {
+ html " | \n"
+ } else {
+ html "\n"
+ }
+ }
+}
+
+proc button-scan-window {more setNo} {
+ global useIcons
+ global env
+ global sessionId
+ global hist
+
+ set targetNo 0
+ html {<a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/search.egw/} $setNo + $targetNo + {scan} {">}
+ if {$useIcons} {
+ html {<img src="/egwgif/button-scan-window.gif" }
+ html {alt="Scan" border=0></a>}
+ } else {
+ html {Scan</a>}
+ if {$more} {
+ html " | \n"
+ } else {
+ html "\n"
+ }
+ }
+}
+
+proc maintenance {} {
+ html {<hr>This page is maintained by }
+ html {<a href="mailto:pwh@dtv.dk"> Peter Wad Hansen </a>.}
+ html {Last modified 29. january 1996. <br>}
+ html {<em> This and the following pages are under construction and }
+ html {will continue to be so until the end of January 1996.</em>}
+}
+
+proc splitHostSpec {host} {
+ set i [string last . $host]
+ if {$i > 1} {
+ incr i -1
+ return [string range $host 0 $i]
+ }
+ return $host
+}
+
+proc mergeHostSpec {host databases} {
+ return ${host}.[join $databases -]
+}
+
+proc mkAssoc {assoc host} {
+ global targets
+
+ if {[catch {$assoc failback fail-response}]} {
+ if {[lindex $targets($host) 6] == "1"} {
+ wais $assoc
+ } else {
+ ir $assoc
+ }
+ } else {
+ if {[lindex $targets($host) 6] == "1"} {
+ if {[$assoc comstack] == "wais"} return
+ wais $assoc
+ } else {
+ if {[$assoc comstack] == "tcpip"} return
+ ir $assoc
+ }
+ }
+}
\ No newline at end of file