<!--#include virtual="/includes/topofpage.asp"-->
<% 
Dim InFrame
If Not Request.QueryString("InFrame") = "" Then InFrame = Request.QueryString("InFrame")

Dim SQL2, sType_ID, sType_Name, sType_Description
Dim Conn, RS
	
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER={SQL Server};SERVER=WEBSRV01;UID=web;pwd=w3bs1t3;DATABASE=AVANTE"
If (UCase(Request.ServerVariables("REQUEST_METHOD"))) = "POST" Then
	SQL1 = "Select * from [Group] Where [Brand] = '1' And [Lookup_ID] = '" & Request.Form("Lookup_ID") & "' And [Name] Like '%" & Request.Form("search") & "%' Order By [Name] ASC"
Else
	SQL1 = "Select * from [Group] Where [Brand] = '1' And [Lookup_ID] = '" & Request.QueryString("ID") & "' Order By [Name] ASC"
End If

Set RS=Conn.Execute(SQL1)

%>

<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 Franchise ID's</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--

function SetParam(ID){
<%=InFrame%>.hide_flyout("franchise",ID);
}
//-->
</SCRIPT>
</head>

<body bgcolor="#ffffff">
<FORM action="" method=POST id=form1 name=form1>
<% 
	If Not (UCase(Request.ServerVariables("REQUEST_METHOD"))) = "POST" Then
		Response.Write "<input type=hidden name=Lookup_ID value=""" & Request.QueryString("ID") & """>"
	Else
		Response.Write "<input type=hidden name=Lookup_ID value=""" & Request.Form("Lookup_ID") & """>"	
	End If
%>
<font face="Verdana, Arial, Helvetica, sans-serif" size="2">
<TABLE cellSpacing=0 cellPadding=0 width=255 border=0>
  <TR bgColor=#6699cc>
    <TD colSpan=2>
	 <table border="0" cellspacing="0" cellpadding="0" width="100%">
	 <tr><td><B><FONT face="Verdana, Arial, Helvetica, sans-serif" 
      color=#000000 size=2>&nbsp;&nbsp;&nbsp;Available Franchise ID's</FONT></B></TD>
      <td align="right"><FONT face="Verdana, Arial, Helvetica, sans-serif" 
      color=#000000 size=1><A onclick="<%=InFrame%>.hide_flyout();" href="#">Hide ID's</A>&nbsp;</FONT></TD></TR>
      </table>
    </td>
  </tr>
  <TR vAlign=center bgColor=silver borderColorDark=black>
    <TD align=right width=55 height=24>
      <P align=center><B><FONT 
      face="Verdana, Arial, Helvetica, sans-serif" size=1>Entity ID 
      </FONT></B></P></TD>
    <TD height=24 width="200">
      <P align=center><STRONG><FONT size=1> 
    Name</FONT></STRONG></P> </TD></TR>
  <TR><TD align=center colspan=2>
  <FONT size=1>Type in a full or partial name to search for:<br><INPUT type="text" id="search" name="search"><br><INPUT type="button" value="Button" id="submit" name="submit" LANGUAGE=javascript onclick="form1.submit();">
    </font>
    </FORM>
  </TD>
  </TR>   
<%
if rs.eof then
	Response.Write "<TR><TD colspan=2><br>"
	Response.Write "<br>"
	Response.Write "<p></p>"
	Response.Write "<Center><h1> No Data Available </h1></center></TD></TR>"
Else

Do while not rs.eof
%>
<TR><TD width=55><FONT face="Verdana, Arial, Helvetica, sans-serif" size=1><C><%=rs("Group_Id")%></C></FONT></td>
<td width=200 align=left><FONT face="Verdana, Arial, Helvetica, sans-serif" size=1><A href="#" onclick="SetParam('<%=rs("Group_Id")%>');"><%=rs("Name")%></A></FONT></td></tr>
<%
rs.movenext
Loop	
End If
%>

</TABLE>
</form>
</body>
</html>
