## See skins/original/header.txt for commentary; not repeated here.
proc getLogoUrl { baseurl } {
set idx(first) [string first // $baseurl]
if {$idx(first) != -1} {
set idx(first+1) [expr {$idx(first) + 2}]
set idx(nextRange) [string range $baseurl $idx(first+1) end]
set idx(next) [string first / $idx(nextRange)]
if {$idx(next) != -1} {
set idx(next) [expr {$idx(next) + $idx(first+1)}]
set idx(next-1) [expr {$idx(next) - 1}]
set scheme [string range $baseurl 0 $idx(first)]
set host [string range $baseurl $idx(first+1) $idx(next-1)]
if {[string compare $scheme http:/] == 0} {
set scheme http://
} else {
set scheme https://
}
set logourl $scheme$host/
} else {
set logourl $baseurl
}
} else {
set logourl $baseurl
}
return $logourl
}
set logourl [getLogoUrl $baseurl]
$
$
if {[info exists login]} {
html "$login\n"
} else {
html "Login\n"
}