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

Dim Page 
Page = "54"

Dim Num_Assign
Num_Assign = 5

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

If (UCase(Request.ServerVariables("REQUEST_METHOD")) = "POST" And Request.Form("page") = Page) Then

    If Request.Form("cont") = "1" Then Response.Redirect "default.asp"
    If Request.Form("cont") = "2" Then Response.Redirect "package-create-1.asp"

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>
<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();
}
//-->
</script>
<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')">
<form name="form1" method="post" action="package-create-action.asp">
<INPUT type="hidden" id=page name=page value="<%=Page%>">
<INPUT type="hidden" id=cont name=cont value="">
<%
For Each item in Request.Form
  If Not UCase(item) = "PAGE" And Not UCase(item) = "CONT" Then
	For each value in Request.Form(item)
%>
		<input type="hidden" name="<%=item%>" value="<%=Replace(value, "'", "''")%>">
<%
	Next
  End If
Next
%>
<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">Package Pricing</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('parent','default.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" class="sm-hdln"><%= Request("Package_Name") & " - " & Request("Package_Type") %></td>
    <td width="58" class="sm-hdln">&nbsp;</td>
  </tr>
</table>
  <table width="525" border="0" cellspacing="2" cellpadding="0" align="center">
    <tr> 
      <td width="260"></td>
      <td width="165"></td>
      <td width="50"></td>
      <td width="50"></td>
    </tr>
    <tr> 
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
<%
For each Package in Request("Packages")
	Room_Item = Request("P" & Package & "_Room_Item")
	Room_Item_Group = Request("Room_Item_Group" & room_item)
	Lodging_Name = Request("Lodging_Name" & Room_Item_Group)
	Room_Item_Package = Request("Room_Item_Package" & room_item)
	Room_Item_Name = Request("Room_Item_Name" & room_item)	
	Nightly_Cost = Request("nightly" & Package)
	Total_Cost = Request("total" & Package)

%>
    <tr bgcolor="#5e5eb3"> 
      <td class="input-box-blue" height="3"><b><font color="#ffffff">Package #<%= Package %> -<br>&nbsp;&nbsp;&nbsp;&nbsp;<%=Lodging_Name%></font></b></td>
      <td align="center" class="input-box-blue" height="3"><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td align="left" width="50%" class="input-box-blue"><b><font color="#ffffff">&nbsp;Daily Cost</font></b></td><td align="right" width="50%" class="input-box-blue"><b><font color="#ffffff">Total Cost&nbsp;</font></b></td></tr></table></td>
      <td class="input-box-blue" align="center" height="3"><b><font color="#ffffff">Budget</font></b></td>
      <td class="input-box-blue" align="center" height="3"><b><font color="#ffffff">Dim</font></b></td>
    </tr>
    <tr> 
      <td class="input-box">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%=Room_Item_Name%></td>
      <td class="manage-menu" align="center"><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td align="left" width="50%" class="manage-menu"><font size="2">&nbsp;$<%=Nightly_Cost%></font></td><td align="right" width="50%" class="manage-menu"><font size="2">$<%=Total_Cost%>&nbsp;</font></td></tr></table></td>
      <td align="center" class="input-box"><input name="Budget<%=Package%>" type="checkbox" value="1"></td>
      <td align="center" class="input-box"><input name="Disabled<%=Package%>" type="checkbox" value="1"></td>
    </tr>
<%
	  For ACount = 1 to Num_Assign
	
		If Not Request("Attach_Name_" & Package & "_" & ACount) = "" Then
			Attach_Name = Request("Attach_Name_" & Package & "_" & ACount)
			Attach_Head = Request("Attach_Head_" & Package & "_" & ACount)
			Attach_Desc = Request("Attach_Desc_" & Package & "_" & ACount)
			Attach_Package_Type = Request("Attach_Package_Type_" & Package & "_" & ACount)
			Attach_Type = Request("Attach_Type_" & Package & "_" & ACount)
			'Death to Taxes
			Tax = 0
			Tax_Rate = 0
			Amount = 0
			First_Run = True
			
			'Set Item Array to blank... fixes damn priceRefresh problem!! :)
			Item_Array = ""		
	
			Set RSList = Conn.Execute("Get_Lodging_List_ID_From_Item_Smart @Item_ID='" & Room_Item & "'")
			Room_Item = Request("P" & Package & "_Room_Item")		
	
			Room_Group = Request.Form("Room_Item_Group" & Room_Item)
			Rate_Occupancy = Int(Request.Form("Room_Item_ROcc" & Room_Item))
			Max_Occupancy = Int(Request.Form("Room_Item_MOcc" & Room_Item))
			Room_Name = Request.Form("Room_Item_Name" & Room_Item)
	
			Room_Quantity = Request("P" & Package & "_A" & ACount & "_Room_Item_Quantity" & Room_Item)
			Room_Markup = Request("P" & Package & "_A" & ACount & "_Room_Item_Markup" & Room_Item)

			Total_Cost = Request("total" & Package & "_A" & ACount )
			Nightly_Cost = Request("nightly" & Package & "_A" & ACount )
%>
    <tr bgcolor="#CCCCCC"> 
      <td class="input-box-blue" height="3">&nbsp;Package #<%= Package %> - <%=Attach_Head%></td>
      <td align="center" class="input-box-blue" height="3"><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td align="left" width="50%" class="input-box-blue">&nbsp;Daily Cost</td><td align="right" width="50%" class="input-box-blue">Total Cost&nbsp;</td></tr></table></td>
      <td colspan="2" class="input-box-blue" align="center" height="3">Dim</td>
    </tr>
    <tr> 
      <td class="input-box">&nbsp;</td>
      <td class="manage-menu" align="center"><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td align="left" width="50%" class="manage-menu"><font size="2">&nbsp;$<%=Nightly_Cost%></font></td><td align="right" width="50%" class="manage-menu"><font size="2">$<%=Total_Cost%>&nbsp;</font></td></tr></table></td>
      <td colspan="2" align="center" class="input-box"><input name="Disabled<%=Package%>_<%=ACount%>" type="checkbox" value="1"></td>
    </tr>
<%
		End If
	Next
%>
    <tr> 
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>

<%
Next 

%>

  </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>
