<!--#include virtual="/includes/topofpage.asp"-->

<!--#include file="includes/dbfunctions.asp"-->
<%
	Dim Page 
	Page = "C1"
%>
<%
	' Passing the Booking variabls
	Dim Itineary_ID, Item_Id, Group_Id
	Itineary_ID=Request.QueryString("@Itineary_ID")
	Item_ID=Request.QueryString("@Item_Id")
	Group_ID=Request.QueryString("@Group_Id")

	'Debug Code
	'Response.Write "Itineary_ID=" & Itineary_ID & "<BR>"
	'Response.Write "Item_ID=" & Item_ID & "<BR>"
	'Response.Write "Group_Id=" & Group_Id & "<BR>"
	'End Debug Code

	'Getting Group Name Information
	Dim SQLName, RSName
	SQLName = "get_entity_from_group @Group_ID='" & Group_ID & "'"
	Set RSName=Conn.Execute(SQLName)

	'Getting Itinerary Summary Information
	Dim SQLSum, RSSum
	SQLSum = "exec Get_Reservation_Summary @Itinerary_ID='" & Itineary_ID & "', @Group_ID='" & Group_ID & "', @Item_ID='" & Item_ID & "'"
'	REsponse.Write SQLSum
	Set RSSum=Conn.Execute(SQLSum)
%>
<%
	'Posting of Data
	If (UCase(Request.ServerVariables("REQUEST_METHOD")) = "POST" And Request.Form("page") = Page) Then

		'Debug Code
			'Response.Write "Posting Data:<BR>"
			'Response.Write "Itinerary_ID: " & Itineary_ID & "<BR>"
			'Response.Write "Group_ID: " & Group_ID & "<BR>"
			'Response.Write "Confirmation Number: " & Request.Form("Confirm_Number") & "<BR>"
		'End Debug Code

		Dim SQLConfirm, Product_Status
		
		Product_Status = 2	'Product_Status
							'	1 Reservation - Unconfirmed	
							'	2 Reservation - Confirmed
							'	3 Reservation - Change, Unconfirmed
							'	4 Reservation - Change, Confirmed
							'	5 Reservation - Cancellation, Unconfirmed
							'	6 Reservation - Cancellation, Confirmed	
		
		SQLConfirm = "exec Update_Room_Confirmation @Itinerary_ID='" & Itineary_ID & "',@Group_ID='" & Group_ID & "',@Confirm_Num='" & Request.Form("Confirm_Number") & "',@Product_Status='" & Product_Status & "'"
		'Response.Write SQLConfirm
		Conn.Execute(SQLConfirm)
		Response.Redirect "mainLive-default.asp"

		'If Request.Form("cont") = "1" Then Response.Redirect (Default_Page)
	    'If Request.Form("cont") = "2" Then Response.Redirect (Next_Page)
	End If
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--
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_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_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 Sub_Form(cont) {
  form1.cont.value=cont
  form1.submit();
//  LeftFrame.location.reload();
//  MainLive.frames[3].location.reload();
}

function twoframes()
{
Top.Frames[2].location="que.asp"
Top.Frames[3].location="mainLive-default.asp"
}

//-->
</script>
<link rel="stylesheet" href="../arrivares.css" type="text/css">
</head>

