
<!-- Definition of query sttyles -->

<Env0 type="raw">
	<Define> ^period-switch ()
	<Arguments> ^p </Arguments>
	<Switch>
	<Case> (= p 'now)
		([GetXLTime format="W3C-DTF"])
	</Case>
	<Case> (= p 'undef)
		^""
	</Case>
	<Case> 1
		^p
	</Case>
	</Switch>
	</Define>

	<Define> ^gb-template1 ()
	<Arguments>
		^keyword
		^property
		^period.type
		^period.from
		^period.to
	</Arguments>
	<Sequence> ()
		<Define> ^period.from (period-switch period.from) </Define>
		<Define> ^period.to (period-switch period.to) </Define>
		<Define> ^property
			(quote ([qualifier cond="part"]
				($ gb-ns) 0
				"property" () ($ property)))
		</Define>
		<Define> ^period
			(quote ([qualifier cond="boundary"]
				($ gb-ns) 0
				"content.period" ($ period.type)
				($ (+ period.from " / " period.to))))
		</Define>
		<If> (Or (= keyword ()) (= keyword ""))
		<Then>
			(List 'AND
				property
				period)
		</Then>
		<Else>
			(List 'AND
				(quote ([qualifier cond="part"]
					($ gb-ns) -1
					() () ($ keyword)))
				property
				period)
		</Else>
		</If>
	</Sequence>
	</Define>

</Env0>

<!-- Definition of GLOBALBASE CONTROL PAGE Styles -->


<Sequence> ^Env0
	<Define> ^resource-homepage ()
	<Arguments> ^rid ^title </Arguments>
	<gv-resource rid="^rid">
		<Define> ^h (gv-get-bib gb-ns -1 "homepage") </Define>
		<If> (= h ())
		<Then> ^title </Then>
		<Else>
		<For dec="h">
			<Define> ^a (GetElement (car h) 4) </Define>
			(quote(
			<A HREF="$a"> ($ title) </A>
			))
		</For>
		</Else>
		</If>
	</gv-resource>
	</Define>

	<Define> ^resource-title ()
	<Arguments> ^rid </Arguments>
	<gv-resource rid="^rid">
	<Define> ^title (gv-get-bib gb-ns 0 "title") </Define>
	<Define> ^subtitle (gv-get-bib gb-ns 0 "subtitle") </Define>

	<If> (= subtitle ())
	<Then>
		<Define> ^ret () </Define>
	</Then>
	<Else>
		<Define> ^ret (List ")") </Define>
	</Else>
	</If>

	<For> (Not (= subtitle ()))
	<Sequence> ()
		<set> ^ret (cons (GetElement
			(car subtitle) 4) ret)
		</set>
		<set> ^subtitle (cdr subtitle) </set>
	</Sequence>
	</For>

	<If> (Not (= ret ()))
	<Then>
		<Define> ^ret (cons "(" ret) </Define>
	</Then>
	</If>

	<For> (Not (= title ()))
	<Sequence> ()
		<set> ^ret (cons (GetElement
			(car title) 4) ret)
		</set>
		<set> ^title (cdr title) </set>
	</Sequence>
	</For>
	<If> (= ret ())
	<Then>
		(resource-homepage rid "UNTITLED")
	</Then>
	<Else>
		(resource-homepage rid ret)
	</Else>
	</If>
	</gv-resource>
	</Define>

	<Define Order="Applicative"> ^element-link ()
	<Arguments> ^sym </Arguments>
	<Sequence> ()
		<Define> ^rid
			(GetElement (GetElement sym 'rid) 1)
		</Define>
		<Define> ^entry-URI
			(GetElement (GetElement sym 'entry-URI) 1)
		</Define>
		<Define> ^target-URI
			(GetElement (GetElement sym 'target-URI) 1)
		</Define>
		<Switch>
		<Case> (= rid ())
			1
		</Case>
		<Case> (= (/ rid 0x10000) rt-coordinate)
			<Define> ^element-uri
				(+ "/resource/coordinate/" rid "/")
			</Define>
		</Case>
		<Case> (= (/ rid 0x10000) rt-map)
			<Define> ^element-uri
				(+ "/resource/map/" rid "/")
			</Define>
		</Case>
		<Case> (= (/ rid 0x10000) rt-luster.r64)
			<Define> ^element-uri
				(+ "/resource/luster.r64/" rid "/")
			</Define>
		</Case>
		<Case> (= (/ rid 0x10000) rt-vector)
			<Define> ^element-uri
				(+ "/resource/vector/" rid "/")
			</Define>
		</Case>
		</Switch>
		<If> (= rid ())
		<Then>
		()
		</Then>
		<Else>
		<quote>(
			"ID:" <A HREF="$element-uri"> ($ rid) </A>
			<BR/>
			<B> ($ (resource-title rid))</B>
			<BR/>
			"Entry:" ($ entry-URI)
			<BR/>
			"Target:" ($ target-URI)
			<BR/>
		)</quote>
		</Else></If>
	</Sequence>
	</Define>

</Sequence>

<Sequence> ^HTMLdb

	<Define> ^content-type ()
	<Arguments/>
	(+ 
	"&lt;meta http-equiv=\"Content-Type\" content=\"text/html; charset="
	(GetHTMLCharSet)
	"\">")
	</Define>

	<Define> ^main-menu
	(quote(
		("AboutCOSMOS" () "/")
		("Radar" Radar-menu "/sys/radar/layer.html")
		("Search" Search-menu "/sys/search/periquery.html")
		("Preferences" Pref-menu "/sys/pref/setuphome-1.html")
	))
	</Define>

	<Define> ^Radar-menu
	(quote(
		("CoordinateLayer" () "/sys/radar/layer.html")
		("Notes" () "/sys/radar/notes.html")
		("Status" () "/sys/radar/radar.html")
	))
	</Define>

	<Define> ^Search-menu
	(quote(
		("PeriodicSearch" () "/sys/search/periquery.html")
		("URLSearch" () "/sys/search/urlquery.html")
		("GoHome" () "/sys/search/gohome.html")
	))
	</Define>

	<Define> ^Pref-menu
	(quote(
		("SetupHome" () "/sys/pref/setuphome-1.html")
		("HTTPProxy" () "/sys/pref/httpproxy.html")
		("NativeProxy" () "/sys/pref/nativeproxy.html")
		("Cache" () "/sys/pref/cache.html")
		("ResetAll" () "/sys/pref/reset.html")
	))
	</Define>

	<Define> ^menu ()
	<Arguments> ^ind </Arguments>
	<Sequence> ()
	<Define> ^menu ^main-menu </Define>
	<Define> ^ret () </Define>
	<For> (And (Not (= ind ())) (Not (= menu ())))
	<Sequence> ()
		<Define> ^target (car ind) </Define>
		<Define> ^n-menu () </Define>
		<set> ^ret (Append ret '("|")) </set>
		<For> (Not (= menu ()))
		<Sequence> () 
			<Define> ^ref (GetElement (car menu) 2) </Define>
			<set> ^ret (Append ret
				(If (= (car(car menu)) target)
				(Then (List target "|"))
				(Else (quote(
				<A HREF="$ref"> ($ (car(car menu))) </A> "|"
				))))
			) </set>
			(If (= (car(car menu)) target)
				(Then (set n-menu (GetElement (car menu) 1))))
			<set> ^menu (cdr menu) </set>
		</Sequence>
		</For>
		<set> ^ret (Append ret (quote ( <BR/> ))) </set>
		<set> ^menu (Eval (CurrentEnvironment) n-menu) </set>
		<set> ^ind (cdr ind) </set>
	</Sequence>
	</For>
	^ret
	</Sequence>
	</Define>

	<Raw url = "/Polling.class" update="regist">
		^PollingClass
	</Raw>
	<Raw url = "/**/Polling.class" update="regist">
		^PollingClass
	</Raw>

	<Raw url = "/sys/symbols/*" update="regist">
		<gv-resource rid="7">
			<Define> ^url (CutString GET 13
					(StringLength GET))
			</Define>
			(gv-get-raw-image
				(DecodeURLString url))
		</gv-resource>
	</Raw>

	<Define Order="Normal"> ^element ^sym
	<quote>(
		<LI/>
		($ (element-link sym))
	)</quote>
	</Define>

	<Define> ^header-style ()
	<Arguments> ^path </Arguments>
	<Sequence> ()
		<set> ^polling-count (+ polling-count 1) </set>
		<quote>(
		<APPLET CODE="Polling.class" WIDTH="#400" HEIGHT="#30">
		<PARAM NAME="#host" VALUE="$Host-name"/>
		<PARAM NAME="#port" VALUE="$Host-port"/>
		<PARAM NAME="#sendData" VALUE="$path"/>
		<PARAM NAME="#id" VALUE="$polling-count"/>
		</APPLET>
		<TABLE>
		<TR ALIGN="left" VALIGN="top">
		<TD BGCOLOR = "##40E0D0">
		<B>GLOBALBASE CONTROL PAGE</B>
		</TD>
		</TR>
		</TABLE>
		)</quote>
	</Sequence>
	</Define>

	<Define> ^header-style-simple ()
	<Arguments> ^path </Arguments>
	<Sequence> ()
		<set> ^polling-count (+ polling-count 1) </set>
		<quote>(
		<APPLET CODE="Polling.class" WIDTH="#400" HEIGHT="#30">
		<PARAM NAME="#host" VALUE="$Host-name"/>
		<PARAM NAME="#port" VALUE="$Host-port"/>
		<PARAM NAME="#sendData" VALUE="$path"/>
		<PARAM NAME="#id" VALUE="$polling-count"/>
		</APPLET>
		)</quote>
	</Sequence>
	</Define>

	<Define Order="Normal"> ^indicated ^sym
	<Sequence> ()
		<cons>
			^'UL
			<ListEval> () (Next sym) </ListEval>
		</cons>
	</Sequence>
	</Define>

	<Define Order="Normal"> ^hide ^sym
	<Sequence> ()
		<cons>
			^'UL
			<ListEval> () (Next sym) </ListEval>
		</cons>
	</Sequence>
	</Define>

	<HTML url="/" eval="off" update="regist">
	<HEADER>
	<TITLE> GLOBALBASE COSMOS </TITLE>
	($ (content-type))
	</HEADER>
	<BODY BGCOLOR = "##FFFFFF">
	($ (header-style GET))

	($ (menu '("AboutCOSMOS")))
	<HR/>

	<H3> COSMOS GLOBALBASE VIEWER </H3>
	<H3>
	<A HREF="http://www.globalbase.org/">
	http://www.globalbase.org/</A>
	</H3>

	<TABLE BORDER="#0">
	<TR>
	<TD><B>Version:</B></TD>
	<TD>
	<B>($ (GetElement ([GetVersion layer="AP.code"]) 3))</B>
	</TD>
	</TR>

	<TR>
	<TD><B>Copyright:</B></TD>
	<TD>
	<B>($ (GetElement ([GetVersion layer="AP.code"]) 2))</B>
	</TD>
	</TR>

	<TR>
	<TD></TD>
	<TD WIDTH="#450">
	This program is free software; you can redistribute it 
	and/or modify it under the terms of the 

	<A HREF="http://globalbase.sourceforge.jp/home/ja/license.html">
	GLOBALBASE Library General Public License ^"(G-LGPL) " 
	</A>
	as published by 

	<A HREF="http://www.globalbase.org/">
	http://www.globalbase.org/
	</A> .

	<BR/><BR/>

	This program is distributed in the hope that it will be 
	useful, but WITHOUT ANY WARRANTY; without even the 
	implied warranty of MERCHANTABILITY or FITNESS FOR A 
	PARTICULAR PURPOSE.
	
	</TD>
	</TR>
	</TABLE>

	<HR/>

	<TABLE BORDER="#0">
	<TR>
	<TD></TD>
	<TD>
	Layer Name
	</TD>
	<TD>
	Version
	</TD>
	</TR>

	<TR>
	<TD><B>GLOBALBASE Protocol Version: </B></TD>
	<TD>
	<B>($ (GetElement ([GetVersion layer="GB.code"]) 1))</B>
	</TD>
	<TD>
	<B>($ (GetElement ([GetVersion layer="GB.code"]) 3))</B>
	</TD>
	</TR>

	<TR>
	<TD><B>XL Protocol Version: </B></TD>
	<TD>
	<B>($ (GetElement ([GetVersion layer="XL.proto"]) 1))</B>
	</TD>
	<TD>
	<B>($ (GetElement ([GetVersion layer="XL.proto"]) 3))</B>
	</TD>
	</TR>

	<TR>
	<TD><B>XL Language Version: </B></TD>
	<TD>
	<B>($ (GetElement ([GetVersion layer="XL.lang"]) 1))</B>
	</TD>
	<TD>
	<B>($ (GetElement ([GetVersion layer="XL.lang"]) 3))</B>
	</TD>
	</TR>

	</TABLE>
	<HR/>


	<B>Contributors to GLOBALBASE Development</B>
	<BR/>
	<BR/>

	Heartfelt thanks go to following people and companies who have
	given us so much assistance.
	<BR/>
	<BR/>

	<UL>

	<LI/>
	Apr.2003. -
	<BR/>
	<BR/>
	<B>NAKAJIMA Tomohito </B><BR/>
	<A HREF="http://www.zeta.co.jp/">
	<IMG SRC="http://www.zeta.co.jp/zetalogo.gif"
		WIDTH="96"
		ALT="Zeta Co."
		/>
	</A>
	<BR/>

	Porting and debuging the Windows Version.

	<BR/>
	<BR/>

	<LI/>
	Apr.2003. -
	<BR/>
	<BR/>
	<B> ABE Masato </B><BR/>

	Testing the Windows Version.

	<BR/>
	<BR/>

	<LI/>
	Jan.2003. -
	<BR/>
	<BR/>
	<B>SOURCEFORGE JP</B><BR/>
	<A HREF="http://sourceforge.jp/">
	<IMG SRC="http://sourceforge.jp/sflogo.php?group_id=436"
		WIDTH="96"
		HEIGHT="31"
		BORDER="0"
		ALT="sourceforge.jp"/></A>
	<BR/>
	<BR/>

	<LI/>
	Apr.2002. - Mar.2003.
	<BR/>
	<BR/>


	<B>MRAMATSU Atsushi ^"<muramatsu@s-cradle.com>" </B><BR/>
	Sophia Cradle, Inc.<BR/>
	Research and Development Depertment<BR/>
	Development Engineer<BR/><BR/>

	Porting the FreeBSD Version.<BR/>
	^"(src/arch/unix/machine/FreeBSD)" <BR/>

	<BR/>

	<LI/>
	<B>Sun Microsystems</B><BR/>
	Making a machines donation to this project<BR/>
	<BR/>

	</UL>

	<HR/>
	<B>GRANT-IN-AID</B>
	<BR/><BR/>

	<UL>

	<LI/>
	Apr.2000. - Mar.2002.

	<BR/><BR/>

	<B>The Ministry of Education, Culture, Sprots, Science and
	Technorogy ^"(MEXT)" Japan<BR/>

	<A HREF="http://www.mext.go.jp/">
	http://www.mext.go.jp/
	</A>
	<BR/>
	Grant-in-Aid for University and Society Collaboration</B>
	<BR/><BR/>
	Information Infrastructure of Historical Geography of Hei-an
	/ Kyoto Applied Distributed Computing and Visual Technology

	</UL>

	<HR/>
	</BODY>
	</HTML>


	<HTML url="/sys/radar/layer.html" eval="off" update="regist">
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE </TITLE>
	($ (content-type))
	</HEADER>
	<BODY BGCOLOR = "##FFFFFF">
	($ (header-style GET))

	($ (menu '("Radar" "CoordinateLayer")))
	<HR/>

	($ (Eval HTMLdb ([gv-resource rid="2"] (gv-status))))
	<HR/>
	($ (Eval HTMLdb ([gv-resource rid="3"] (gv-status))))
	</BODY>
	</HTML>

	<HTML url="/sys/radar/notes.html" eval="off" update="regist">
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE </TITLE>
	($ (content-type))
	</HEADER>
	<BODY BGCOLOR = "##FFFFFF">
	($ (header-style GET))

	($ (menu '("Radar" "Notes")))
	<HR/>

	($
	(Eval notes-style ([gv-resource rid="2"] (gv-status)))
	)
	<HR/>
	</BODY>
	</HTML>


	<HTML url="/resource/coordinate/*/ists.cgi?*" 
			eval="off" update="regist">
	($ <Sequence> ()
		<Define> ^rid
			([Cast type="integer"]
				(GetElement (DivideString GET "/") 3))
		</Define>
		<gv-resource rid="^rid">
		<Switch>
		<Case> (= QUERY_STRING "pointer-on")
			<gv-set-status pointer="on"/>
		</Case>
		<Case> (= QUERY_STRING "pointer-off")
			<gv-set-status pointer="off"/>
		</Case>
		<Case> 1
			<gv-set-status indicate="^QUERY_STRING" />
		</Case>
		</Switch>
		</gv-resource>
	   </Sequence>
	)
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE </TITLE>
	($ (content-type))
	</HEADER>
	<BODY BGCOLOR="##FFFFFF">
	($ (header-style GET))

	($ (menu '("Radar" "")))
	<HR/>
	($ (Eval coordinate-style ([gv-resource rid="^rid"] (gv-status))))
	</BODY>
	</HTML>

	<HTML url="/resource/coordinate/*/" eval="off" update="regist">
	($ <Sequence> ()
		<Define> ^rid
			([Cast type="integer"]
				(GetElement (DivideString GET "/") 3))
		</Define>
		()
	   </Sequence>
	)
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE </TITLE>
	($ (content-type))
	</HEADER>
	<BODY BGCOLOR="##FFFFFF">
	($ (header-style GET))

	($ (menu '("Radar" "")))
	<HR/>
	($ 
<Sequence> ()
<Define> ^gets ([gv-resource rid="^rid"] (gv-status)) </Define>
	 (Eval coordinate-style gets)
</Sequence>
	)
	</BODY>
	</HTML>

	<HTML url="/resource/vector/*/ists.cgi?*" eval="off" update="regist">
	($ <Sequence> ()
		<Define> ^rid
			([Cast type="integer"]
				(GetElement (DivideString GET "/") 3))
		</Define>
		<gv-resource rid="^rid">
		<gv-set-status indicate="^QUERY_STRING" />
		</gv-resource>
	   </Sequence>
	)
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE </TITLE>
	($ (content-type))
	</HEADER>
	<BODY BGCOLOR="##FFFFFF">
	($ (header-style GET))

	($ (menu '("Radar" "")))
	<HR/>
	($ (Eval vector-style ([gv-resource rid="^rid"] (gv-status))))
	</BODY>
	</HTML>

	<HTML url="/resource/vector/*/" eval="off" update="regist">
	($ <Sequence> ()
		<Define> ^rid
			([Cast type="integer"]
				(GetElement (DivideString GET "/") 3))
		</Define>
		()
	   </Sequence>
	)
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE </TITLE>
	($ (content-type))
	</HEADER>
	<BODY BGCOLOR="##FFFFFF">
	($ (header-style GET))

	($ (menu '("Radar" "")))
	<HR/>
	($ (Eval vector-style ([gv-resource rid="^rid"] (gv-status))))
	</BODY>
	</HTML>

	<HTML url="/resource/luster.r64/*/ists.cgi?*" eval="off" update="regist">
	($ <Sequence> ()
		<Define> ^rid
			([Cast type="integer"]
				(GetElement (DivideString GET "/") 3))
		</Define>
		<gv-resource rid="^rid">
		<gv-set-status indicate="^QUERY_STRING" />
		</gv-resource>
	   </Sequence>
	)
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE </TITLE>
	($ (content-type))
	</HEADER>
	<BODY BGCOLOR="##FFFFFF">
	($ (header-style GET))

	($ (menu '("Radar" "")))
	<HR/>
	($ (Eval luster.r64-style ([gv-resource rid="^rid"] (gv-status))))
	</BODY>
	</HTML>

	<HTML url="/resource/luster.r64/*/" eval="off" update="regist">
	($ <Sequence> ()
		<Define> ^rid
			([Cast type="integer"]
				(GetElement (DivideString GET "/") 3))
		</Define>
		()
	   </Sequence>
	)
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE </TITLE>
	($ (content-type))
	</HEADER>
	<BODY BGCOLOR="##FFFFFF">
	($ (header-style GET))

	($ (menu '("Radar" "")))
	<HR/>
	($ (Eval luster.r64-style ([gv-resource rid="^rid"] (gv-status))))
	</BODY>
	</HTML>

	<HTML url="/resource/map/*/" eval="off" update="regist">
	($ <Sequence> ()
		<Define> ^rid
			([Cast type="integer"]
				(GetElement (DivideString GET "/") 3))
		</Define>
		()
	   </Sequence>
	)
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE </TITLE>
	($ (content-type))
	</HEADER>
	<BODY BGCOLOR="##FFFFFF">
	($ (header-style GET))

	($ (menu '("Radar" "")))
	<HR/>
	($ (Eval map-style ([gv-resource rid="^rid"] (gv-status))))
	</BODY>
	</HTML>

	<HTML url="/resource/map/*/ists.cgi?*" eval="off" update="regist">
	($ <Sequence> ()
		<Define> ^rid
			([Cast type="integer"]
				(GetElement (DivideString GET "/") 3))
		</Define>
		<gv-resource rid="^rid">
		<gv-set-status indicate="^QUERY_STRING" />
		</gv-resource>
	   </Sequence>
	)
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE </TITLE>
	($ (content-type))
	</HEADER>
	<BODY BGCOLOR="##FFFFFF">
	($ (header-style GET))

	($ (menu '("Radar" "")))
	<HR/>
	($ (Eval map-style ([gv-resource rid="^rid"] (gv-status))))
	</BODY>
	</HTML>

	<HTML url="/sys/indicate.cgi?*" eval="off" update="regist">
	($
	<Sequence> ()
		<Define> ^data (indicate-info QUERY_STRING)</Define>
		()
	</Sequence>
	)
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE </TITLE>
	($ (content-type))
	</HEADER>
	<BODY BGCOLOR="##FFFFFF">
	($ (header-style GET))

	($ (menu '("Radar" "")))
	<HR/>
	($ data)
	</BODY>
	</HTML>

	<HTML url="/sys/search/urlquery.html" eval="off" update="regist">
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE (URLSearch) </TITLE>
	($ (content-type))
	</HEADER>
	<BODY BGCOLOR="##FFFFFF">
	($ (header-style GET))

	($ (menu '("Search" "URLSearch")))
	<HR/>
	($ (Sequence query-style (url-query-page)))
	</BODY>
	</HTML>

	<HTML url="/sys/search/urlquery.cgi?*" eval="off" update="regist">
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE (URLSearch) </TITLE>
	($ (content-type))
	<META HTTP-EQUIV="refresh" CONTENT="0;URL=urlquery.html"/>
	</HEADER>
	<BODY BGCOLOR="##FFFFFF">
	($ (Sequence (NewEnvPair (CurrentEnvironment) query-style)
			(url-query-cgi)))
	</BODY>
	</HTML>

	<HTML url="/sys/search/periquery.html" eval="off" update="regist">
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE (PeriodicSearch) </TITLE>
	($ (content-type))
	</HEADER>
	<BODY BGCOLOR="##FFFFFF">
	($ (header-style GET))

	($ (menu '("Search" "PeriodicSearch")))
	<HR/>
	($ (Sequence query-style (period-query-page)))
	</BODY>
	</HTML>

	<HTML url="/sys/search/periquery.cgi?*" eval="off" update="regist">
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE (PeriodicSearch) </TITLE>
	($ (content-type))
	<META HTTP-EQUIV="refresh" CONTENT="0;URL=periquery.html"/>
	</HEADER>
	<BODY BGCOLOR="##FFFFFF">
	($ (Sequence (NewEnvPair (CurrentEnvironment) query-style)
			(period-query-cgi)))
	</BODY>
	</HTML>

	<HTML url="/sys/search/perioddelete.cgi?*" eval="off" update="regist">
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE (PeriodicSearch) </TITLE>
	($ (content-type))
	<META HTTP-EQUIV="refresh" CONTENT="0;URL=periquery.html"/>
	</HEADER>
	<BODY BGCOLOR="##FFFFFF">
	</BODY>
	($ ([gv-resource rid="6"] (gv-delete-query 
			([Cast type="integer"] no))))
	</HTML>

	<HTML url="/sys/search/gohome.html" eval="off" update="regist">
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE (GoHome) </TITLE>
	($ (content-type))
	</HEADER>
	<BODY BGCOLOR="##FFFFFF">
	($ (header-style GET))

	($ (menu '("Search" "GoHome")))
	<HR/>
	<H3> Goto Home </H3>

	<A HREF="gohome2.html"> [Goto Home] </A>
	</BODY>
	</HTML>

	<HTML url="/sys/search/gohome2.html" eval="off" update="regist">
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE (GoHome) </TITLE>
	($ ([gv-resource rid="6"]
		<Define> ^query ([gv-resource rid="4"]
			(get-initial-query)) </Define>
		<Define> ^u (GetElement (GetElement query 'URL) 1)
		</Define>
		<If> (= u ()) <Then>
			<set> ^u (GetElement query 1) </set>
		</Then></If>
		(gv-set-query ($ query))
		(gv-zoom u)
	))
	($ (content-type))
	</HEADER>
	<BODY BGCOLOR="##FFFFFF">
	($ (header-style GET))

	($ (menu '("Search" "GoHome")))
	<HR/>
	<H3> Goto Home </H3>

	<A HREF="gohome2.html"> [Goto Home] </A>
	</BODY>
	</HTML>

	<HTML url="/sys/radar/radar.html" eval="off" update="regist">
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE (RADAR) </TITLE>
	($ (content-type))
	</HEADER>
	<BODY BGCOLOR = "##FFFFFF">
	($ (header-style GET))
	($ (menu '("Radar" "Status")))
	<HR/>

	($ (Eval radar-style ([gv-resource rid="6"] (gv-status))))

	<HR/>
	</BODY>
	</HTML>

	<HTML url="/sys/pref/setuphome-1.html" eval="off" update="regist">
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE (SetupHome) </TITLE>
	($ (content-type))
	</HEADER>
	<BODY BGCOLOR = "##FFFFFF">
	($ (header-style GET))

	($ (menu '("Preferences" "SetupHome")))
	<HR/>

	($ (Sequence query-style (setuphome-1-query-page)))

	<HR/>
	</BODY>
	</HTML>

	<HTML url="/sys/pref/setuphome-1.cgi?*" eval="off" update="regist">
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE (SetupHome) </TITLE>
	($ (content-type))
	<META HTTP-EQUIV="refresh" CONTENT="0;URL=setuphome-1.html"/>
	</HEADER>
	<BODY BGCOLOR="##FFFFFF">
	($ (Sequence (NewEnvPair (CurrentEnvironment) query-style)
			(setuphome-1-query-cgi)))
	</BODY>
	</HTML>

	<HTML url="/sys/pref/setuphome-2.html" eval="off" update="regist">
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE (SetupHome) </TITLE>
	($ (content-type))
	</HEADER>
	<BODY BGCOLOR = "##FFFFFF">
	($ (header-style GET))

	($ (menu '("Preferences" "SetupHome")))
	<HR/>

	($ (Sequence query-style (setuphome-2-query-page)))

	<HR/>
	</BODY>
	</HTML>

	<HTML url="/sys/pref/setuphome-2.cgi?*" eval="off" update="regist">
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE (SetupHome) </TITLE>
	($ (content-type))
	<META HTTP-EQUIV="refresh" CONTENT="0;URL=setuphome-2.html"/>
	</HEADER>
	<BODY BGCOLOR="##FFFFFF">
	($ (Sequence (NewEnvPair (CurrentEnvironment) query-style)
			(setuphome-2-query-cgi)))
	</BODY>
	</HTML>

	<HTML url="/sys/pref/httpproxy.html" eval="off" update="regist">
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE (HTTPProxy) </TITLE>
	($ (content-type))
	</HEADER>
	<BODY BGCOLOR="##FFFFFF">
	($ (header-style GET))
	($ (menu '("Preferences" "HTTPProxy")))

	<HR/>

	<H3> HTTP Proxy Setup </H3>

	($ (Eval proxy-style ([gv-resource rid="4"] (GetProxy))))

	<HR/>
	</BODY>
	</HTML>

	<HTML url="/sys/pref/httpproxyquery.cgi?*" eval="off" update="regist">
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE (HTTPProxy) </TITLE>
	($ (content-type))
	</HEADER>
	<BODY BGCOLOR="##FFFFFF">
	($ (header-style GET))
	($ (menu '("Preferences" "Proxy")))
	($ ((NewEnvPair (CurrentEnvironment) proxy-style) (proxy-setup)))

	<HR/>

	<H3> HTTP Proxy Setup </H3>

	($ (Eval proxy-style ([gv-resource rid="4"] (GetProxy))))

	<HR/>
	</BODY>
	</HTML>

	<HTML url="/sys/pref/nativeproxy.html" eval="off" update="regist">
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE (NativeProxy) </TITLE>
	($ (content-type))
	</HEADER>
	<BODY BGCOLOR="##FFFFFF">
	($ (header-style GET))
	($ (menu '("Preferences" "NativeProxy")))

	<HR/>

	<H3> Native Proxy Setup </H3>

	($ (Eval native-proxy-style ([gv-resource rid="4"] (GetNativeProxy))))

	<HR/>
	</BODY>
	</HTML>

	<HTML url="/sys/pref/nativeproxyquery.cgi?*" eval="off" update="regist">
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE (NativeProxy) </TITLE>
	($ (content-type))
	</HEADER>
	<BODY BGCOLOR="##FFFFFF">
	($ (header-style GET))
	($ (menu '("Preferences" "Proxy")))
	($ ((NewEnvPair (CurrentEnvironment) native-proxy-style)
				(proxy-setup)))

	<HR/>

	<H3> Native Proxy Setup </H3>

	($ (Eval native-proxy-style ([gv-resource rid="4"] (GetNativeProxy))))

	<HR/>
	</BODY>
	</HTML>

	<HTML url="/sys/pref/cache.html" eval="off" update="regist">
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE (Cache) </TITLE>
	($ (content-type))
	</HEADER>
	<BODY BGCOLOR="##FFFFFF">
	($ (header-style GET))
	($ (menu '("Preferences" "Cache")))

	<HR/>

	<H3> Cache Setup </H3>

	($ (Eval cache-style ([gv-resource rid="4"] (gv-get-cache))))

	<HR/>
	</BODY>
	</HTML>

	<HTML url="/sys/pref/cachequery.cgi?*" eval="off" update="regist">
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE (Cache) </TITLE>
	($ (content-type))
	</HEADER>
	<BODY BGCOLOR="##FFFFFF">
	($ (header-style GET))
	($ (menu '("Preferences" "Cache")))
	($ ((NewEnvPair (CurrentEnvironment) cache-style) (cache-setup)))

	<HR/>

	<H3> Cache Setup </H3>

	($ (Eval cache-style ([gv-resource rid="4"] (gv-get-cache))))

	<HR/>
	</BODY>
	</HTML>

	<HTML url="/sys/pref/reset.html" eval="off" update="regist">
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE (Reset) </TITLE>
	($ (content-type))
	</HEADER>
	<BODY BGCOLOR = "##FFFFFF">
	($ (header-style GET))

	($ (menu '("Preferences" "ResetAll")))
	<HR/>

	<H3> Reset to Initail State</H3>
	<BR/><BR/>

	<A HREF="reset2.html">[RESET] </A>

	<HR/>
	</BODY>
	</HTML>

	<HTML url="/sys/pref/reset2.html" eval="off" update="regist">
	<HEADER>
	<TITLE> GLOBALBASE CONTROL PAGE (Reset) </TITLE>
	($ (content-type))
	</HEADER>
	($ ([gv-resource rid="4"] (gv-reset-status)))
	<BODY BGCOLOR = "##FFFFFF">
	($ (header-style GET))

	($ (menu '("Preferences" "Reset")))
	<HR/>

	<H3> Reset Complete </H3>
	<HR/>
	</BODY>
	</HTML>



<Define> ^indicate-info ()
<Arguments> ^query </Arguments>
<Sequence> ()
	<Define> ^d (DivideString
			(DivideString query "-") ":")
	</Define>
	<Define> ^ret () </Define>

	<For> (Not (= d ()))
	<Sequence> ()
		<Define> ^el (GetElement d 0) </Define>
		<Define> ^rid (GetElement el 0) </Define>
		<Define> ^code ([Cast type="integer"]
				(GetElement el 1)) </Define>

		<set> ^ret <cons> <quote><HR/></quote> ^ret </cons></set>
		<gv-resource rid="^rid"><vector>
		<set> ^ret <cons>
			<get-object-information
				format="on">
				^code
			</get-object-information>
			^ret
			</cons>
		</set>
		</vector></gv-resource>
		<set> ^d (Next d) </set>
	</Sequence>
	</For>
	^ret
</Sequence>
</Define>

<Define> ^style (NewEnvironment HTMLdb)
</Define>

<Sequence> ^style

<!-- Resource Header Information Style -->

<Define Order="Applicative"> ^rid ()
<Arguments> ^id </Arguments>
<quote>(
	<B>ID: ($ id)</B>
	<BR/>
)</quote>
</Define>

<Define Order="Applicative"> ^entry-URI ()
<Arguments> ^uri </Arguments>
<quote>(
	<B>Entry:</B> ($ uri)<BR/>
)</quote>
</Define>

<Define Order="Applicative"> ^target-URI ()
<Arguments> ^uri </Arguments>
<quote>(
	<B>Target:</B> ($ uri)<BR/>
	<HR/>
	<B> Pointer Position : </B>
	"["<A HREF="ists.cgi?pointer-on"> INDICATE </A>"]"
	"["<A HREF="ists.cgi?pointer-off"> HIDE </A>"]"
	<HR/>
)</quote>
</Define>

<Define Order="Applicative"> ^initial-status () ^sts
<Switch>
<Case> (= (ListLength sts) 2)
<quote>(
	<B>Internal Status:</B> ($ (GE sts 1))<BR/>
)</quote>
</Case>
<Case> (= (ListLength sts) 3)
<quote>(
	<B>Internal Status:</B> ($ (GE sts 1)) ($ (GE sts 2))<BR/>
)</quote>
</Case>
</Switch>
</Define>

<Define Order="Applicative"> ^incremental-status ()
<Arguments> ^sts </Arguments>
<quote>(
	<B>Incremental Status:</B> ($ sts)<BR/>
)</quote>
</Define>

<Define Order="Applicative"> ^indicate ()
<Arguments> ^sts </Arguments>
<Switch>
<Case> (= sts "on")
	<quote>(
		<B> Indicate: </B> on
		--- |on|
		<A HREF="ists.cgi?off">off</A>|
		<A HREF="ists.cgi?auto">auto</A>|
		<BR/>
	)</quote>
</Case>
<Case> (= sts "off")
	<quote>(
		<B> Indicate: </B> off
		--- |<A HREF="ists.cgi?on">on</A>|
		off|
		<A HREF="ists.cgi?auto">auto</A>|
		<BR/>
	)</quote>
</Case>
<Case> (= sts "auto")
	<quote>(
		<B> Indicate: </B> auto ---
		|<A HREF="ists.cgi?on">on</A>|
		<A HREF="ists.cgi?off">off</A>|
		auto|
		<BR/>
	)</quote>
</Case>
</Switch>
</Define>

<!-- Elements in meta Element -->

<Define> ^category ()
<Arguments> ^type </Arguments>
<quote>(
	<TR><TD><B> Category: </B></TD><TD> ($ type)</TD></TR>
)</quote>
</Define>

<Define> ^file () ^filename
<Sequence> ()
	<If> (= (ListLength filename) 1)
	<Then><quote>(
		<TR><TD><B> Target File Type: </B></TD><TD>($ type)</TD></TR>
		<TR><TD><B> Target File Name: </B></TD><TD>This file</TD></TR>
	)</quote></Then>
	<Else><quote>(
		<TR><TD><B> Target File Type: </B></TD><TD>($ type)</TD></TR>
		<TR><TD><B> Target File Name: </B></TD>
			<TD>($ filename)</TD></TR>
	)</quote></Else>
	</If>
</Sequence>
</Define>

<Define> ^data-ref ()
<Arguments> ^type ^data </Arguments>
<If> (= type "url")
<Then>
	(quote(
	<A HREF="$data"> ($ data) </A>
	))
</Then>
<Else>
	^data
</Else>
</If>
</Define>

<Define> ^ref-qualifier ()
<Arguments> ^q </Arguments>
(quote(
<TR>
<TD> ($ no) </TD>
<TD> <B>($ q)</B> </TD>
<TD> ($ (EA (CurrentEnvironment) "type" "text")) </TD>
<TD> ($ (data-ref (EA (CurrentEnvironment) "type" "text") data)) </TD>
</TR>
))
</Define>

<Define Order="Normal"> ^inheritance ^sym
(quote(
<TR>
<TD> - </TD>
<TD> -- </TD>
<TD> -- </TD>
<TD> -- </TD>
</TR>
($ (bib-list (cdr sym)))
))
</Define>

<Define> ^bib-list ()
<Arguments> ^sym </Arguments>
<Sequence> ()
<Define> ^ret () </Define>
<For> (Not (= sym ()))
<Sequence> ()
	<Define> ^s (car sym) </Define>
	<Switch>
	<Case> (= (GetTag (car s)) 'inheritance)
		<set> ^ret (Append ret
			(Eval (CurrentEnvironment) s))
		</set>
	</Case>
	<Case> 1
		<Define> ^attr (GetAttribute (car s)) </Define>
		<For> (Not (= attr ()))
		<Sequence> ()
			<SetEA> ()
				(car (car attr))
				(car (cdr (car attr))) </SetEA>
			<set> ^attr (cdr attr) </set>
		</Sequence>
		</For>
		<set> ^ret (Append ret (cons
			(ref-qualifier 
				([Cast type="string"] (GetSymbolCore 
					(car s))))
			()))
		</set>
	</Case>
	</Switch>
	<set> ^sym (cdr sym) </set>
</Sequence>
</For>
^ret
</Sequence>
</Define>


<Define> ^print-namespace ()
<Arguments> ^namelist </Arguments>
<Sequence> ()
<Define> ^ret () </Define>
<For> (Not (= namelist ()))
<Sequence> ()
	<Define> ^ns ([Cast type="string"] (car (car namelist)))
	</Define>
	<Switch>
	<Case> (= (CutString ns 0 6) "xmlns:")
	<set> ^ret (cons
	(quote(
	<B>($ (CutString ns 6 (- (StringLength ns) 6)))</B>
	"-->"
	($ (car (cdr (car namelist))))
	<BR/>
	)) ret )
	</set>
	</Case>
	</Switch>
	<set> ^namelist (cdr namelist) </set>
</Sequence>
</For>
^ret
</Sequence>
</Define>

<Define Order="Normal"> ^bib ^sym
<Sequence> ()
	<Define> ^namespace
		(GetAttribute (car sym))
	</Define>
	<Define> ^no 0 </Define>
	(quote(
	<B> Bibliography: </B> <BR/>
	($ (print-namespace namespace)) <BR/>
	<TABLE BORDER="#1">
	<TR>
		<TD><B>inh</B></TD>
		<TD><B>qualifier</B></TD>
		<TD><B>type</B></TD>
		<TD><B>data</B></TD>
	</TR>
	($ (bib-list (cdr sym)))
	</TABLE>
	))
</Sequence>
</Define>

<Define Order="Normal"> ^mr ^sym <Sequence> ()
<Define> ^rect (GetElement sym 1) </Define>
<Define> ^tl (GetElement rect 0) </Define>
<Define> ^br (GetElement rect 1) </Define>
<quote>(
	<TR VALIGN="top">
	<TD><B> Minimam Rectangle:</B></TD>
	<TD>
	<TABLE>
	<TR><TD><B>Top Left:</B></TD>
		<TD ALIGN="right">($ (GetElement tl 0))</TD>
		<TD ALIGN="right">($ (GetElement tl 1))</TD>
	</TR>
	<TR><TD><B>Bottom Right:</B></TD>
		<TD ALIGN="right">($ (GetElement br 0))</TD>
		<TD ALIGN="right">($ (GetElement br 1))</TD>
	</TR>
	</TABLE>
	</TD>
	</TR>
)</quote>
</Sequence>
</Define>

</Sequence>

<Define> ^coordinate-style (NewEnvironment style)
</Define>

<Sequence> ^coordinate-style

<Define> ^resolution () ^reso-arg
<Switch>
<Case> (= (ListLength reso-arg) 3)
<quote>(
	<B> min: </B> ($ (GE reso-arg 1)) <B> max: </B> ($ (GE reso-arg 2))
)</quote>
</Case>
<Case> 1
	(GE reso-arg 1)
</Case>
</Switch>
</Define>

<Define> ^v ()
<Arguments> ^reso </Arguments>
<quote>(
	<TR><TD><B> Visible Resolution: </B></TD><TD> ($ reso)</TD></TR>
)</quote>
</Define>

<Define> ^cid () ^list
<quote>(
	<TR><TD><B> Coordinate ID: </B></TD><TD>($ (cdr list))</TD></TR>
)</quote>
</Define>

<Define> ^modify () ^list
<quote>(
	<TR><TD><B> Modify Time: </B></TD><TD>($ (cdr list))</TD></TR>
)</quote>
</Define>

<Define> ^base-unit ()
<Arguments/>
<quote>
	<TR><TD><B> Base Unit: </B> </TD>
	<TD> ($ unit) ^"(" ($ (EA () "system" "base")) ^")" </TD>
	</TR>
</quote>
</Define>


<Define Order="Normal"> ^meta ^sym
	<quote>(
		<HR/>
		<H3> Meta Information </H3>
		($ (ListEval () (Next sym)
		'bib
		"&lt;TABLE>"
		))
		"&lt;/TABLE>"
	)</quote>
</Define>

<Define Order="Normal"> ^parents ^sym
<Sequence> ()
<Define Order="Normal"> ^element ^sym
<quote>(
	<LI/>
	<B> Mapped Resource: </B>
	($ (element-link (GetElement sym 'dest)))
	<BR/>
	<BLOCKQUOTE>
	<B> Mapping Resource: </B>
	($ (element-link (GetElement sym 'map)))
	<BR/>
	</BLOCKQUOTE>
)</quote>
</Define>
<quote>(
	<HR/>
	<H3> Parents List </H3>
	<OL>
	($ (ListEval () (Next sym)))
	</OL>
)</quote>
</Sequence>
</Define>

<Define Order="Normal"> ^children ^sym
<Sequence> ()
<Define Order="Normal"> ^element ^sym
<quote>(
	<LI/>
	<B> Mapped Resource: </B>
	($ (element-link (GetElement sym 'src)))
	<BR/>
	<BLOCKQUOTE>
	<B> Mapping Resource: </B>
	($ (element-link (GetElement sym 'map)))
	<BR/>
	</BLOCKQUOTE>
)</quote>
</Define>
<quote>(
	<HR/>
	<H3> Children List </H3>
	<OL>
	($ (ListEval () (Next sym)))
	</OL>
)</quote>
</Sequence>
</Define>

<Define Order="Normal"> ^coordinate ^sym
	<quote>(
		<H3> Coordinate Resource Information </H3>
		($ (ListEval () (Next sym)))
	)</quote>
</Define>

</Sequence>



<Define> ^vector-style (NewEnvironment style)
</Define>

<Sequence> ^vector-style

<Define> ^meta-style (NewEnvironment vector-style) </Define>

<Sequence> ^meta-style
<!-- Meta Data Style -->

<Define> ^modify () ^list
<quote>(
	<TR><TD><B> Modify Time: </B></TD><TD>($ (cdr list))</TD></TR>
)</quote>
</Define>

<Define> ^base-unit ()
<Arguments/>
<quote>
	<TR><TD><B> Base Unit: </B> </TD>
	<TD> ($ unit) ^"(" ($ (EA () "system" "base")) ^")" </TD>
	</TR>
</quote>
</Define>

<Define Order="Applicative"> ^type ()
<Arguments> ^tp </Arguments>
<quote>
	<TR><TD><B> Resource Type: </B></TD>
		<TD> ($ tp) </TD></TR>
</quote>
</Define>

<Define Order="Applicative"> ^level ()
<Arguments> ^max </Arguments>
<quote>
	<TR><TD><B> Max LOD Level: </B></TD>
		<TD> ($ max) </TD></TR>
</quote>
</Define>

<Define Order="Applicative"> ^resolution () ^reso-arg
<quote>
	<TR><TD><B> Resolution: </B></TD>
		<TD> ($ (GE reso-arg 1)) </TD></TR>
</quote>
</Define>

</Sequence>

<Define Order="Normal"> ^meta ^sym
	<quote>(
		<HR/>
		<H3> Meta Information </H3>
		($ (ListEval meta-style (Next sym)
			'bib
			"&lt;TABLE>"))
		"&lt;/TABLE>"
	)</quote>
</Define>

<Define> ^resolution () ^reso-arg
<quote>()</quote>
</Define>

<Define> ^type ()
<Arguments> ^reso </Arguments>
<quote>()</quote>
</Define>

<Define> ^level ()
<Arguments> ^reso </Arguments>
<quote>()</quote>
</Define>

<Define Order="Normal"> ^vector ^sym
	<quote>(
		<H3> Vector Resource Information </H3>
		($ (ListEval () (Next sym)))
	)</quote>
</Define>

</Sequence>



<Define> ^luster.r64-style (NewEnvironment style)
</Define>

<Sequence> ^luster.r64-style

<Define> ^meta-style (NewEnvironment luster.r64-style) </Define>

<Sequence> ^meta-style
<!-- Meta Data Style -->
<Define> ^modify () ^list
<quote>(
	<TR><TD><B> Modify Time: </B></TD><TD>($ (cdr list))</TD></TR>
)</quote>
</Define>

<Define Order="Applicative"> ^type ()
<Arguments> ^tp </Arguments>
<quote>
	<TR><TD><B> Resource Type: </B></TD>
		<TD> ($ tp) </TD></TR>
</quote>
</Define>

<Define Order="Applicative"> ^scan-resolution ()
<Arguments> ^reso </Arguments>
<quote>
	<TR><TD><B> Scan Resolution: </B></TD>
		<TD> ($ reso) </TD></TR>
</quote>
</Define>

<Define> ^base-unit ()
<Arguments/>
<quote>
	<TR><TD><B> Base Unit: </B> </TD>
	<TD> ($ unit) ^"(" ($ (EA () "system" "base")) ^")" </TD>
	</TR>
</quote>
</Define>

<Define Order="Normal"> ^scale ^sym
<Switch>
<Case> (= (GetElement (GetElement sym 1) 0) '/)
<quote>
	<TR><TD><B> Scale: </B></TD>
		<TD>
		($ (GetElement (GetElement sym 1) 1))
		:
		($ (GetElement (GetElement sym 1) 2))
		</TD></TR>
</quote>
</Case>
<Case> 1
<quote>
	<TR><TD><B> Scale: </B></TD>
		<TD> ($ (GetElement sym 1)) </TD></TR>
</quote>
</Case>
</Switch>
</Define>

<Define Order="Normal"> ^r64 ^sym
<quote> (
	<TR><TD><B> R64 Format Type </B></TD>
		<TD> ($ (GetElement (GetElement sym 'type) 1)) </TD></TR>
	<TR><TD><B> R64 Format Levels </B></TD>
		<TD> ($ (GetElement (GetElement sym 'level) 1)) </TD></TR>
	<TR><TD><B> R64 Format Pixels </B></TD>
		<TD> ^"("
		($ (GetElement (GetElement sym 'rect) 1)) 
		^")"
		</TD></TR>
)</quote>
</Define>

<Define Order="Normal"> ^cr ^sym
<quote> (
	<TR><TD><B> CR Format Type </B></TD>
		<TD> ($ (GetElement (GetElement sym 'type) 1)) </TD></TR>
	<TR><TD><B> CR Format Levels </B></TD>
		<TD> ($ (GetElement (GetElement sym 'level) 1)) </TD></TR>
	<TR><TD><B> CR Format Pixels </B></TD>
		<TD> ^"("
		($ (GetElement (GetElement sym 'rect) 1)) 
		^")"
		</TD></TR>
)</quote>
</Define>

</Sequence>

<Define Order="Normal"> ^meta ^sym
	<quote>(
		<HR/>
		<H3> Meta Information </H3>
		<TABLE>
		($ (ListEval meta-style (Next sym)))
		</TABLE>
	)</quote>
</Define>

<Define> ^resolution () ^reso-arg
<quote>()</quote>
</Define>

<Define> ^type ()
<Arguments> ^reso </Arguments>
<quote>()</quote>
</Define>

<Define> ^level ()
<Arguments> ^reso </Arguments>
<quote>()</quote>
</Define>

<Define Order="Normal"> ^luster ^sym
	<quote>(
		<H3> Luster Resource Information </H3>
		($ (ListEval () (Next sym)))
	)</quote>
</Define>

</Sequence>



<Define> ^map-style (NewEnvironment style)
</Define>

<Sequence> ^map-style

<Define> ^meta-style (NewEnvironment map-style) </Define>

<Sequence> ^meta-style
<!-- Meta Data Style for map -->

<Define> ^modify () ^list
<quote>(
	<TR><TD><B> Modify Time: </B></TD><TD>($ (cdr list))</TD></TR>
)</quote>
</Define>

<Define Order="Applicative"> ^src ()
<Arguments> ^uri </Arguments>
<quote>
	<TR><TD><B> Source Resource: </B></TD>
		<TD> ($ (ComposeURL entry uri)) </TD></TR>
</quote>
</Define>

<Define Order="Applicative"> ^dest ()
<Arguments> ^uri </Arguments>
<quote>
	<TR><TD><B> Destination Resource: </B></TD>
		<TD> ($ (ComposeURL entry uri)) </TD></TR>
</quote>
</Define>

<Define Order="Applicative"> ^dp ()
<Arguments> ^depth </Arguments>
<quote>
	<TR><TD><B> Depth: </B></TD>
		<TD> ($ depth) </TD></TR>
</quote>
</Define>

</Sequence>

<Define Order="Normal"> ^meta ^sym
	<quote>(
		<HR/>
		<H3> Meta Information </H3>
		<TABLE>
		($ (ListEval (NewEnvPair
				meta-style
				(CurrentEnvironment))
				(Next sym)
			'category
			'src
			'dest
		))
		</TABLE>
	)</quote>
</Define>

<Define Order="Normal"> ^map ^sym
<Sequence> ()
	<Define> ^entry
		(GetElement 
		(GetElement sym 'entry-URI) 1)
	</Define>
	<quote>(
		<H3> Map Resource Information </H3>
		($ (ListEval () (Next sym)))
	)</quote>
</Sequence>
</Define>

</Sequence>

<Define> ^query-style (NewEnvironment (CurrentEnvironment))
</Define>

<query-style type="raw">

<Define> ^URL ()
<Arguments> ^url </Arguments>
	(+ "<B> Coordinate URL: </B>" url)
</Define>

<Define> ^$ ()
<Arguments> ^cmd </Arguments>
	^cmd
</Define>

<Define> ^gb-template1 ()
<Arguments>
	^keyword
	^property
	^period.type
	^period.from
	^period.to
</Arguments>
<Sequence> ()
<If> (= period.from 'now)
<Then>
<Define> ^period.from today </Define>
</Then>
</If>
<If> (= period.to 'now)
<Then>
<Define> ^period.to today </Define>
</Then>
</If>
(quote(
<B> GLOBALBASE METADATA ^"(" FORMAT TYPE1 ^")" </B><BR/>
<B>Keyword:</B> ($ keyword) <BR/>
<B>GB-Property:</B> ($ property) <BR/>
<B>Content Period ^"(" ($ period.type) ^")" :</B>
($ period.from) - ($ period.to) <SPACER SIZE="#20" TYPE="horizontal"/>
))
</Sequence>
</Define>

<Define> ^or-mode 0 </Define>

<Define Order="Normal"> ^OR ^list
<Switch>
<Case> (= or-mode 0)
	<Define> ^or-mode 1 </Define>
	<set> ^list (Next list) </set>
	<Define> ^no 0 </Define>
	<Define> ^ret () </Define>
	<For> (Not (= list ())) <Sequence> ()
		<set> ^ret (cons (+ 
				"<A HREF=\"" delete-url
					 "?action=Delete&amp;no="
				no "\">[DELETE]</A>") ret) </set>
		<set> ^ret (cons (Eval (CurrentEnvironment)
				(GetElement list 0)) ret) </set>
		<set> ^ret (cons '(LI) ret) </set>
		<set> ^list (Next list) </set>
		<set> ^no (+ no 1) </set>
	</Sequence>
	</For>
	(cons 'OL ret)
</Case>
<Case> (= or-mode 1)
	(cons ^'OR (ListEval () (Next list)))
</Case>
</Switch>
</Define>

<Define> ^url-query-page ()
<Arguments/>
<Sequence> ()

<Define> ^delete-url urlquery.cgi </Define>
<quote>(
<FORM name="URLquery" action="urlquery.cgi" method="get">
<B> NEW Coordinate URL: </B>
<BR/>
<INPUT type="#text" name="url" value="" size="#80"/>
<BR/>
<INPUT type="submit" name="action" value="Insert"/>
<INPUT type="submit" name="action" value="Replace"/>
<HR/>
($ (Eval (NewEnvPair query-style (CurrentEnvironment))
	([gv-resource rid="6"] (gv-get-query))))
<HR/>
</FORM>
)</quote>
</Sequence>
</Define>

<Define> ^url-query-cgi ()
<Arguments/>
<Sequence> ()

	<Switch>
	<Case> (Not (= (GetElement (ErrHandler action) 5) 0))
		([gv-resource rid="6"] (gv-insert-query
			(URL ($ url))))
	</Case>
	<Case> (= action "Insert")
		([gv-resource rid="6"] (gv-insert-query
			(URL ($ url))))
	</Case>
	<Case> (= action "Replace")
		([gv-resource rid="6"] (gv-set-query
			(URL ($ url))))
	</Case>
	<Case> (= action "Delete")
		([gv-resource rid="6"] (gv-delete-query 
			([Cast type="integer"] no)))
	</Case>
	</Switch>
	()
</Sequence>
</Define>

<Define> ^period-query-page ()
<Arguments/>
<Sequence> ()
<Define> ^today ([GetXLTime format="W3C-DTF"]) </Define>
<Define> ^delete-url perioddelete.cgi </Define>
<quote>(
<H3> GLOBALBASE METADATA ^"(" FORMAT TYPE 1 ^")" </H3>
<FORM name="periquery" action="periquery.cgi" method="get">
<B> NEW Query: </B>
<BR/>
<TABLE BORDER="#0">
<TR>
<TD>
<B> Keyword: </B>
</TD>
<TD>
<INPUT type="#text" name="keyword" value="" size="#80"/>
</TD>
</TR>
<TR>
<TD>
<B> GB-Property: </B>
</TD>
<TD>
<SELECT name="prop">
<OPTION/> base
<OPTION/> plot
<OPTION/> photo
<OPTION/> stereo
</SELECT>
</TD>
</TR>
<TR>
<TD>
<B> Period: </B>
</TD>
<TD>
format:
<SELECT name="timeformat">
<OPTION/> W3C-DTF
</SELECT>
from <INPUT type="#text" name="from" value="$today" size="#20"/>
to <INPUT type="#text" name="to" value="$today" size="#20"/>
</TD>
</TR>
</TABLE>
<INPUT type="submit" name="action" value="Insert"/>
<INPUT type="submit" name="action" value="Replace"/>
<HR/>
($ (Eval (NewEnvPair query-style (CurrentEnvironment))
	([gv-resource rid="6"] (gv-get-query))))
<HR/>
</FORM>
)</quote>
</Sequence>
</Define>


<Define> ^period-query-cgi ()
<Arguments/>
<Sequence> ()
	<Switch>
	<Case> (= from "now")
		<set> ^from ^'(quote now) </set>
	</Case>
	<Case> (= from "today")
		<set> ^from ^'(quote now) </set>
	</Case>
	</Switch>
	<Switch>
	<Case> (= to "now")
		<set> ^to ^'(quote now) </set>
	</Case>
	<Case> (= to "today")
		<set> ^to ^'(quote now) </set>
	</Case>
	</Switch>
	<Define> ^tmp
		(List '$
		(List 'gb-template1
			keyword
			prop
			timeformat
			from
			to
		))
	</Define>
	<Switch>
	<Case> (Not (= (GetElement (ErrHandler action) 5) 0))
		([gv-resource rid="6"] (gv-insert-query
			(URL ($ url))))
	</Case>
	<Case> (= action "Insert")
		([gv-resource rid="6"] (gv-insert-query
			($ tmp)))
	</Case>
	<Case> (= action "Replace")
		([gv-resource rid="6"] (gv-set-query
			($ tmp)))
	</Case>
	</Switch>
	()
</Sequence>
</Define>

<Define> ^setuphome-1-query-cgi ()
<Arguments/>
<Sequence> ()

	<Switch>
	<Case> (= from "now")
		<set> ^from ^'(quote now) </set>
	</Case>
	<Case> (= from "today")
		<set> ^from ^'(quote now) </set>
	</Case>
	</Switch>
	<Switch>
	<Case> (= to "now")
		<set> ^to ^'(quote now) </set>
	</Case>
	<Case> (= to "today")
		<set> ^to ^'(quote now) </set>
	</Case>
	</Switch>
	<Define> ^tmp
		(List '$
		(List 'gb-template1
			keyword
			prop
			timeformat
			from
			to
		))
	</Define>
	<Switch>
	<Case> (Not (= (GetElement (ErrHandler action) 5) 0))
		(PrintStd 1)
	</Case>
	<Case> (= action "OK")
		([gv-resource rid="4"]
			([initial-query type="normal"]
				(OR
				(URL ($ url))
				($ tmp))))
		([gv-resource rid="6"] 
			(gv-set-query (URL ($ url)))
			(gv-insert-query ($ tmp)))
	</Case>
	</Switch>
	([gv-resource rid="4"] (gv-set-status))
	()
</Sequence>
</Define>

<Define> ^setuphome-2-query-cgi ()
<Arguments/>
<Sequence> ()

	<Switch>
	<Case> (Not (= (GetElement (ErrHandler action) 5) 0))
		(PrintStd 1)
	</Case>
	<Case> (= action "OK")
		([gv-resource rid="4"]
			([initial-query type="normal"]
				(URL ($ url))))
		([gv-resource rid="6"] 
			(gv-set-query (URL ($ url))))
	</Case>
	</Switch>
	([gv-resource rid="4"] (gv-set-status))
	()
</Sequence>
</Define>


<Define> ^setuphome-1-query-page ()
<Arguments/>
<Sequence> ()

<Define> ^query ([gv-resource rid="4"] (get-initial-query))
</Define>
<Define> ^u (GetElement (GetElement query 'URL) 1)
</Define>
<If> (= u ()) <Then>
<set> ^u (GetElement query 1) </set>
</Then></If>

<quote>(
<FORM name="periquery" action="setuphome-1.cgi" method="get">
<H3> Input Your Home URL </H3>
<B> URL: </B>
<INPUT type="#text" name="url" value="$u" size="#80"/>
<HR/>
<A HREF="setuphome-2.html">[Don't care Era]</A>
<H3> Input Your Home Era </H3>
<TABLE BORDER="#0">
<TR>
<TD>
<B> Keyword: </B>
</TD>
<TD>
<INPUT type="#text" name="keyword" value="" size="#80"/>
</TD>
</TR>
<TR>
<TD>
<B> GB-Property: </B>
</TD>
<TD>
<SELECT name="prop">
<OPTION/> base
<OPTION/> plot
<OPTION/> photo
<OPTION/> stereo
</SELECT>
</TD>
</TR>
<TR>
<TD>
<B> Period: </B>
</TD>
<TD>
format:
<SELECT name="timeformat">
<OPTION/> W3C-DTF
</SELECT>
from <INPUT type="#text" name="from" value="today" size="#20"/>
to <INPUT type="#text" name="to" value="today" size="#20"/>
</TD>
</TR>
</TABLE>
<INPUT type="submit" name="action" value="OK"/>
</FORM>

)</quote>
</Sequence>
</Define>

<Define> ^setuphome-2-query-page ()
<Arguments/>
<Sequence> ()

<Define> ^query ([gv-resource rid="4"] (get-initial-query))
</Define>
<Define> ^u (GetElement (GetElement query 'URL) 1)
</Define>
<If> (= u ()) <Then>
<set> ^u (GetElement query 1) </set>
</Then></If>

<quote>(
<FORM name="periquery" action="setuphome-2.cgi" method="get">
<H3> Input Your Home URL </H3>
<B> URL: </B>
<INPUT type="#text" name="url" value="$u" size="#80"/>
<HR/>
<A HREF="setuphome-1.html">[Use Era]</A><BR/>
<INPUT type="submit" name="action" value="OK"/>
</FORM>
)</quote>
</Sequence>
</Define>


</query-style>


<Define> ^radar-style (NewEnvironment (CurrentEnvironment)) </Define>

<radar-style type="raw">

<Define Order="Normal"> ^pmd ^sym
(quote(
<LI/> <B> Plate Metadata </B><BR/>
<TABLE>
<TR>
<TD> <B> Database Path </B> </TD>
<TD> ($ (GetElement sym 1)) </TD>
</TR>
<TR>
<TD> <B> Sphere </B> </TD>
<TD>
^"(("
($ (GetElement (GetElement (GetElement sym 2) 0) 0))
($ (GetElement (GetElement (GetElement sym 2) 0) 1))
^") ("
($ (GetElement (GetElement (GetElement sym 2) 1) 0))
($ (GetElement (GetElement (GetElement sym 2) 1) 1))
^"))"
</TD>
</TR>
<TR>
<TD> <B> LOD </B> </TD>
<TD> ($ (GetElement sym 3)) - ($ (GetElement sym 4)) </TD>
</TR>
</TABLE>
))
</Define>

<Define Order="Normal"> ^lump ^sym
(quote(
<LI/>
<B> ($ (GetElement sym 1)) </B> <BR/>
<UL>
($ (ListEval () (cdr (cdr sym))))
</UL>
<BR/>
))
</Define>

<Define Order="Normal"> ^status ^sym
(quote(
	<H3> Lump Information </H3>
	<UL>
	($ (ListEval () (Next sym)))
	</UL>
))
</Define>

</radar-style>

<Define> ^notes-style (NewEnvironment (CurrentEnvironment))
</Define>

<notes-style type="raw">

<Define> ^element-notes ()
<Arguments> ^sym </Arguments>
<Sequence> ()
<Define> ^rid (GetElement (GetElement sym 'rid) 1) </Define>
<Define> ^lst
	([gv-resource rid="^rid"] ([gv-get-notes obj="search"]))
</Define>
<If> (Not (= lst ()))
<Then> <set> ^lst (cdr lst) </set>
</Then>
</If>
<Define> ^ret () </Define>
<For dec="lst">
	<Define> ^url (GetElement (car lst) 2) </Define>
	<Define> ^data (GetElement (car lst) 1) </Define>

	<Switch>
	<Case> (= (GetElement (car lst) 0) 'image)

	<Define> ^img (+ "/sys/symbols/" 
		(URLStringCode (GetElement (car lst) 3))) </Define>

	<Switch>
	<Case> (= url ())
		<set> ^ret (cons(quote(
		<TR>
		<TD><IMG SRC="$img"/></TD>
		<TD>($ data) </TD>
		</TR>
		)) ret) </set>
	</Case>
	<Case> 1
		<set> ^ret (cons(quote(
		<TR>
		<TD><A HREF="$url"><IMG SRC="$img"/></A></TD>
		<TD>($ data) </TD>
		</TR>
		)) ret) </set>
	</Case>
	</Switch>
	</Case>
	<Case> 1

	<Define> ^fill (GetElement (car lst) 3) </Define>
	<Define> ^line (GetElement (car lst) 4) </Define>

	<Switch>
	<Case> (= url ())
		<set> ^ret (cons(quote(
		<TR>
		<TD BGCOLOR="$fill">[*]</TD>
		<TD BGCOLOR="$fill">($ data) </TD>
		</TR>
		)) ret) </set>
	</Case>
	<Case> 1
		<set> ^ret (cons(quote(
		<TR>
		<TD BGCOLOR="$fill"><A HREF="$url">[*]</A></TD>
		<TD BGCOLOR="$fill">($ data) </TD>
		</TR>
		)) ret) </set>
	</Case>
	</Switch>
	</Case>
	</Switch>
</For>
^ret
</Sequence>
</Define>

<Define Order="Normal"> ^element ^sym
(quote(
<LI/>
($ (element-link sym))
<BR/>
<TABLE BORDER="#0">
($ (element-notes sym))
</TABLE>
))
</Define>

<Define> ^indicated () ^sym
(quote(
<UL>
($ (cdr sym))
</UL>
))
</Define>

</notes-style>

<Define> ^cache-style (NewEnvironment(CurrentEnvironment)) </Define>

<cache-style type="raw">

<Define> ^check-radio ()
<Arguments> ^name ^val </Arguments>
<Switch>
<Case> (= val "off")
(quote(
<INPUT TYPE="radio" NAME="$name" VALUE="off" CHECKED=""/>
<B>OFF:</B> ($ name) cache is off. <BR/>
<INPUT TYPE="radio" NAME="$name" VALUE="w" />
<B>W:</B> Read from network and write into the cache. <BR/>
<INPUT TYPE="radio" NAME="$name" VALUE="r/w" />
<B>R/W:</B> ($ name) cache is full active. <BR/>
))
</Case>
<Case> (= val "w")
(quote(
<INPUT TYPE="radio" NAME="$name" VALUE="off" />
<B>OFF:</B> ($ name) cache is off. <BR/>
<INPUT TYPE="radio" NAME="$name" VALUE="w" CHECKED=""/>
<B>W:</B> Read from network and write into the cache. <BR/>
<INPUT TYPE="radio" NAME="$name" VALUE="r/w" />
<B>R/W:</B> ($ name) cache is full active. <BR/>
))
</Case>
<Case> (= val "r/w")
(quote(
<INPUT TYPE="radio" NAME="$name" VALUE="off" />
<B>OFF:</B> ($ name) cache is off. <BR/>
<INPUT TYPE="radio" NAME="$name" VALUE="w" />
<B>W:</B> Read from network and write into the cache. <BR/>
<INPUT TYPE="radio" NAME="$name" VALUE="r/w" CHECKED=""/>
<B>R/W:</B> ($ name) cache is full active. <BR/>
))
</Case>
</Switch>
</Define>

<Define Order="Normal"> ^cache ^sym
(quote(
	<FORM name="cache-query" action="cachequery.cgi" method="get">
	<HR/>
	<B> Routing Cache </B>
	<BR/><BR/>
	($ (check-radio "Routing" (GE (GE sym 'routing) 1)))
	<HR/>
	<B> Resource Cache </B>
	<BR/><BR/>
	($ (check-radio "Resource" (GE (GE sym 'resource) 1)))
	<BR/><BR/>
	<INPUT type="submit" name="action" value="OK"/>
	</FORM>
))
</Define>

<Define> ^cache-setup ()
<Arguments/>
<Sequence> ()
<gv-resource rid="4">
	<gv-set-cache routing="^Routing" resource="^Resource"/>
	<gv-set-status/>
</gv-resource>

()
</Sequence>
</Define>

</cache-style>

<Define> ^proxy-style (NewEnvironment(CurrentEnvironment)) </Define>

<proxy-style type="raw">

<Define> ^server () ^sym
(GE sym 2)
</Define>

<Define> ^server-list ()
<Arguments> ^list </Arguments>
<Sequence> ()
<Define> ^ret ^"" </Define>
<For dec="list">
	<set> ^ret (+ ret (car list) "\n") </set>
</For>
^ret
</Sequence>
</Define>

<Define> ^proxyinfo () ^sym
<Switch>

<Case> (= (GE sym 1) "NoProxy")
(quote(
<FORM name="proxy-query" action="httpproxyquery.cgi" method="get">
<TABLE BORDER="#0">
<TR>
<TD></TD>
<TD>
<INPUT TYPE="radio" NAME="proxytype" VALUE="NoProxy" CHECKED=""/> NoProxy
<INPUT TYPE="radio" NAME="proxytype" VALUE="HTTPProxy"/> HTTPProxy
</TD>
</TR>
<TR>
<TD> <B>ProxyServer:</B> </TD>
<TD><INPUT type="#text" name="server" size="#40"/></TD>
<TD> <B>ProxyPort: </B></TD>
<TD><INPUT type="#text" name="port" size="#6"/></TD>
</TR>
<TR><TD>------</TD><TD>--------------------</TD></TR>

<TR>
<TD VALIGN="top"> <B>DirectAccess: </B> </TD>
<TD> ^"<TEXTAREA type=text name=\"direct\" ROWS=10 COLS=40></TEXTAREA>"
</TD>
</TR>
<TR>
<TD> ^"" </TD>
<TD><INPUT type="submit" name="action" value="OK"/></TD>
</TR>
</TABLE>
</FORM>
))
</Case>

<Case> (= (GE sym 1) "HTTPProxy")
<Define> ^server (GE sym 2) </Define>
<Define> ^port (GE sym 3) </Define>
(quote(
<FORM name="proxy-query" action="httpproxyquery.cgi" method="get">
<TABLE BORDER="#0">
<TR>
<TD></TD>
<TD>
<INPUT TYPE="radio" NAME="proxytype" VALUE="NoProxy"/> NoProxy
<INPUT TYPE="radio" NAME="proxytype" VALUE="HTTPProxy" CHECKED=""/> HTTPProxy
</TD>
</TR>
<TR>
<TD> <B>ProxyServer:</B> </TD>
<TD><INPUT type="#text" name="server" value="$server" size="#40"/></TD>
<TD> <B>ProxyPort: </B></TD>
<TD><INPUT type="#text" name="port" value="$port" size="#6"/></TD>
</TR>
<TR><TD>------</TD><TD>--------------------</TD></TR>

<TR>
<TD VALIGN="top"> <B>DirectAccess: </B> </TD>
<TD>
($ (+ "<TEXTAREA type=text name=\"direct\" ROWS=10 COLS=40>"
	(server-list (cdr (cdr (cdr (cdr sym)))))
	"</TEXTAREA>"))
</TD>
</TR>
<TR>
<TD> ^"" </TD>
<TD><INPUT type="submit" name="action" value="OK"/></TD>
</TR>
</TABLE>
</FORM>
))
</Case>

<Case> 1
(GE sym 1)
</Case>

</Switch>
</Define>

<Define> ^proxy-setup ()
<Arguments/>
<Sequence> ()
<gv-resource rid="4">
<Switch>
<Case> (= proxytype "NoProxy")
	<SetProxy type="NoProxy" />
</Case>
<Case> (And (= proxytype "HTTPProxy") (= (EA () 'direct 0) 0))
	<SetProxy type="NoProxy" />
	<SetProxy type="HTTPProxy"
		server="^server"
		port="^port"/>
</Case>
<Case> (= proxytype "HTTPProxy")
	<SetProxy type="NoProxy" />
	<SetProxy type="HTTPProxy"
		server="^server"
		port="^port"/>
	<RegSwitch> ^direct
	<Case rex=" \r\n\t,">
		1
	</Case>
	<Case rex=".*">
		<SetProxy type="NoProxy"
			direct="^pattern" />
	</Case>
	</RegSwitch>
</Case>
</Switch>

<gv-set-status/>

</gv-resource>

()
</Sequence>
</Define>

</proxy-style>


<Define> ^native-proxy-style (NewEnvironment(CurrentEnvironment)) </Define>

<native-proxy-style type="raw">

<Define> ^server () ^sym
(GE sym 2)
</Define>

<Define> ^server-list ()
<Arguments> ^list </Arguments>
<Sequence> ()
<Define> ^ret ^"" </Define>
<For dec="list">
	<set> ^ret (+ ret (car list) "\n") </set>
</For>
^ret
</Sequence>
</Define>

<Define> ^proxyinfo () ^sym
<Switch>

<Case> (= (GE sym 1) "NoProxy")
(quote(
<FORM name="proxy-query" action="nativeproxyquery.cgi" method="get">
<TABLE BORDER="#0">
<TR>
<TD></TD>
<TD>
<INPUT TYPE="radio" NAME="proxytype" VALUE="NoProxy" CHECKED=""/> NoProxy
<INPUT TYPE="radio" NAME="proxytype" VALUE="NativeProxy"/> NativeProxy
</TD>
</TR>
<TR>
<TD> <B>ProxyServer:</B> </TD>
<TD><INPUT type="#text" name="server" size="#40"/></TD>
<TD> <B>ProxyPort: </B></TD>
<TD><INPUT type="#text" name="port" size="#6"/></TD>
</TR>
<TR><TD>------</TD><TD>--------------------</TD></TR>

<TR>
<TD VALIGN="top"> <B>DirectAccess: </B> </TD>
<TD> ^"<TEXTAREA type=text name=\"direct\" ROWS=10 COLS=40></TEXTAREA>"
</TD>
</TR>
<TR>
<TD> ^"" </TD>
<TD><INPUT type="submit" name="action" value="OK"/></TD>
</TR>
</TABLE>
</FORM>
))
</Case>

<Case> (= (GE sym 1) "NativeProxy")
<Define> ^server (GE sym 2) </Define>
<Define> ^port (GE sym 3) </Define>
(quote(
<FORM name="proxy-query" action="nativeproxyquery.cgi" method="get">
<TABLE BORDER="#0">
<TR>
<TD></TD>
<TD>
<INPUT TYPE="radio" NAME="proxytype" VALUE="NoProxy"/> NoProxy
<INPUT TYPE="radio" NAME="proxytype" VALUE="NativeProxy" CHECKED=""/>
NativeProxy
</TD>
</TR>
<TR>
<TD> <B>ProxyServer:</B> </TD>
<TD><INPUT type="#text" name="server" value="$server" size="#40"/></TD>
<TD> <B>ProxyPort: </B></TD>
<TD><INPUT type="#text" name="port" value="$port" size="#6"/></TD>
</TR>
<TR><TD>------</TD><TD>--------------------</TD></TR>

<TR>
<TD VALIGN="top"> <B>DirectAccess: </B> </TD>
<TD>
($ (+ "<TEXTAREA type=text name=\"direct\" ROWS=10 COLS=40>"
	(server-list (cdr (cdr (cdr (cdr sym)))))
	"</TEXTAREA>"))
</TD>
</TR>
<TR>
<TD> ^"" </TD>
<TD><INPUT type="submit" name="action" value="OK"/></TD>
</TR>
</TABLE>
</FORM>
))
</Case>

<Case> 1
(GE sym 1)
</Case>

</Switch>
</Define>

<Define> ^proxy-setup ()
<Arguments/>
<Sequence> ()
<gv-resource rid="4">
<Switch>
<Case> (= proxytype "NoProxy")
	<SetNativeProxy type="NoProxy" />
</Case>
<Case> (And (= proxytype "NativeProxy") (= (EA () 'direct 0) 0))
	<SetNativeProxy type="NoProxy" />
	<SetNativeProxy type="NativeProxy"
		server="^server"
		port="^port"/>
</Case>
<Case> (= proxytype "NativeProxy")
	<SetNativeProxy type="NoProxy" />
	<SetNativeProxy type="NativeProxy"
		server="^server"
		port="^port"/>
	<RegSwitch> ^direct
	<Case rex=" \r\n\t,">
		1
	</Case>
	<Case rex=".*">
		<SetNativeProxy type="NoProxy"
			direct="^pattern" />
	</Case>
	</RegSwitch>
</Case>
</Switch>

<gv-set-status/>

</gv-resource>

()
</Sequence>
</Define>

</native-proxy-style>



</Sequence> <!-- HTMLdb -->


<!-- some events -->

<indicated-coord type="raw">
<Define> ^gv-event ()
<Arguments> ^rid ^type </Arguments>
	<Sequence> (NewEnvPair HTMLdb (CurrentEnvironment))
		<Option update="immidiate" url="/sys/radar/layer.html"/>
		<Option update="immidiate" url="/sys/radar/notes.html"/>
	</Sequence>
</Define>
</indicated-coord>

<hide-coord type="raw">
<Define> ^gv-event ()
<Arguments> ^rid ^type </Arguments>
	<Sequence> (NewEnvPair HTMLdb (CurrentEnvironment))
		<Option update="immidiate" url="/sys/radar/layer.html"/>
		<Option update="immidiate" url="/sys/radar/notes.html"/>
	</Sequence>
</Define>
</hide-coord>

<coordinate type="raw">
<Define> ^gv-event ()
<Arguments> ^rid ^type </Arguments>
<Sequence> ()
	<Define> ^event-uri
		(+ "/resource/coordinate/" rid "/")
	</Define>
	<Sequence> (NewEnvPair HTMLdb (CurrentEnvironment))
		<Option update="immidiate" url="^event-uri"/>
	</Sequence>
</Sequence>
</Define>
</coordinate>

<map type="raw">
<Define> ^gv-event ()
<Arguments> ^rid ^type </Arguments>
<Sequence> ()
	<Define> ^event-uri
		(+ "/resource/map/" rid "/")
	</Define>
	<Sequence> (NewEnvPair HTMLdb (CurrentEnvironment))
		<Option update="immidiate" url="^event-uri"/>
	</Sequence>
</Sequence>
</Define>
</map>

<luster type="raw">
<Define> ^gv-event ()
<Arguments> ^rid ^type </Arguments>
<Sequence> ()
	<Define> ^event-uri
		(+ "/resource/luster.r64/" rid "/")
	</Define>
	<Define> ^this-type ^type </Define>
	<Sequence> (NewEnvPair HTMLdb (CurrentEnvironment))
		<Option update="immidiate" url="^event-uri"/>
		<If> (= this-type "set-note")
		<Then>
		<Option update="immidiate" url="/sys/radar/notes.html"/>
		</Then>
		</If>
	</Sequence>
</Sequence>
</Define>
</luster>

<vector type="raw">
<Define> ^gv-event ()
<Arguments> ^rid ^type </Arguments>
<Sequence> ()
	<Define> ^event-uri
		(+ "/resource/vector/" rid "/")
	</Define>
	<Define> ^this-type ^type </Define>
	<Sequence> (NewEnvPair HTMLdb (CurrentEnvironment))
		<Option update="immidiate" url="^event-uri"/>
		<If> (= this-type "set-note")
		<Then>
		<Option update="immidiate" url="/sys/radar/notes.html"/>
		</Then>
		</If>
	</Sequence>
</Sequence>
</Define>
</vector>

<gv-set-default-style name="null-card-style" type="text/xl">
	<Define> ^information ()
	<Arguments/>
		<quote>(
			"[name]" ($ name) "<BR>"
			"[code]" ($ code)
		)</quote>
	</Define>
</gv-set-default-style>

<gv-set-default-style name="null-onmap-style" type="text/xl">
	<Define> ^information ()
	<Arguments/>
		<quote>(
			<FONT COLOR="#ffc0c0"/>
			($ name)
		)</quote>
	</Define>
</gv-set-default-style>

<gv-set-default-style name="uri-card-style" type="text/xl">
	<Define> ^information ()
	<Arguments> ^uri </Arguments>
	<quote>
	<A HREF="$uri"> ($ name) </A>
	</quote>
	</Define>
</gv-set-default-style>

<gv-set-default-style name="uri-onmap-style" type="text/xl">
	<Define> ^information ()
	<Arguments> ^uri </Arguments>
		^name
	</Define>
</gv-set-default-style>

<gv-set-default-scheme scheme="null"
	card="null-card-style" card.type="text/xl"
	onmap="null-onmap-style" onmap.type="text/xl" />
<gv-set-default-scheme scheme="uri"
	card="uri-card-style" card.type="text/xl"
	onmap="uri-onmap-style" onmap.type ="text/xl" />



