<%

Dim SQL1,SQL2
Dim Conn
Dim RS1,RS2,RS3
Dim User_ID, Contact_ID, Group_ID

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open Application("Conn_String")

  If Request.QueryString("UID") = "" And Request.QueryString("CID") = "" And Request.Form("CID") = "" And Request.Form("UID") = "" Then 
	Response.Write ("Error 1 (CID: " & Request.QueryString("CID") & ", UID: " & Request.QueryString("UID") & ", AGID: " & Session("Admin_Group_ID") & ", GID: " & Session("Group_ID") & " - No Group ID. You should login first.. this won't work!<br><br>")	
	Response.End
  Else

  User_ID = Replace(Request.QueryString("UID"), "'", """")
  Contact_ID = Replace(Request.QueryString("CID"), "'", """")
	
  End If
    
  If (Session("Group_ID") = "" And Session("Admin_Group_ID") = "") Then
	Response.Write ("Error 2 (AGID: " & Session("Admin_Group_ID") & ", GID: " & Session("Group_ID") & " - No Group ID. You should login first.. this won't work!<br><br>")  
	Response.End
  Else

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

		Set RS3 = Server.CreateObject("ADODB.Recordset")
		SQL1 = "Select * from [Users] U Join [Group_Contact_Map] G On U.[Contact_ID] = G.[Contact_ID] Join [Contact_Detail] C On C.[Contact_ID] = G.[Contact_ID] Join [Key_Map] KM On KM.[Group_ID] = G.[Group_ID] Join [Keys] K On K.[Key_ID] = KM.[Key_ID] Where G.[Group_ID]='" & Session("Group_ID") & "' And U.[User_ID] = '" & User_ID & "'"
		RS3.Open SQL1, Conn

		Set RS1 = Server.CreateObject("ADODB.Recordset")
		SQL1 = "[Avante].[dbo].[Update_Contact_User] '" & Request.Form("Name_Prefix") & "','" & Request.Form("Name_First") & "','" & Request.Form("Name_MI") & "','" & Request.Form("Name_Last") & "','" & Request.Form("Name_Suffix") & "'," 
		SQL1 = SQL1 & "'" & Request.Form("Gender") & "','" & Request.Form("DOB") & "','" & Request.Form("Title") & "','" & Request.Form("Address_1") & "','" & Request.Form("Address_2") & "','" & Request.Form("City") & "','" & Request.Form("State") & "','" & Request.Form("Country") & "','" & Request.Form("ZIP") & "','" & Request.Form("ZIP_4") & "','" & Request.Form("Latitude") & "'," 
		SQL1 = SQL1 & "'" & Request.Form("Longitude") & "','" & Request.Form("Phone_CountryCode") & "','" & Request.Form("Phone_HM_AreaCode") & "','" & Request.Form("Phone_HM") & "','" & Request.Form("Phone_WK_AreaCode") & "','" & Request.Form("Phone_WK") & "','" & Request.Form("Phone_WK_Ext") & "'," 
		SQL1 = SQL1 & "'" & Request.Form("Fax_HM_AreaCode") & "','" & Request.Form("Fax_HM") & "','" & Request.Form("Fax_WK_AreaCode") & "','" & Request.Form("Fax_WK") & "','" & Request.Form("Web") & "','" & Request.Form("EMail_Home") & "','" & Request.Form("EMail_Work") & "','" & Request.Form("EMail_Other") & "'," 

		If Session("Admin_Group_ID") <> "" Then 'New_Group_ID functionality... 
			SQL1 = SQL1 & "'" & Request.Form("User_Name") & "','" & Request.Form("User_PWD") & "','" & Session("Admin_Group_ID") & "','" & Request.Form("Key_ID") & "','" & User_ID & "','" & RS3("Contact_ID") & "'"
		Else ' Group_ID present....
			SQL1 = SQL1 & "'" & Request.Form("User_Name") & "','" & Request.Form("User_PWD") & "','" & Session("Group_ID") & "','" & Request.Form("Key_ID") & "','" & User_ID & "','" & RS3("Contact_ID") & "'"
		End If

		RS1.Open SQL1, Conn

		Set RS1 = Nothing
		Set RS3 = Nothing
		Set Conn = Nothing

		If (Session("Admin_Group_ID") <> "") Then Response.Redirect "contacts_admin.asp"

   End If
End If


If Session("Admin_Group_ID") <> "" Then
	Group_ID = Session("Admin_Group_ID")
ElseIf Session("New_Group_ID") <> "" Then
    Group_ID = Session("New_Group_ID")
ElseIf Session("Group_ID") <> "" Then
	Group_ID = Session("Group_ID")
Else
	Group_ID = "0"
End If

Set RS1 = Server.CreateObject("ADODB.Recordset")

SQL1 = "Select * from [Users] U Join [Group_Contact_Map] G On U.[Contact_ID] = G.[Contact_ID] Join [Contact_Detail] C On C.[Contact_ID] = G.[Contact_ID] Join [Key_Map] KM On KM.[Group_ID] = G.[Group_ID] Join [Keys] K On K.[Key_ID] = KM.[Key_ID] Where G.[Group_ID]='" & Group_ID & "' And U.[User_ID] = '" & User_ID & "'"
RS1.Open SQL1, Conn
Response.Write SQL1

Set RS2 = Server.CreateObject("ADODB.Recordset")
SQL2 = "Select * from [States] S Join [Countries] C On S.[Country_ID] = C.[Country_ID]"
RS2.Open SQL2, Conn

%>


<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>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">






<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--

function SubmitForm() {
var errmsg='';
if (form1.Name_First.value=='') errmsg=errmsg+'Must Specify a First Name\n';
if (form1.Name_Last.value=='') errmsg=errmsg+'Must Specify a Last Name\n';
if (form1.Address_1.value=='') errmsg=errmsg+'Must Specify An Address\n';
if (form1.City.value=='') errmsg=errmsg+'Must Specify a City\n';
if (form1.State.value=='') errmsg=errmsg+'Must Specify a State\n';
if (form1.Country.value=='') errmsg=errmsg+'Must Specify a Country\n';
if (form1.Zip.value=='') errmsg=errmsg+'Must Specify a Zip Code\n';
if (form1.Email_Home.value=='' && form1.Email_Work.value=='' && form1.Email_Other.value=='') errmsg=errmsg+'Must Specify At Least One Email Address\n';
if (!form1.User_PWD.value == form1.User_PWD_2.value) errmsg=errmsg+'Passwords do not match. Please re-type your password\n'
if (form1.User_Name.value == '') errmsg += 'Must choose a User Name\n'
if (!document.form1.Key_ID[0].checked && !document.form1.Key_ID[1].checked && !document.form1.Key_ID[2].checked) errmsg += 'Must select an access type (i.e., Administrator)\n'

if (errmsg)
   alert(errmsg);
else {
  if (form1.User_PWD.value == '') alert('Password Field Blank. Password will not be Modified.\n');
  form1.submit();
}
}
//-->
</SCRIPT>
</head>

<body bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<FORM action="edit_user.asp" method=post id=form1 name=form1>
  <table border="0" cellspacing="0" cellpadding="0" width="590" style="WIDTH: 590px; HEIGHT: 489px" align="center">
    <tr> 
    <td colspan="6" align="left" bgcolor="#6699cc"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>&nbsp;&nbsp;&nbsp;&nbsp;Edit 
      User Account</b></font></td>
  </tr>
  <tr bgcolor="#cccccc"> 
      <td align="right" rowspan="4" width="99" bgcolor="#cccccc"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b><font color="#000099">User 
        Info:</font></b></font></td>
    <td align="right" width="1" bgcolor="#ffffff">&nbsp;</td>
      <td width="180" align="middle"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b><font color="#000099">First 
        Name:</font></b></font></td>
      <td align="middle" width="58"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"><b>M.I.</b></font><font size="1" color="#000099"><b> 
        </b></font></td>
      <td width="148" align="middle"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"><b>Last 
        Name:</b></font></td>
      <td width="67"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"><b>Jr, 
        Sr </b></font></td>
  </tr>
  <tr bgcolor="#cccccc"> 
    <td align="right" width="1" bgcolor="#ffffff">&nbsp;</td>
      <td width="180" align="middle"> <font size="1"><b><SELECT name="Name_Prefix"> 
      <OPTION value="Ms." <% If RS1("Name_Prefix") = "Ms." Then Response.Write "selected" %>>Ms.</OPTION> 
      <OPTION value="Mrs."<% If RS1("Name_Prefix") = "Mrs." Then Response.Write "selected" %>>Mrs.</OPTION> 
      <OPTION value="Mr." <% If RS1("Name_Prefix") = "Mr." Then Response.Write "selected" %>>Mr.</OPTION>
      <OPTION value="Dr." <% If RS1("Name_Prefix") = "Mr." Then Response.Write "selected" %>>Dr.</OPTION></SELECT> 
      <input name="Name_First" size="15" value="<%= RS1("Name_First") %>">
      </b></font></td>
      <td align="middle" width="58"><font size="1"><b> </b></font><font size="1"><b> 
        <input name="Name_MI" size="2" value="<%= RS1("Name_MI") %>">
      </b></font></td>
      <td width="148" align="middle"> <font size="1"><b> </b></font><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font><font size="1"><b> 
        <input name="Name_Last" size="15" value="<%= RS1("Name_Last") %>">
      </b></font></td>
      <td width="67"><font size="1"><b> 
        <input name="Name_Suffix" size="2" value="<%= RS1("Name_Suffix") %>">
      </b></font></td>
  </tr>
  <tr bgcolor="#cccccc">
    <td align="right" width="1" bgcolor="#ffffff">&nbsp;</td>
      <td width="180" bgcolor="#cccccc" align="middle"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"><b>Title:</b></font></td>
      <td align="middle" width="58"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"><b>D.O.B.: 
        </b></font></td>
    <td colspan="2">&nbsp;</td>
  </tr>
  <tr bgcolor="#cccccc"> 
    <td align="right" width="1" bgcolor="#ffffff">&nbsp;</td>
      <td width="180" bgcolor="#cccccc" align="middle"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"> 
        <input name="Title" size="15" value="<%= RS1("Title") %>">&nbsp; 
        </font></td>
      <td align="middle" width="58"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"><b> 
        <input name="DOB" size="8"  value="<%= RS1("DOB") %>">
      </b></font></td>
      <td colspan="2"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"><b> 
        <input type="radio" name="Gender" value="Male" <% If UCase(RS1("Gender")) = "M" Then Response.Write "checked" %>>
        Male 
        <input type="radio" name="Gender" value="Female" <% If Ucase(RS1("Gender")) = "F" Then Response.Write "checked" %>>
        Female </b></font></td>
  </tr>
  <tr> 
    <td colspan="6"><font color="#000099"><IMG height=3 src="../images/shim.gif" width=1></font></td>
  </tr>
  <tr> 
      <td align="right" width="99" bgcolor="#cccccc"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"><b>Address 
        Info:</b></font></td>
    <td align="right" width="1" bgcolor="#ffffff">&nbsp;</td>
    <td colspan="4" bgcolor="#cccccc"> 
      <table width="100%" border="0" cellspacing="1" cellpadding="0">
        <tr> 
          <td width="23%" align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"><b>Address 
            1:</b></font></td>
          <td width="26%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"> 
            <input name="Address_1" value="<%= RS1("Address_1") %>">
            </font></td>
          <td width="24%">&nbsp;</td>
          <td width="28%">&nbsp;</td>
        </tr>
        <tr> 
          <td width="23%" align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"><b>Address 
            2:</b></font></td>
          <td width="26%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"> 
            <input name="Address_2" value="<%= RS1("Address_2") %>">
            </font></td>
          <td width="24%" align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b><font color="#000099">City:</font></b></font></td>
          <td width="28%"><font size="1"> 
            <input name="City" size="15" value="<%= RS1("City") %>">
            </font></td>
        </tr>
        <tr> 
          <td width="23%" align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"><b>Postal 
            Code:</b></font></td>
          <td width="26%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b> 
            <input name="Zip" size="5" maxlength="5" value="<%= RS1("Zip") %>">&nbsp;<FONT 
            color=#000099>-</FONT> 
            <input name="Zip_4" size="4" maxlength="4" value="<%= RS1("Zip_4") %>">
            </b></font><font size="1"></font></td>
          <td width="24%" align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"> 
            <select name="State">
              <option value="NA">State</option>

<%
 If NOT RS2.EOF Then
   While Not RS2.EOF
%>

<option value="<%= RS2.Fields("State_Abbr") %>" 
<% If UCase(RS2.Fields("State_Abbr")) = UCase(RS1("State")) Then Response.Write "selected" %>><%= RS2.Fields("State_Abbr") %></option>

<%
   RS2.MoveNext 
   Wend
 End If
%>
           </select>
            </font></td>
          <td width="28%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b> 
            <select name="Country">
              <option>Country</option>
	      <option value="US" <% If RS1("Country") = "US" Then Response.Write "selected" %>>United States</option>
	      <option value="CA" <% If RS1("Country") = "CA" Then Response.Write "selected" %>>Canada</option>
            </select>
            </b></font></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr> 
    <td colspan="6"><font color="#000099"><IMG height=3 src="../images/shim.gif" width=1></font></td>
  </tr>
  <tr> 
      <td align="right" width="99" bgcolor="#cccccc"><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000099"><b><font size="1">Phone 
        Contacts:</font></b></font></td>
      <td align="right" width="1" bgcolor="#ffffff">&nbsp;</td>
      <td colspan="4" bgcolor="#cccccc"> 
        <table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#cccccc">
          <tr> 
            <td width="22%" align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"><b>Home 
              Phone:</b></font></td>
            <td width="27%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"> 
              <input name="Phone_HM_AreaCode" size="3" value="<%= RS1("Phone_HM_AreaCode") %>">
              <input name="Phone_HM" size="8" value="<%= RS1("Phone_HM") %>">
              </font></td>
            <td width="23%" align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"><b>Work 
              Phone:</b></font></td>
            <td width="28%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"> 
              <input name="Phone_WK_AreaCode" size="3" value="<%= RS1("Phone_WK_AreaCode") %>">
              <input name="Phone_WK" size="8" value="<%= RS1("Phone_WK") %>">
              </font></td>
          </tr>
          <tr> 
            <td width="22%" align="right">&nbsp;</td>
            <td width="27%">&nbsp;</td>
            <td width="23%" align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b><font color="#000099">Work 
              Ext.</font></b></font></td>
            <td width="28%"> <font face="Verdana, Arial, Helvetica, sans-serif" size="1"> 
              <input type="text" name="Phone_WK_Ext" size="4" value="<%= RS1("Phone_WK_Ext") %>">
              </font></td>
          </tr>
          <tr> 
            <td width="22%" align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"><b>Home 
              Fax:</b></font></td>
            <td width="27%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"> 
              <input name="Fax_HM_AreaCode" size="3" value="<%= RS1("Fax_HM_AreaCode") %>">
              <input name="Fax_HM" size="8" value="<%= RS1("Fax_HM") %>">
              </font></td>
            <td width="23%" align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"><b>Work 
              Fax:</b></font></td>
            <td width="28%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"> 
              <input name="Fax_WK_AreaCode" size="3" value="<%= RS1("Fax_WK_AreaCode") %>">
              <input name="Fax_WK" size="8" value="<%= RS1("Fax_WK") %>">
              </font></td>
          </tr>
        </table>
    </td>
  </tr>
  <tr> 
      <td colspan="6" align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"><b><IMG height=3 src="../images/shim.gif" width=1></b></font></td>
  </tr>
  <tr> 
      <td align="right" width="99" bgcolor="#cccccc"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"><b>Web 
        Info: </b></font></td>
      <td align="right" width="1" bgcolor="#ffffff">&nbsp;</td>
      <td colspan="4" bgcolor="#cccccc"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b> 
        </b></font><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b></b></font> 
        <table width="100%" border="0" cellspacing="1" cellpadding="0" bordercolorlight="#ffffff" bordercolor="#ffffff">
        <tr valign="center"> 
          <td width="22%" align="right"><font size="1" color="#000099"><b><font face="Verdana, Arial, Helvetica, sans-serif">E-mail:</font></b></font></td>
          <td width="28%"><font size="1" color="#000099"><b><font face="Verdana, Arial, Helvetica, sans-serif"> 
            </font><font size="1" color="#000099"><font face="Verdana, Arial, Helvetica, sans-serif"> 
            </font></font><font face="Verdana, Arial, Helvetica, sans-serif"> 
            <input name="Email_Home" size="15" value="<%= RS1("Email_Home") %>">
            </font></b></font></td>
          <td width="19%" align="right"><font size="1" color="#000099"><b><font face="Verdana, Arial, Helvetica, sans-serif">Work 
            E-mail:</font></b></font></td>
          <td width="31%"><font size="1" color="#000099"><font face="Verdana, Arial, Helvetica, sans-serif"> 
            <input name="Email_Work" size="15" value="<%= RS1("Email_Work") %>">
            </font></font></td>
        </tr>
        <tr valign="center"> 
          <td width="22%" align="right" height="18"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"><b>Web 
            Address:</b></font></td>
          <td width="28%" height="18"><font size="1" color="#000099"><font face="Verdana, Arial, Helvetica, sans-serif"><b> 
            </b></font><font size="1" color="#000099"><font face="Verdana, Arial, Helvetica, sans-serif"> 
            </font></font><font face="Verdana, Arial, Helvetica, sans-serif"><b> 
            <input name="Web" size="15" value="<%= RS1("Web") %>">
            </b></font></font></td>
          <td width="19%" align="right" height="18"><font size="1" color="#000099"><b><font face="Verdana, Arial, Helvetica, sans-serif">Alt. 
            E-mail:</font></b></font></td>
          <td width="31%" align="left" height="18"><font size="1" color="#000099"><font face="Verdana, Arial, Helvetica, sans-serif"> 
            </font><font size="1" color="#000099"><font face="Verdana, Arial, Helvetica, sans-serif"> 
            </font></font><font face="Verdana, Arial, Helvetica, sans-serif"> 
            <input name="Email_Other" size="15" value="<%= RS1("Email_Other") %>">
            </font></font></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr> 
      <td colspan="6"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"><b><IMG height=3 src="../images/shim.gif" width=1></b></font></td>
  </tr>
  <tr> 
      <td align="right" width="99" bgcolor="#cccccc"><font size="1" color="#000099"><b><font face="Verdana, Arial, Helvetica, sans-serif">Account 
        Info:</font></b></font></td>
    <td align="right" width="1" bgcolor="#ffffff">&nbsp;</td>
    <td colspan="4" bgcolor="#cccccc"><table width="100%" border="0" cellspacing="1" cellpadding="0">
        <tr> 
          <td width="22%" align="right" height="19"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"><b>Login 
            Name:&nbsp;</b></font></td>
          <td valign="middle" colspan="3" height="19"> <font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"> 
            <input name="User_Name" size="15"  value="<%= RS1("User_Name") %>"> 
            </font></td>
          <td align="center" width="22%" height="19"> <font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"><font color="#cccccc">
            </font></font></td>
        </tr>
        <tr> 
          <td width="22%" align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"><b><b>Password:&nbsp;</b></b></font></td>
          <td width="39%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"> 
            <input type="password" name="User_PWD" size="10" >
            </font></td>
          <td width="17%" align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"><b>Repeat&nbsp;Password:&nbsp;</b></font></td>
          <td width="22%"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099"> 
            <input type="password" name="User_PWD_2" size="10" >
            </font></td>
        </tr>
        <tr> 
          <td></td>
          <td colspan="3" align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000099">Note: Leave password blank to keep the same password.&nbsp;</font> 
        </tr>
      </table></td>
  </tr>
</table>
  <table width="590" border="0" cellspacing="0" cellpadding="0" id=TABLE1 style="WIDTH: 590px; HEIGHT: 16px" align="center">
    <tr bgcolor="#6699cc"> 
    <td width="591" height="2"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">&nbsp;&nbsp;&nbsp;&nbsp;Assign 
      Access Permissions</font></b></td>
  </tr>
</table>
  <table width="591" border="0" cellspacing="1" cellpadding="0" style="WIDTH: 591px; HEIGHT: 67px" align="center">
    <tr bgcolor="#cccccc"> 
    <td align="right"> <font size="1"><b><font face="Verdana, Arial, Helvetica, sans-serif"> 
      <input type="radio" name="Key_ID" value="3" <% If UCase(RS1("Name")) = "USER" Then Response.Write "checked" %> >
      </font></b></font></td>
    <td><font size="1"><b><font face="Verdana, Arial, Helvetica, sans-serif">&nbsp;User</font></b></font></td>
    <td align="right"> <font size="1"><b><font face="Verdana, Arial, Helvetica, sans-serif"> 
      <input type="radio" name="Key_ID" value="2" <% If UCase(RS1("Name")) = "POWER" Then Response.Write "checked" %>>
      </font></b></font></td>
    <td><font size="1"><b><font face="Verdana, Arial, Helvetica, sans-serif"> 
      &nbsp;Power&nbsp;User</font></b></font></td>
    <td align="right"> <font size="1"><b><font face="Verdana, Arial, Helvetica, sans-serif"> 
      <input type="radio" name="Key_ID" value="1" <% If UCase(RS1("Name")) = "ADMIN" Then Response.Write "checked" %>>
      </font></b></font></td>
    <td><font size="1"><b><font face="Verdana, Arial, Helvetica, sans-serif">&nbsp;Administrator</font></b></font></td>
  </tr>
  <tr> 
    <td width="114">&nbsp;</td>
    <td width="114">&nbsp;</td>
    <td width="25">&nbsp;</td>
    <td width="145">&nbsp;</td>
    <td width="24">&nbsp;</td>
    <td width="214">&nbsp;</td>
  </tr>
    <tr align="center"> 
      <td colspan="6" height="11"> 
        <input type="button" name="Submit" value="Submit Changes" onclick="SubmitForm();">
      </td>
  </tr>
</table>
</FORM>
</body>
</html>

<% 
RS1.Close
Set RS1 = Nothing

RS2.Close
Set RS2 = Nothing

Set Conn = Nothing
%>