<body bgcolor="#FFFFFF" text="#000000" onLoad="MM_preloadImages('/images/confirm-print-button-dim.gif','/images/confirm-button-dim.gif');">
<table cellspacing="0" cellpadding="0" border="0" align="center">
  <tr> 
    <td width="590" height="432" valign="top"> 
      <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center" mm_noconvert="TRUE">
        <tr> 
          <td width="67%" valign="bottom"><img height=20 src="/images/net-rate-resi.gif" width=250></td>
          <td width="33%">&nbsp;</td>
        </tr>
        <tr> 
          <td width="67%" class="form-resi-window"><%=RSName("Name")%></td>
          <td width="33%" class="form-resi-window">Our Reservation #</td>
        </tr>
        <tr> 
          <td width="67%" class="roomdetails-trans"><%=RSName("Address_1")%><br>
          <%Dim Temp
			Temp=RSName("Address_2")
			If Temp <> "" Then Response.Write Temp & "<BR>"
          %>
            <%=RSName("City")%>,&nbsp;<%=RSName("State")%>&nbsp;<%=RSName("Zip")%></td>
          <td width="33%" class="confirm-detail" align="center">VIF-<%Response.Write Itineary_ID%> </td>
        </tr>
        <tr> 
          <td colspan="2">&nbsp;</td>
        </tr>
      </table>
      <table width="80%" border="0" cellspacing="0" cellpadding="0" align="center" mm_noconvert="TRUE">
        <tr> 
          <td class="roomdetails-Hghlgt5e5ebe" width="42%">&nbsp;ARRIVAL:</td>
          <td class="roomdetails-Hghlgt5e5ebe" width="41%">&nbsp;DEPARTURE:</td>
          <td class="roomdetails-Hghlgt5e5ebe" width="17%" align="middle"># OF 
            NIGHTS</td>
        </tr>
        <tr> 
          <td width="42%" class="confirm-detail">&nbsp;<%=RSSum("Arrival_Date")%></td>
          <td width="41%" class="confirm-detail">&nbsp;<%=RSSum("Departure_Date")%></td>
          <td width="17%" class="confirm-detail" align="middle"><%=RSSum("Num_Nights")%></td>
        </tr>
        <!--
        <tr> 
          <td width="42%" class="confirm-detail" align="middle">11:00 AM</td>
          <td width="41%" class="confirm-detail" align="middle">10:00 AM</td>
          <td width="17%">&nbsp;</td>
        </tr>
        -->
        <tr> 
          <td width="42%" class="roomdetails-Hghlgt5e5ebe" align="middle"># OF 
            ADULTS</td>
          <td width="41%" class="roomdetails-Hghlgt5e5ebe" align="middle"># OF 
            CHILDREN</td>
          <td width="17%" class="roomdetails-Hghlgt5e5ebe" align="middle">SMOKING</td>
        </tr>
        <tr> 
          <td width="42%" class="confirm-detail" align="middle"><%=RSSum("AdultCount")%></td>
          <td width="41%" class="confirm-detail" align="middle"><%=RSSum("Guest_Count")%></td>
          <td width="17%" class="confirm-detail" align="middle"><%If RSSum("Smoking") = True Then Response.Write "Yes" Else Response.Write "No" End If%></td>
        </tr>
      </table>
	  <% 'Getting Room Types
		Dim SQLRMType, RSRMType
		SQLRMType = "exec Get_Room_Types_Confirmation @Itinerary_ID='" & Itineary_ID & "', @Group_ID='" & Group_ID & "'"
'Response.Write SQLRMType
		Set RSRMType=Conn.Execute(SQLRMType)
		
		If RSRMType.eof Then
	  %>
		<TR>No Rooms In Itinerary</TR>
	  <%
		Else
	  %>
	  <table width="80%" border="0" cellspacing="0" cellpadding="0" align="center" mm_noconvert="TRUE">
        <tr> 
          <td width="83%" class="roomdetails-Hghlgt5e5ebe">&nbsp;ROOM TYPE:</td>
          <td width="17%" class="roomdetails-Hghlgt5e5ebe" align="middle">QUANTITY</td>
        </tr>
      </Table>
	  <%
			Dim SQLRMDet, RSRMDet					
			Do while not RSRMType.eof
	  %>
      <table width="80%" border="0" cellspacing="0" cellpadding="0" align="center" mm_noconvert="TRUE">
        <tr> 
          <td width="83%" class="confirm-detail"><%=RSRmType("Room_Type")%>: <%=RSRmType("Amenity_Name")%> - 
			<%'Getting Room Date Information
				SQLRMDet = "exec Get_Dates_Room_Confirmation  @Itinerary_ID='" & Itineary_ID & "', @Group_ID='" & Group_ID & "', @Item_ID='" & RSRmType("Item_ID") & "'"
