+# $Id: search.egw,v 1.17 1995/11/14 16:01:51 adam Exp $
+
+proc buttons {setNo setMax startPos after} {
+ global sessionId
+ global env
+ global hist
+
+ if {$after && $setMax < [z39.$setNo resultCount]} {
+ html "<p>\n"
+ html "<center>\n"
+ html {<a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/search.egw/} $setNo + [expr $setMax + 1]
+ html + [expr $setMax + $hist($setNo,maxPresent)]
+ html {"><img src="/gif/darrw.gif"></a>}
+ html "</center>\n"
+ }
+
+ html "<p>\n"
+ if {$setMax < [z39.$setNo resultCount]} {
+ html {<a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/search.egw/} $setNo + [expr $setMax + 1]
+ html + [expr $setMax + $hist($setNo,maxPresent)]
+ html {">Next records</a>} " | \n"
+ }
+ if {$startPos != "" && $startPos != "1"} {
+ html {<a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/search.egw/} $setNo
+ html + [expr $startPos - $hist($setNo,maxPresent)]
+ html + [expr $startPos - 1]
+ html {">Previous records</a>} " | \n"
+ }
+ html {<a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/query.egw/} $hist($setNo,host) + $setNo
+ html {">New query</a>} " | \n"
+
+ html {<a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/targets.egw">New target</a>} "<p>\n"
+
+ if {!$after && $startPos != "" && $startPos != "1"} {
+ html "<center>\n"
+ html {<a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/search.egw/} $setNo
+ html + [expr $startPos - $hist($setNo,maxPresent)]
+ html + [expr $startPos - 1]
+ html {"><img src="/gif/uarrw.gif"></a>}
+ html "</center><p>\n"
+ }
+
+}