%@ Language=VBScript %>
<% Option Explicit %>
<%
Dim strPM, PM, Im1path, Im2path, LogoMain, FSYS, Logo, strRI, RI, strDir, Directions, ShowMap
ShowMap = 0
strPM = "SELECT * FROM PageMinder WHERE ID = 11"
Set PM = CreateObject("ADODB.RecordSet")
PM.Open strPM, objConn
strRI = "SELECT RestaurantName, Address, Address2, City, State, Zip, WebSite, Telephone, FAX, ShowMap, MapKey FROM Restaurants"
Set RI = CreateObject("ADODB.RecordSet")
RI.Open strRI, objConn
strDir = "SELECT * FROM DrivingDirections"
Set Directions = CreateObject("ADODB.RecordSet")
Directions.Open strDir, objConn
Set FSYS = Server.CreateObject("Scripting.FileSystemObject")
Im1path = Server.MapPath ("pageminder") & "\" & PM("Image1")
Im2path = Server.MapPath ("pageminder") & "\" & PM("Image2")
If Layout("LogoSub") > "" Then
LogoMain = Server.MapPath ("logo") & "\" & Layout("LogoSub")
If FSYS.FileExists(LogoMain) Then Logo = Layout("LogoSub")
Else
LogoMain = Server.MapPath ("logo") & "\" & Layout("LogoMain")
If FSYS.FileExists(LogoMain) Then Logo = Layout("LogoMain")
End If
If RI("ShowMap") = True AND RI("MapKey").Value > 0 Then
ShowMap = 1
Dim objHttp, str, ReturnText
Dim startPoint, endPoint, gLat, gLong
set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
objHttp.open "GET", "http://maps.google.com/maps/geo?q=" & Server.URLEncode(RI("Address")) & ",+" & Server.URLEncode(RI("City")) & ",+" & Server.URLEncode(RI("State")) & "+" & Server.URLEncode(RI("Zip")) &"&output=xml&key=" & RI("MapKey"), false
objHttp.Send
ReturnText = objHttp.responseText
startPoint = InStr(ReturnText,"") + 13
endPoint = InStr(ReturnText,"") - 1
gLat = Mid(ReturnText,startPoint,endPoint)
gLong = gLat
startPoint = InStr(gLat,",") - 1
endPoint = Len(gLong) - startPoint -1
gLat = Left(gLat,startPoint)
gLong = Right(gLong,endPoint)
If InStr(gLong,",") > 1 Then
startPoint = InStr(gLong,",") - 1
gLong = Left(gLong,startPoint)
End If
' Response.Write gLat & " "
' Response.Write gLong & " "
Set objHttp = Nothing
End If
%>
<%=PM("PageTitle")%>
">
">
<% If ShowMap = 1 Then %>
<% End If %>
" marginwidth="<%=Layout("LeftMargin")%>" topmargin="<%=Layout("TopMargin")%>" marginheight="<%=Layout("TopMargin")%>"<% If ShowMap = 1 Then %> onload="initialize();" onunload="GUnload()"<% End If %>>
<% If Layout("PageAlign") = "Center" Then %>
<% End If %>
<% If BRC = "True" OR TRC = "True" Then %>
"100%"<% Else %>"780"<% End If %>>
<% If TRC = "True" Then %>
><% If Layout("TL") = "True" Then %><% End If %>
><% If Layout("TR") = "True" Then %><% End If %>
<% End If %>
<% End If %><% If Layout("NavLoc") = "Horizontal" Then %>
bgcolor="white"<% End If %> width=<% If Layout("PageAlign") = "Full" Then %>"100%"<% If Layout("PageHeight") = True Then %> height="100%"<% End If %><% Else %><% If TRC OR BRC = "True" Then %>"750"<% Else %>"780"<% If Layout("PageHeight") = True Then %> height="100%"<% End If %><% End If %><% End If %>>
<% If Layout("LogoPos") = "Below" Then %>
Layout("HdrImg") Then %>bgcolor="<%=Layout("HdrImg")%>"<% End If %> align="<%=Layout("NavAlign")%>">
<% End If %><% If FSYS.FileExists(LogoMain) Then %>
<% End If %><% If Layout("LogoPos") = "Above" Then %>
">
<% End If %>
<% If FSYS.FileExists(im1Path) Then %>
style="padding-right: 6px; padding-bottom: 6px; filter:shadow(color:gray, strength:4, direction:135);"<% End If %>>
" border='<% If PM("Img1Border") = True Then %>1<% Else %>0<% End If %>'>
<% End If %><% If PM("Headline").ActualSize > 0 Then %>
<%=PM("Headline")%>
<% End If %><% If PM("HeaderText").ActualSize > 0 Then %>
<%=PM("HeaderText")%>
<% End If %>
<%=PM("BodyText")%>
<% Response.Write CoName & " - " & CoAddr & " - " & CoCity & " " & CoZip & " - " & CoPhone %><% If CoFax > "" Then Response.Write " - FAX: " & CoFax %>
<% If ShowMap = 1 Then %>
<% End If %>
Click below for a map: Google MapsYahoo! Maps
<% If Not Directions.EOF Then %>
<% Directions.MoveFirst %><% Do While Not Directions.EOF %>
style="padding-right: 6px; padding-bottom: 6px; filter:shadow(color:gray, strength:4, direction:135);"<% End If %>>
" border='<% If PM("Img2Border") = True Then %>1<% Else %>0<% End If %>'>
<% End If %><% If PM("FooterText").ActualSize > 0 Then %>
<%=PM("FooterText")%>
<% End If %>
<% If Layout("OptIn") = True Then %><% End If %>
<% Else %>
bgcolor="white"<% End If %> width=<% If Layout("PageAlign") = "Full" Then %>"100%"<% If Layout("PageHeight") = True Then %> height="100%"<% End If %><% Else %><% If TRC OR BRC = "True" Then %>"750"<% Else %>"780"<% If Layout("PageHeight") = True Then %> height="100%"<% End If %><% End If %><% End If %>>
<% If FSYS.FileExists(LogoMain) Then %>
style="padding-right: 6px; padding-bottom: 6px; filter:shadow(color:gray, strength:4, direction:135);"<% End If %>>
" border='<% If PM("Img1Border") = True Then %>1<% Else %>0<% End If %>'>
<% End If %><% If PM("Headline").ActualSize > 0 Then %>
<%=PM("Headline")%>
<% End If %><% If PM("HeaderText").ActualSize > 0 Then %>
<%=PM("HeaderText")%>
<% End If %>
<%=PM("BodyText")%>
<% Response.Write CoName & " - " & CoAddr & " - " & CoCity & " " & CoZip & " - " & CoPhone %><% If CoFax > "" Then Response.Write " - FAX: " & CoFax %>
<% If ShowMap = 1 Then %>
<% End If %>
Click below for a map: Google MapsYahoo! Maps
<% If Not Directions.EOF Then %>
<% Directions.MoveFirst %><% Do While Not Directions.EOF %>
<% End If %><% If FSYS.FileExists(im2Path) Then %>
style="padding-right: 6px; padding-bottom: 6px; filter:shadow(color:gray, strength:4, direction:135);"<% End If %>>
" border='<% If PM("Img2Border") = True Then %>1<% Else %>0<% End If %>'>
<% End If %><% If PM("FooterText").ActualSize > 0 Then %>
<%=PM("FooterText")%>
<% End If %>
<% End If %><% If TRC = "True" OR BRC = "True"Then %>
<% If BRC = "True" Then %>
><% If Layout("BL") = "True" Then %><% End If %>
><% If Layout("BR") = "True" Then %><% End If %>
<% End If %>
<% End If %><% If Layout("PageAlign") = "Center" Then %>
<% End If %>
<%
PM.Close
Set PM = Nothing
RI.Close
Set RI = Nothing
Directions.Close
Set Directions = Nothing
Layout.Close
Set Layout = Nothing
siteNav.Close
Set siteNav = Nothing
Set FSYS = Nothing
objConn.Close
Set objConn = Nothing
%>