<!--#include virtual="/includes/topofpage.asp"-->
<%
Dim Page
Page = "24"

	Dim SQL1, SQL2, SQL3, SQL4
	Dim Conn, RS, RS2, RS3, RS4
	Dim Event_ID

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


If (Mid(UCase(Request.ServerVariables("CONTENT_TYPE")),1, 19) = "MULTIPART/FORM-DATA") And Not Request.QueryString("IMG") = "1" Then

	Dim Xfer
	Set Xfer = Server.CreateObject("aspSmartUpload.SmartUpload")
	Xfer.Upload

	If (UCase(Request.ServerVariables("REQUEST_METHOD")) = "POST" And Xfer.Form("page") = "0") Then
	
		If Xfer.Form("Admin_Group_ID") <> "" Then
			Session("Admin_Group_ID") = Xfer.Form("Admin_Group_ID")
		End If
		
		If Session("Admin_Group_ID") = "" Then
			Session("Admin_Group_ID") = "0"
		End If
	
	ElseIf (UCase(Request.ServerVariables("REQUEST_METHOD")) = "POST" And (Xfer.Form("page") = Page)) Then

	 If Not Xfer.Form("Event_Name") = "" Then
    
		Dim Begin_date, End_Date, Begin_Hour, Close_Hour, Free, Paid, Event_Name
		Begin_Hour = Xfer.Form("Start_Hour")
		Close_Hour = Xfer.Form("End_Hour")
		
		If Not Begin_Hour = "" Then
			If Xfer.Form("Start_TOD") = "1" Then 
				If Not Begin_Hour = "12" Then
					Begin_Hour = Begin_Hour + 12
				End If
			End If
		End If

		If Not Close_Hour = "" Then
			If Xfer.Form("End_TOD") = "1" Then 
				If Not Close_Hour = "12" Then
					Close_Hour = Close_Hour + 12
				End If
			End If
		End If

		If Xfer.Form("free-paid") = "1" Then 
			Free = 0
			Paid = 1
		Else
			Free = 1
			Paid = 0
		End If
		
		If Not Begin_Hour = "" Then
			Begin_Date = Xfer.Form("Start_Year") & "-" & Xfer.Form("Start_Month") & "-" & Xfer.Form("Start_Day") & " " & Begin_Hour & ":" & Xfer.Form("Start_Min") & ":00.000"
		Else
			Begin_Date = Xfer.Form("Start_Year") & "-" & Xfer.Form("Start_Month") & "-" & Xfer.Form("Start_Day") & " 00:00:00.000"
		End If

		If Not Close_Hour = "" Then
			End_Date = Xfer.Form("End_Year") & "-" & Xfer.Form("End_Month") & "-" & Xfer.Form("End_Day") & " " & Close_Hour & ":" & Xfer.Form("End_Min") & ":00.000"
		Else
			End_Date = Xfer.Form("End_Year") & "-" & Xfer.Form("End_Month") & "-" & Xfer.Form("End_Day") & " 00:00:00.000"
		End If
	
		Event_Name = Replace(Xfer.Form("Event_Name"), "%21", "!")
		Event_Name = Replace(Event_Name, "%23", "#")
		Event_Name = Replace(Event_Name, "%24", "$")
		Event_Name = Replace(Event_Name, "%22", """")
		Event_Name = Replace(Event_Name, "%27", "''")
	
		SQL2 = "Add_Event '" & Event_Name & "', '" & Xfer.Form("Event_Type_ID") & "', '" &  Begin_Date & "', '" & End_Date & "', '" & Xfer.Form("Recur") & "', '" & Replace(Xfer.Form("Description"), "'", "''") & "', '"
		SQL2 = SQL2 & Free & "', '" & Paid & "', '" & Xfer.Form("Pay_Adult") & "', '" & Xfer.Form("Pay_Child") & "', '" & Replace(Xfer.Form("Adult_Desc"), "'", "''") & "', '" & Replace(Xfer.Form("Child_Desc"), "'", "''") & "', '"
		SQL2 = SQL2 & Replace(Xfer.Form("Venue_Name"), "'", "''") & "', '" & Xfer.Form("Address_1") & "', '" & Xfer.Form("City") & "', '" & Xfer.Form("State") & "', '" & Xfer.Form("Zip") & "', '" & Xfer.Form("Country") & "', '" & Xfer.Form("Phone_AreaCode") & "', '" & Replace(Xfer.Form("Phone"), "-", "") & "', '" & Xfer.Form("Entity_ID") & "', '"
		SQL2 = SQL2 & Replace(Xfer.Form("Sponsor_Name"), "'", "''") & "', '" & Xfer.Form("Sponsor_Address_1") & "', '" & Xfer.Form("Sponsor_City") & "', '" & Xfer.Form("Sponsor_State") & "', '"
		SQL2 = SQL2 & Xfer.Form("Sponsor_Zip") & "', '" & Xfer.Form("Sponsor_ID") & "'"

		Set RS2 = Server.CreateObject("ADODB.RecordSet")
		RS2.Open SQL2, Conn
	
		Conn.Execute("Add_Event_Realm_Map @Realm_ID='" & Session("Admin_Realm") & "', @Event_ID='" & RS2("Event_ID") & "'")
		
		Dim Att_ID
	
		For Each Key in Xfer.Form
			If InStr(1, Key, "Att_") Then
				If Xfer.Form(Key) = "True" Then
					Att_ID = Mid(Key, 5)
					SQL3 = "Update_Event_Att '" & RS2("Event_ID") & "', '" & Att_ID & "', '" & Xfer.Form(Key) & "'"
					Conn.Execute(SQL3)
				End If
			End If
		Next
	
		Event_ID = RS2("Event_ID")
		
		RS2.Close()
		Set RS2 = Nothing
  
		If Xfer.Files.count <> 0 And Not Event_ID = "" Then

			Dim DestDir, OrigDir
			Dim Realm_ID, Image_URL, FStatus
			Dim Orig_Image_ID, Orig_Image_URL
			Dim Image_Height, Image_Width
			Dim Image_ID, Image_Type_ID	
			Dim Arr_Image_Type_ID 
			Dim IM_Corrupt, IM_Format, IM_Height, IM_Width, IM_BC, IM_BGC
			Dim TempArr
			Dim TempStr
		
			OrigDir = "D:\Images\Originals" 	'Path to save original images to.
			Orig_Type_ID = "31"					'Type ID for the Original
			Orig_Image_URL = ""					'URL For the Original

			DestDir = "D:\Images" 				' Path to save image id based images to.
			Image_URL = ""						' URL for the new Image.. filename will be appended.
			Xfer.AllowedFilesList = "jpg,gif"	' Allowed File Types...

			Dim item
			Dim value
			Dim file
			Dim intCount

			Dim FName, FSize, FExt, FCap, FDesc, FNewName

			If Not Image_URL = "" And Right(Image_URL,1) <> "/" Then Image_URL = Image_URL & "/"
			If Not Orig_Image_URL = "" And Right(Orig_Image_URL,1) <> "/" Then Orig_Image_URL = Orig_Image_URL & "/"						
			If Not DestDir = "" And Right(DestDir,1) <> "\" Then DestDir = DestDir & "\"
			If Not OrigDir = "" And Right(OrigDir,1) <> "\" Then OrigDir = OrigDir & "\"
	
			For each file In Xfer.Files
	
				FName = file.FileName
			
				If FName <> "" Then
	
					FSize = file.Size
					FExt = file.FileExt
					FCap = Xfer.Form(File.Name & "caption")
					FDesc = Xfer.Form(File.Name & "description")
					FAlt = Xfer.Form(File.Name & "alt")
					Arr_Image_Type_ID = Split(Xfer.Form(file.Name & "types"), ",")
				
					OrigFile = Session("Admin_Group_ID") & "-" & FName  'Replace(Replace(Replace(FormatDateTime(Now), "/", "-"), " ", "-"), ":","-")
					intCount = file.SaveAs(OrigDir & OrigFile)
					
					Set Executor = Server.CreateObject("ASPExec.Execute")
					Executor.Application = "cmd /c ""c:\im\identify.exe -verbose " & OrigDir & OrigFile & """"
					strResult = Executor.ExecuteDosApp
					ParseResult = Split(Replace(strResult,Chr(10),""),Chr(13))

					IM_Corrupt = False

					For i = 0 to Ubound(ParseResult)
						ParseIt = Trim(ParseResult(i))

						If UCase(Mid(ParseIt, 1, 9)) = "IDENTIFY:" Then
							TempArr = Split(ParseIt, ":")
							TempStr = TempArr(1)
							If Trim(UCase(TempStr)) = "MISSING AN IMAGE FILE NAME." Then
								IM_Corrupt=True
							End If
						ElseIf UCase(Mid(ParseIt, 1, 9)) = "GEOMETRY:" Then
							TempArr = Split(ParseIt, ":")
							TempStr = TempArr(1)
							TempArr = Split(TempStr, "x")
							IM_Width=TempArr(0)
							IM_Height=TempArr(1)
						ElseIf UCase(Mid(ParseIt, 1, 17)) = "BACKGROUND COLOR:" Then
							TempArr = Split(ParseIt, ":")
							IM_BGC = Trim(TempArr(1))
						ElseIf UCase(Mid(ParseIt, 1, 13)) = "BORDER COLOR:" Then
							TempArr = Split(ParseIt, ":")
							IM_BC = Trim(TempArr(1))
						End If
					Next
				
					If IM_Corrupt = True Then
						Response.Write "<h2><font color=""#D30000"">You have uploaded a corrupt image.<br>Please check the image and retry.</font></h2>"
						Response.End
					End If
	
					SQL3 = "Add_Image @Image_URL = '" & Orig_Image_URL & "', @Image_File = '" & OrigFile & "', @Image_Ext = '" & FExt 
					SQL3 = SQL3 & "', @Image_Width = '" & IM_Width & "', @Image_Height = '" & IM_Height & "', @Image_BorderColor = '" & IM_BC
					SQL3 = SQL3 & "', @Image_BGColor = '" & IM_BGC & "', @Image_Caption = '" & FCap & "', @Image_Desc = '" & FDesc 
					SQL3 = SQL3 & "', @Image_Alt = '" & FAlt & "', @Image_Size = '" & FSize & "', @Image_Type_ID = '" & Orig_Type_ID & "'"
		
					Set RS3 = Conn.Execute(SQL3)
					Orig_Image_ID = RS3("Image_ID")
	
					For i = 0 to UBound(Arr_Image_Type_ID)
	
						Image_Type_ID = Arr_Image_Type_ID(i)
						
						SQL3 = "Select * From Image_Type Where Image_Type_ID='" & Image_Type_ID & "'"
						Set RS3 = Conn.Execute(SQL3)
						Image_Height = RS3("Height")
						Image_Width = RS3("Width")

						SQL3 = "Update_Image_Status_Event @Event_ID='" & Event_ID & "', @Image_Type_ID='" & Image_Type_ID & "'"
						Set RS3 = Conn.Execute(SQL3)
						
						SQL3 = "Add_Image_Event @Event_ID='" & Event_ID & "', @Image_URL = '" & Image_URL & "', @Image_File = '" & OrigFile & "', @Image_Ext = '" & FExt 
						SQL3 = SQL3 & "', @Image_Width = '" & Image_Width & "', @Image_Height = '" & Image_Height & "', @Image_BorderColor = '" & IM_BC
						SQL3 = SQL3 & "', @Image_BGColor = '" & IM_BGC & "', @Image_Caption = '" & FCap & "', @Image_Desc = '" & FDesc 
						SQL3 = SQL3 & "', @Image_Alt = '" & FAlt & "', @Image_Size = '" & FSize & "', @Image_Type_ID = '" & Image_Type_ID & "', @Status = '" & Xfer.Form(file.Name & "status") & "'" 
	
						Set RS3 = Conn.Execute(SQL3)
						Image_ID = RS3.Fields("Image_ID")
			
						NewFile = Image_ID & "." & FExt
	
						Executor.Application = "cmd /c ""c:\im\copyresize.bat " & OrigDir & OrigFile & "  " & DestDir & NewFile & " """ & Trim(Image_Width) & "x" & Trim(Image_Height) & ">"""""
						strResult = Executor.ExecuteDosApp
						ParseResult = Split(Replace(strResult,Chr(10),""),Chr(13))
	
						New_Width = "0"
						New_Height = "0"
	
						For j = 0 to Ubound(ParseResult)
							ParseIt = Trim(ParseResult(j))

							If InStr(1, ParseIt, ":h") Then
								TempArr = Split(ParseIt, ":h")
								New_Width = Mid(TempArr(0), 2, Len(TempArr(0)) -1)
								New_Height = TempArr(1)
							End If
						Next
				
						'Update Image Width and Height with the New Width and Height.. assume the image was resized..
						Conn.Execute("Update [Image] Set [Image_Width] = '" & New_Width & "', [Image_Height] = '" & New_Height & "' Where [Image_ID]='" & Image_ID & "'")
	
						'Loop through Realms....
						For Each Value in Xfer.Form("Realm")
							Conn.Execute("Add_Realm_Image_Map @Image_ID='" & Image_ID & "', @Realm_ID='" & Value & "', @Status='" & Xfer.Form("realmstatus" & Value) & "'")
						Next
	
					Next			
	
					Set Executor = Nothing			
					Set RS3 = Nothing
					FormAdd = FormAdd + 1
			
				End If
			Next
		End If

		If Err Then
			Response.Write("<b>There was an error: </b>" & Err.description & "<br><br>")
			Response.End
		End If
	End If
	If Xfer.Form("cont") = "1" Then 
		Set Xfer = Nothing	
		If Session("default_page") = "" Then Session("default_page") = "default-lodging.asp"
			Response.Redirect Session("default_page")
		ElseIf Xfer.Form("cont") = "2" Then 
			Dim The_Next
			The_Next = XFer.Form("Next") 
			Set Xfer = Nothing	
			Response.Redirect "default-events.asp?Next=" & The_Next
		End If
	End If
Else
	If (UCase(Request.ServerVariables("REQUEST_METHOD")) = "POST" And Request.Form("page") = "0") Then

		If Request.Form("Admin_Event_ID") <> "" Then
			Session("Admin_Event_ID") = Request.Form("Admin_Event_ID")
		End If
		
		If Session("Admin_Event_ID") = "" Then
			Session("Admin_Event_ID") = "0"
		End If

	End If
End If

%>
<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>
<link rel="stylesheet" href="/Style-sheets/page-formatting.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/page-formatting.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/scroll-boxes.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/standard-input-form.css" type="text/css">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function Sub_Form(cont) {
form1.cont.value=cont;
form1.submit();
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
<link rel="stylesheet" href="../Style-sheets/input-form-small.css" type="text/css">
<link rel="stylesheet" href="../Style-sheets/galley-text-indent.css" type="text/css">
<link rel="stylesheet" href="../Style-sheets/standard-input-form.css" type="text/css">
<link rel="stylesheet" href="../Style-sheets/headline.css" type="text/css">
</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('images/icon-return-to-main-2.gif','images/icon-submit-changes-2.gif','images/icon-continue-wizard-2.gif','/icons/icon-find-location-2.gif','/icons/icon-find-sponsor-2.gif')">
<form name="form1" method="post" action="event-create.asp" id=form1 enctype="multipart/form-data">
<INPUT type="hidden" id="cont" name="cont" value="">
<INPUT type="hidden" id="page" name="page" value="<%=Page%>">
<input type="hidden" id="next" name="next" value="<%=Request.QueryString("Next")%>">
<input type="hidden" name="realm" value="1">
<input type="hidden" name="realmstatus1" value="1">

  <table width="525" border="0" cellspacing="0" cellpadding="2" align="center">
  <tr bgcolor="#FFFFFF"> 
    <td width="467">&nbsp;</td>
    <td align="right" width="58">&nbsp;</td>
  </tr>
  <tr bgcolor="#5e5ebe"> 
      <td width="467" align="center" class="headline-ffffff">Event Creation</td>
    <td bgcolor="#5e5ebe" align="right" width="58"><a href="javascript:;" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1','','images/icon-return-to-main-2.gif',1)" onClick="MM_goToURL('this','default-lodging.asp');return document.MM_returnValue"><img src="images/icon-return-to-main.gif" width="75" height="17" usemap="#returntomain" border="0" name="Image1"></a></td>
  </tr>
  <tr> 
    <td width="467">&nbsp;</td>
    <td width="58">&nbsp;</td>
  </tr>
</table>
  <table width="500" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr> 
      <td width="116">&nbsp;</td>
      <td width="262">&nbsp;</td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116" class="standard-input-form">Event Name:</td>
      <td width="262" class="standard-input-form"> 
        <input type="text" name="Event_Name">
      </td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116" class="standard-input-form">&nbsp;</td>
      <td width="262" class="standard-input-form">&nbsp;</td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116" class="standard-input-form">Event Type:</td>
      <td width="262" class="standard-input-form"> 
        <%
      	Set RS = Server.CreateObject("ADODB.RecordSet")
	SQL1 = "Select * from Event_Type Order by Type_Name"
	RS.Open SQL1, Conn
	%>
        <select name="Event_Type_ID">
          <option selected>Select Type</option>
          <% Do While Not RS.EOF%>
          <option value="<%=RS("Event_Type_ID")%>"><%=RS("Type_Name")%></option>
          <% RS.MoveNext()
	Loop
	RS.Close()
	Set RS = Nothing%>
        </select>
      </td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116" class="standard-input-form">&nbsp;</td>
      <td width="262" class="standard-input-form">&nbsp;</td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116" height="15" class="standard-input-form">Event Start Date:</td>
      <td width="262" height="15" class="standard-input-form"> 
        <select name="Start_Day">
          <option selected>1</option>
          <option>2</option>
          <option>3</option>
          <option>4</option>
          <option>5</option>
          <option>6</option>
          <option>7</option>
          <option>8</option>
          <option>9</option>
          <option>10</option>
          <option>11</option>
          <option>11</option>
          <option>12</option>
          <option>13</option>
          <option>14</option>
          <option>15</option>
          <option>16</option>
          <option>17</option>
          <option>18</option>
          <option>19</option>
          <option>20</option>
          <option>21</option>
          <option>22</option>
          <option>23</option>
          <option>24</option>
          <option>25</option>
          <option>26</option>
          <option>27</option>
          <option>28</option>
          <option>29</option>
          <option>30</option>
          <option>31</option>
        </select>
        <select name="Start_Month">
          <option value="12" selected>December</option>
          <option value="1">January</option>
          <option value="2">Feburary</option>
          <option value="3">march</option>
          <option value="4">April</option>
          <option value="5">May</option>
          <option value="6">June</option>
          <option value="7">July</option>
          <option value="8">August</option>
          <option value="9">Sept</option>
          <option value="10">October</option>
          <option value="11">November</option>
        </select>
        <select name="Start_Year">
          <option selected>2001</option>
          <option>2002</option>
          <option>2003</option>
          <option>2004</option>
          <option>2005</option>
        </select>
      </td>
      <td width="122" height="15">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116" class="standard-input-form">&nbsp;</td>
      <td width="262" class="standard-input-form">&nbsp;</td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116" class="standard-input-form">Start Time:</td>
      <td width="262" class="standard-input-form"> 
        <input type="text" name="Start_Hour" size="2" maxlength="2">
        Hour 
        <input type="text" name="Start_Min" size="2" maxlength="2">
        Minutes 
        <input type="radio" name="Start_TOD" value="0">
        AM 
        <input type="radio" name="Start_TOD" value="1">
        PM </td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116" class="standard-input-form">&nbsp;</td>
      <td width="262" class="standard-input-form">&nbsp;</td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116" class="standard-input-form">Event End Date:</td>
      <td width="262" class="standard-input-form"> 
        <select name="End_Day">
          <option selected>1</option>
          <option>2</option>
          <option>3</option>
          <option>4</option>
          <option>5</option>
          <option>6</option>
          <option>7</option>
          <option>8</option>
          <option>9</option>
          <option>10</option>
          <option>11</option>
          <option>11</option>
          <option>12</option>
          <option>13</option>
          <option>14</option>
          <option>15</option>
          <option>16</option>
          <option>17</option>
          <option>18</option>
          <option>19</option>
          <option>20</option>
          <option>21</option>
          <option>22</option>
          <option>23</option>
          <option>24</option>
          <option>25</option>
          <option>26</option>
          <option>27</option>
          <option>28</option>
          <option>29</option>
          <option>30</option>
          <option>31</option>
        </select>
        <select name="End_Month">
          <option value="12" selected>December</option>
          <option value="1">January</option>
          <option value="2">Feburary</option>
          <option value="3">march</option>
          <option value="4">April</option>
          <option value="5">May</option>
          <option value="6">June</option>
          <option value="7">July</option>
          <option value="8">August</option>
          <option value="9">Sept</option>
          <option value="10">October</option>
          <option value="11">November</option>
        </select>
        <select name="End_Year">
          <option selected>2001</option>
          <option>2002</option>
          <option>2003</option>
          <option>2004</option>
          <option>2005</option>
        </select>
      </td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116" class="standard-input-form">&nbsp;</td>
      <td width="262" class="standard-input-form">&nbsp;</td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116" class="standard-input-form">End Time:</td>
      <td width="262" class="standard-input-form"> 
        <input type="text" name="End_Hour" size="2" maxlength="2">
        Hour 
        <input type="text" name="End_Min" size="2" maxlength="2">
        Minutes 
        <input type="radio" name="End_TOD" value="0">
        AM 
        <input type="radio" name="End_TOD" value="1">
        PM</td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116">&nbsp;</td>
      <td width="262">&nbsp;</td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116" class="standard-input-form">Reoccuring:</td>
      <td width="262" class="standard-input-form"> 
        <input type="radio" name="Recur" value="1">
        Daily </td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116" class="standard-input-form">&nbsp;</td>
      <td width="262" class="standard-input-form"> 
        <input type="radio" name="Recur" value="2">
        Weekly </td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116" class="standard-input-form">&nbsp;</td>
      <td width="262" class="standard-input-form"> 
        <input type="radio" name="Recur" value="3">
        Monthly </td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116" class="standard-input-form">&nbsp;</td>
      <td width="262" class="standard-input-form"> 
        <input type="radio" name="Recur" value="4">
        Annually </td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116">&nbsp;</td>
      <td width="262">&nbsp;</td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116" class="standard-input-form">Repeats:</td>
      <td width="262"> 
        <select name="select6">
          <option selected>Select</option>
          <option>Daily</option>
          <option>Weekly</option>
          <option>Friday, Saturday, Sunday</option>
          <option>Saturday, Sunday</option>
        </select>
      </td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116">&nbsp;</td>
      <td width="262">&nbsp;</td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116">&nbsp;</td>
      <td width="262">&nbsp;</td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116" class="standard-input-form">Event Location:</td>
      <td width="262" class="standard-input-form">&nbsp;</td>
    </tr>
    <tr> 
      <input type="hidden" id="Entity_ID" name="Entity_ID">
      <td width="116" class="standard-input-form">Event Venue Name:</td>
      <td width="262" class="standard-input-form"> 
        <input type="text" name="Venue_Name">
      </td>
      <td width="122"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image3','','/icons/icon-find-location-2.gif',1)" onClick="MM_openBrWindow('event_location_id_lookup.asp','','resizable=yes,width=400,scrollbars=yes')"><img src="/icons/icon-find-location.gif" width="100" height="14" border="0" name="Image3"></a></td>
    </tr>
    <tr> 
      <td width="116" class="standard-input-form">Address:</td>
      <td width="262" class="standard-input-form"> 
        <input type="text" name="Address_1">
      </td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116" class="standard-input-form">City:</td>
      <td colspan="2" class="standard-input-form"> 
        <input type="text" name="City">
        <font face="Verdana, Arial, Helvetica, sans-serif" size="1"> 
        <%	Set State = Server.CreateObject("ADODB.RecordSet")
			Dim StateSQL
			StateSQL = "Select * from States where country_id = '2'"
			State.Open StateSQL, Conn
			%>
        zip: 
        <input type="text" name="zip" size="7">
        <select name="State">
          <OPTION value="" selected>Select</OPTION>
          <% Do While Not State.EOF%>
          <OPTION value="<%=State("State_Abbr")%>"><%=State("State_Abbr")%></OPTION>
          <%State.MoveNext()
        Loop
        State.Close()
        Set State = Nothing%>
        </select>
        <b> 
        </b> </font> </td>
    </tr>
    <tr> 
      <td width="116" height="20">&nbsp;</td>
      <td width="262" height="20">&nbsp;</td>
      <td width="122" height="20">&nbsp;</td>
    </tr>
    <tr> 
      <input type="hidden" id="Sponsor_ID" name="Sponsor_ID">
      <td width="116" height="20" class="standard-input-form">Event Sponsor:</td>
      <td width="262" class="standard-input-form"> 
        <input type="text" name="Sponsor_Name">
      </td>
      <td width="122"><a href="javascript:;" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image4','','/icons/icon-find-sponsor-2.gif',1)" onClick="MM_openBrWindow('event_sponsor_id_lookup.asp','','resizable=yes,width=400,scrollbars=yes')"><img src="/icons/icon-find-sponsor-1.gif" width="100" height="14" border="0" name="Image4"></a></td>
    </tr>
    <tr> 
      <td width="116" height="20" class="standard-input-form">Address:</td>
      <td width="262" class="standard-input-form"> 
        <input type="text" name="Sponsor_Address_1">
      </td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116" height="20" class="standard-input-form">City:</td>
      <td colspan="2" class="standard-input-form"> 
        <input type="text" name="Sponsor_City">
        <font face="Verdana, Arial, Helvetica, sans-serif" size="1"> 
        <%	Set State = Server.CreateObject("ADODB.RecordSet")
			StateSQL = "Select * from States where country_id = '2'"
			State.Open StateSQL, Conn
			%>
        zip: 
        <input type="text" name="Sponsor_zip" size="7">
        <select name="Sponsor_State">
          <option value="" selected>Select</option>
          <% Do While Not State.EOF%>
          <option value="<%=State("State_Abbr")%>"><%=State("State_Abbr")%></option>
          <%State.MoveNext()
        Loop
        State.Close()
        Set State = Nothing%>
        </select>
        <b> 
        </b> </font> </td>
    </tr>
    <tr> 
      <td width="116" height="20">&nbsp;</td>
      <td width="262" height="20">&nbsp;</td>
      <td width="122" height="20">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116" class="standard-input-form">Event Phone:</td>
      <td width="262" class="standard-input-form"> 
        <input type="text" name="Phone_AreaCode" size="3">
        <input type="text" name="Phone" size="7">
      </td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116">&nbsp;</td>
      <td width="262">&nbsp;</td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116" class="standard-input-form">Event Description:</td>
      <td width="262" class="standard-input-form"> 
        <textarea name="Description"></textarea>
      </td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116" class="standard-input-form">&nbsp;</td>
      <td width="262" class="standard-input-form">&nbsp;</td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116" class="standard-input-form">Event Image:</td>
      <td width="262" class="standard-input-form"> 
        <input type="file" name="file">
		<input type="hidden" name="filestatus" value="1">
		<input type="hidden" name="filetypes" value="43">
		<input type="hidden" name="filetypes" value="44">
		<input type="hidden" name="filetypes" value="45">
      </td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116">&nbsp;</td>
      <td width="262">&nbsp;</td>
      <td width="122">&nbsp;</td>
    </tr>
    <tr> 
      <td width="116" class="standard-input-form">Admission:</td>
      <td width="262" class="standard-input-form"> 
        <input type="radio" name="free-paid" value="0" checked>
        Free 
        <input type="radio" name="free-paid" value="1">
        Paid</td>
      <td width="122">&nbsp;</td>
    </tr>
  </table>
  <table width="500" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr> 
      <td width="87" class="standard-input-form" align="right">Adult:</td>
      <td width="172" class="standard-input-form"> $ 
        <input type="text" name="Pay_Adult" size="4">
      </td>
      <td width="52" class="standard-input-form" align="right">Child:</td>
      <td width="189" class="standard-input-form">$ 
        <input type="text" name="Pay_Child" size="4">
      </td>
    </tr>
    <tr> 
      <td width="87" class="standard-input-form-small" align="right">Admission<br>
        Description</td>
      <td width="172" class="standard-input-form-small"> 
        <textarea name="Adult_Desc" rows="2"></textarea>
      </td>
      <td width="52" class="standard-input-form-small">&nbsp;</td>
      <td width="189" class="standard-input-form-small"> 
        <textarea name="Child_Desc" rows="2"></textarea>
      </td>
    </tr>
  </table>
  <table width="500" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr> 
      <td width="41" class="input-form-small" align="right"> 
        <input type="checkbox" name="Att_234" value="True">
      </td>
      <td width="219" class="input-form-small">Indoor</td>
      <td width="48" class="input-form-small" align="right"> 
        <input type="checkbox" name="Att_313" value="True">
      </td>
      <td width="192" class="input-form-small">Outdoor</td>
    </tr>
    <tr> 
      <td width="41" class="input-form-small" align="right"> 
        <input type="checkbox" name="Att_543" value="True">
      </td>
      <td width="219" class="input-form-small">Rain or Shine</td>
      <td width="48" class="input-form-small" align="right"> 
        <input type="checkbox" name="Att_544" value="True">
      </td>
      <td width="192" class="input-form-small">No Dogs</td>
    </tr>
    <tr> 
      <td width="41" class="input-form-small" align="right"> 
        <input type="checkbox" name="Att_545" value="True">
      </td>
      <td width="219" class="input-form-small">100% Non-smoking</td>
      <td width="48" class="input-form-small" align="right"> 
        <input type="checkbox" name="Att_546" value="True">
      </td>
      <td width="192" class="input-form-small">Reservations Required</td>
    </tr>
    <tr> 
      <td width="41" class="input-form-small" align="right"> 
        <input type="checkbox" name="Att_180" value="True">
      </td>
      <td width="219" class="input-form-small">Free Parking</td>
      <td width="48" class="input-form-small" align="right"> 
        <input type="checkbox" name="Att_322" value="True">
      </td>
      <td width="192" class="input-form-small">Paid Parking</td>
    </tr>
    <tr> 
      <td height="9" width="41" class="input-form-small" align="right"> 
        <input type="checkbox" name="Att_547" value="True">
      </td>
      <td height="9" width="219" class="input-form-small">Over 21 Only</td>
      <td height="9" width="48" class="input-form-small" align="right"> 
        <input type="checkbox" name="Att_548" value="True">
      </td>
      <td height="9" width="192" class="input-form-small">Casual Attire</td>
    </tr>
    <tr> 
      <td width="41" class="input-form-small" align="right"> 
        <input type="checkbox" name="Att_549" value="True">
      </td>
      <td width="219" class="input-form-small">Formal Attire</td>
      <td width="48">&nbsp;</td>
      <td width="192">&nbsp;</td>
    </tr>
  </table>
  <table width="525" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr bgcolor="#5e5ebe"> 
    <td align="right" width="49%" height="18"><a href="javascript:Sub_Form('1');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('submitchanges','','images/icon-submit-changes-2.gif',1)"><img src="images/icon-submit-changes.gif" width="200" height="15" name="submitchanges" border="0"></a></td>
    <td width="51%" height="18"><a href="javascript:Sub_Form('2');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image2','','images/icon-continue-wizard-2.gif',1)"><img src="images/icon-continue-wizard.gif" width="150" height="15" usemap="#continue" border="0" name="Image2"></a></td>
  </tr>
  <tr> 
    <td width="49%">&nbsp;</td>
    <td width="51%">&nbsp;</td>
  </tr>
</table>
</form>
</body>
</html>
