
<%
If UCase(Request.ServerVariables("REQUEST_METHOD")) = "POST" Then

	Dim SQL1
	Dim Conn
	Dim RS

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER={SQL Server};SERVER=WEBSRV01;UID=web;pwd=w3bs1t3;DATABASE=AVANTE"

SQL1 = "[Avante].[dbo].[Find_Feature_Local_Dist] '" & Request.Form("State") & "','" & Request.Form("County") & "','" & Request.Form("Lat") & "','" & Request.Form("Lon") & "','" & Request.Form("SearchSize") & "'"
Set RS = Conn.Execute (SQL1)

End If

%>
<HTML>
<STYLE>
BODY {SCROLLBAR-FACE-COLOR: #5e5ebe; SCROLLBAR-HIGHLIGHT-COLOR: #5e5ebe; SCROLLBAR-SHADOW-COLOR: #5e5ebe; SCROLLBAR-3DLIGHT-COLOR: #5e5ebe; SCROLLBAR-ARROW-COLOR:  #6666CC; SCROLLBAR-TRACK-COLOR: #E3E3E3; SCROLLBAR-DARKSHADOW-COLOR: #666666; }
</STYLE>
<head>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<%
If UCase(Request.ServerVariables("REQUEST_METHOD")) <> "POST" Then
%><FORM action="" method=post id=form1 name=form1>

<TABLE cellSpacing=1 borderColorDark=black cellPadding=1 width="75%" border=0>
  
  <TR>
    <TD bgColor=blue colSpan=4>
      <P align=center><FONT color=white><STRONG>Feature 
      Lookup</STRONG></FONT></P></TD></TR>
  
  <TR>
    <TD>
      <P align=right>State: </P></TD>
    <TD><INPUT id=Name maxLength=50 name=State 
      value=FL></TD>
    <TD>
      <P align=right>County: </P></TD>
    <TD><INPUT id=County name=County 
   value=Orange></TD></TR>
  <TR>
    <TD>
      <P align=right>Lattitude: </P></TD>
    <TD><INPUT id=Lat name=Lat 
      value=28.54></TD>
    <TD>
      <P align=right>Longitude: </P></TD>
    <TD><INPUT id=Lon name=Lon 
      value=-81.35></TD></TR>
  <TR>
    <TD colSpan=4>
      <P align=center>Search Area:<INPUT id=text5 style="WIDTH: 50px" 
      maxLength=10 width="50" align=middle value=.05 name=SearchSize 
      ></P></TD></TR>
  <TR>
    <TD colSpan=4>
      <P align=center><INPUT id=submit1 type=submit value=Submit name=submit1></P></TD></TR></TABLE>
</FORM>
<%
Else
%><TABLE>
<%

	Dim sFeatureName, sFeatureType, sFeatureID, sDist
	
if RS.EOF then
	Response.Write "<br>"
	Response.Write "<br>"
	Response.Write "<p></p>"
	Response.Write "<Center><h1> No Data Available </h1></center>"

End if

Set sFeatureName=rs("FeatureName")
Set sFeatureType=rs("FeatureType")
Set sFeatureID=rs("FeatureID")
Set sDist=rs("Dist")
'Start Text for alternating colored rows
	Dim RowColor
	RowColor = 0
' End Test for Colored Rows
Do while not rs.eof
'Start Text for alternating colored rows
	if rowcolor = 0 then
		Response.Write "<TR bgColor=white>"
		RowColor = 1
	Else
		Response.Write "<TR bgColor=lightblue>"
		RowColor = 0
	End if
' End Test for Colored Rows (note change in first response.write)	
	Response.Write "<TD><FONT face='Verdana, Arial, Helvetica, sans-serif' size=2><C>"
	Response.Write "<a href=Disp_Feature_Detail.asp?FeatureID=" 
	Response.Write sFeatureID &" Target=ResultsFrame>" & sFeatureName & "</a>"
	Response.Write "</C></td><td><FONT face='Verdana, Arial, Helvetica, sans-serif' size=2>"
	Response.Write sFeatureType & "&nbsp;</td><td><FONT face='Verdana, Arial, Helvetica, sans-serif' size=2>"
	Response.Write sDist & " mi</td></tr>"
	rs.movenext
Loop
%>
</TABLE>
<%
End IF
%>
</BODY>
</HTML>
