<!--#include virtual="/includes/topofpage.asp"-->
<%	
	Dim SQL, SQL1, SQL2
	Dim sLookup_ID, sLookup_Name, sLookup_Description, sTier, sLookup_ID_Parent, sLookup_Name_Parent
	Dim Conn, RS, RS1, RS2
	
	Set Conn = Server.CreateObject("ADODB.Connection")
	Conn.Open Application("conn_string")

	SQL = "SELECT State_Name, State_Abbr, Country_Name, Country_Abbr FROM [States] S Join [Countries] C On S.[Country_ID] = C.[Country_ID] Order By [State_Name]"
	Set RS=Conn.Execute(SQL)

%>

<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>
<title>Available Provinces/States and Countries List</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#ffffff">
<p align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">
<TABLE cellSpacing=0 cellPadding=1 width=525 border=0>
  <TR bgColor=#6699cc>
    <TD colSpan=4><B><FONT face="Verdana, Arial, Helvetica, sans-serif" 
      color=#000000 size=2>&nbsp;&nbsp;&nbsp;Available Provinces/States and Countries</FONT></B></TD></TR>

  <TR vAlign=center bgColor=silver borderColorDark=black>
    <TD align=left width=70 height=24><B><FONT size=1>State Abbr.</FONT></B></TD>
    <TD width=105 height=24 align=left><STRONG><FONT size=1>State Name</FONT></STRONG></TD>
    <TD width=122 height=24 align=left><STRONG><FONT size=1>Country</FONT></STRONG></TD>
    <TD width=122 height=24 align=left><STRONG><FONT size=1>Country Abbr.</FONT></STRONG></TD>
  </TR>

<%      
if rs.eof Then
	Response.Write "<tr><td colspan=4><br>"
	Response.Write "<br>"
	Response.Write "<p></p>"
	Response.Write "<Center><h1> No Data Available </h1></center></td></tr>"
Else
 
  Dim RowColor
  RowColor = 0

  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

	Response.Write "<TD><FONT face='Verdana, Arial, Helvetica, sans-serif' size=1><C>" & rs("state_abbr") & "</C></td><td><FONT face='Verdana, Arial, Helvetica, sans-serif' size=2>"
	Response.Write rs("State_Name") & "&nbsp;</td><td><FONT face='Verdana, Arial, Helvetica, sans-serif' size=1>"
	Response.Write rs("Country_Name") & "&nbsp;</FONT></td>"
	Response.Write "<td><FONT face='Verdana, Arial, Helvetica, sans-serif' size=1> (" & RS("Country_Abbr") & ")" & "</font></td></tr>"
	
	rs.movenext
Loop	
End If
%>

  <TR align=middle>
    <TD colSpan=4 height=17>&nbsp;
    <INPUT type="button" value="Close Window" id=button1 name=button1 onclick="window.close();"><br>
  </TD></TR></TABLE>
  </font></p>
</body>
</html>
