<% if session("orderid") = "" then orderid=0 else orderid = session("orderid") end if %> Spirit Fitness - A Heritage of Quality | The Spirit of Innovation - Dealer Locator
Dealer Locator

Type in your State or Zip Code below to view the dealers in your area.



<%if session("errmsg") <> "" then%> <%=session("errmsg")%>
<% session("errmsg")="" end if msg=replace(request("msg"),", ","") if msg <> "" then %> <%=msg %>
<% end if %>
Enter State or Zip Code: " />
 
<% cando=true abbr=false if request("zip")<>"" then 'if request("line")<>"" and request("zip")<>"" then set conn = Server.Createobject("adodb.connection") set rs = server.createobject("adodb.recordset") connstr = "provider=SQLOLEDB.1;Data source=10.98.94.2\sqlexpress,1433;DATABASE=s_locator;uid=spirit;pwd=xterra20;" conn.open connstr if request("line") <> "1" and request("line") <> "2" and request("line") <> "0" and request("line") <> "" then response.write "

Error: Line code is not accepted

" cando=false end if if not isnumeric(request("zip")) then 'response.write "

Error: Zip code was not accepted

" if len(request("zip"))=2 then sql="select * from states where Abbreviation='"&request("zip")&"'" rs.open SQL,conn,3,1 if rs.eof then stabbr="" else stabbr=rs("Abbreviation") end if rs.close else sql="select * from states where StateName='"&request("zip")&"'" rs.open SQL,conn,3,1 if rs.eof then stabbr="" else stabbr=rs("Abbreviation") end if rs.close end if abbr=true sql="select * from dealers where State='"&ucase(stabbr)&"' order by city, dealer asc;" rs.open SQL,conn,3,1 count=0 %> <% if stabbr<>"" then do until rs.eof lines=rs("lines") if inStr(1,lines,",")>0 then lines2=split(lines,",") lines="" for li=0 to ubound(lines2) if li<>0 then lines=lines&"
" end if lines=lines&lines2(li)&vbcrlf next 'lines=lines2(0)&"
"&lines2(1) end if %>
<%=rs("dealer")%>
<%=rs("address")%>
<%=rs("city")%> <%=rs("state")%> <%=rs("zip")%>
Phone: <%=rs("phone")%>
Website / Email
<% tempx=trim(rs("website")) if InStr(tempx,"@")=0 then %>   <% rsws=rs("website") rsws=replace(rsws, "http://", "") rsws2=replace(rsws, "www.", "") %> <%=rsws2%> <%else if rs("website")<>"" then %>  " style="line-height:17px;"><%=rs("website")%> <% end if end if%>  <% em1=rs("email1")&"" em2=rs("email2")&"" em3=rs("email3")&"" if em1<>"" then %>
 <%=em1%> <% end if if em2<>"" then %>
 <%=em2%> <% end if if em3<>"" then %>
 <%=em3%> <% end if %>
Product Lines
<%=lines%> 
<% count=count+1 rs.movenext loop end if rs.close if count<>0 then %> <% else %> <% if stabbr="" then%>

State not found, please check the spelling and try again

<%else%>

No dealers were found in your state

<%end if%> <% end if cando=false end if if cando and len(request("zip"))=5 then abbr=true strresult = getzips(request("zip"),"100") count=0 response.write("") for iii = 1 to tcount if request("line")="1" or request("line") = "2" then sql = "select * from dealers inner join lines on dealers.lines = lines.products where zip = '"& t_zips(iii)&"' and (lines.id = " & request("line") & " or lines.id= 3)" else sql = "select * from dealers where zip = '"& t_zips(iii)&"'" response.write("" & VBCRLF) end if rs.open SQL,conn,3,1 do while not rs.eof 'if instr(strresult, rs("zip")) <> 0 then 'if count=0 then %> <% 'end if lines=rs("lines") if inStr(1,lines,",")>0 then lines2=split(lines,",") lines="" for li=0 to ubound(lines2) if li<>0 then lines=lines&"
" end if lines=lines&lines2(li)&vbcrlf next 'lines=lines2(0)&"
"&lines2(1) end if %>
<%=rs("dealer")%>
<%=rs("address")%>
<%=rs("city")%> <%=rs("state")%> <%=rs("zip")%>
Phone: <%=rs("phone")%>
<%=formatnumber(t_dist(iii))%> miles
Website / Email
<% tempx=trim(rs("website")) if InStr(tempx,"@")=0 then %>   <% rsws=rs("website") rsws=replace(rsws, "http://", "") rsws2=replace(rsws, "www.", "") %> <%=rsws2%> <%else if rs("website")<>"" then %>  " style="line-height:17px;"><%=rs("website")%> <% end if end if%>  <% em1=rs("email1")&"" em2=rs("email2")&"" em3=rs("email3")&"" if em1<>"" then %>
 <%=em1%> <% end if if em2<>"" then %>
 <%=em2%> <% end if if em3<>"" then %>
 <%=em3%> <% end if %>
Product Lines
<%=lines%> 
<% count=count+1 'end if %><% rs.movenext loop rs.close next if count<>0 then %> <% else %>

No dealers were found within 100 miles from your zip code

<%end if else if not abbr then response.write "

Error: Zip code was not accepted

" end if end if conn.close end if %>