<!--#include virtual="/includes/topofpage.asp"-->
<%
' Destination Properties Redirection

Dim Page 
Page = "24"

	If Request("Admin_Dest_ID") <> "" Then
		Session("Admin_Dest_ID") = Request("Admin_Dest_ID")
	End If
	
	If Session("Admin_Dest_ID") = "" Then
		Session("Admin_Dest_ID") = "0"
	End If
	
Dim Conn
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open Application("conn_string")

SQL = "Get_Destination @Dest_ID='" & Session("Admin_Dest_ID") & "', @Realm_ID='" & Session("Admin_Realm") & "'"
Set RSDest = Conn.Execute(SQL)

If Not RSDest.EOF Then

	If RSDest("Target") = "1" Or RSDest("Target") = True Then
		Response.Redirect("destination-properties-target.asp?Edit=True")
	Else
		Response.Redirect("destination-properties-parent.asp?Edit=True")
	End If

Else

%>
	<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">
</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')">
<br><br>
Was unable to load the Destination. Please try again.
</body>
</html>
<% End If %>