'Response.Write SQLRMDet
				Set RSRMDet=Conn.Execute(SQLRMDet)
				If Not RSRMDet.Eof Then
					Do while not RSRMDet.eof
						Response.Write RSRMDet("Month") & "/" & RSRMDet("Day")
						RSRMDet.MoveNext
							If Not RSRMDet.Eof Then Response.Write ", "
					Loop
				End If
				RSRMDet.Close
			%>
          </td>
          <td width="17%" class="confirm-detail" align="middle"><%=RSRmType("Quantity")%></td>
        </tr>
			<%If RSRMType("Rollaway")<>"" Then  %>
				<tr> 
				  <td width="83%" class="confirm-detail">ROLL-A-WAY</td>
				  <td width="17%" class="confirm-detail" align="middle"> <%=RSRMType("Rollaway")%></td>
				</tr>
			<%End If%>
			<%If RSRMType("ExtraAdults")<>"" Then  %>
				<tr> 
				  <td width="83%" class="confirm-detail">Extra Adults</td>
				  <td width="17%" class="confirm-detail" align="middle"> <%=RSRMType("ExtraAdults")%></td>
				</tr>
			<%End If%>
		<!--
	    <tr> 
		  <td class="1p-rule5e5ebe">&nbsp;</td><td class="1p-rule5e5ebe">&nbsp;</td>
		</tr>
		-->
      </table>
		<% ' Getting Special Room Requests
			If RSRMType("Special_Request") <>"" Then		
		%>      
			<table width="80%" border="0" cellspacing="0" cellpadding="0" align="center" mm_noconvert="TRUE">
			  <tr> 
			    <td class="roomdetails-Hghlgt5e5ebe">&nbsp;SPECIAL GUEST REQUESTS:</td>
			  </tr>
			  <tr> 
			    <td class="que-list"><%=RSRMType("Special_Request")%></td>
			  </tr>
			  <tr> 
			    <td class="1p-rule5e5ebe">&nbsp;</td>
			  </tr>
			</table>
		<% End If %>
      <%'End List Table
			RSRMType.movenext
			Loop
		End If
		RSRMType.Close
	  %>
	  <form name="form1" method="post" action="">
		<INPUT type="hidden" id=page name=page value="<%=Page%>">
		<INPUT type="hidden" id=cont name=cont value="">
        <table width="397" border="0" cellspacing="0" cellpadding="0" align="center" background="/images/confirm-submit.gif" height="35">
          <tr> 
            <td width="200" class="confirm-number" valign="center" align="right">&nbsp;</td>
            <td width="185" valign="center" class="confirm-number-box"> 
              <input name="Confirm_Number" class="confirm-number-box" style="BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none">
            </td>
          </tr>
        </table>
        <table width="70%" border="0" cellspacing="0" cellpadding="0" align="center">
          <tr> 
            <td align="middle" width="49%"><img onClick="javascript:Sub_Form('1');" onMouseOver="MM_swapImage('Image21','','/images/confirm-print-button-dim.gif',1)" onMouseOut=MM_swapImgRestore() height=19 src="/images/confirm-print-button.gif" width=121 name=Image21></td>
            <td width="51%" align="middle"><img onClick="javascript:Sub_Form('2');" onMouseOver="MM_swapImage('Image11','','/images/confirm-button-dim.gif',1)" onMouseOut=MM_swapImgRestore() height=19 src="/images/confirm-button.gif" width=121 name=Image11></td>
          </tr>
        </table>
      </form>
    </td>
  </tr>
  <tr> 
    <td width="590" height="1" valign="top"><img width="590" height="1" src="transparent.gif"></td>
  </tr>
</table>
</body>
</html>
