<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#BF5DC5, #010708]" verticalAlign="middle" color="#5DECE7" creationComplete="show(event)">
<mx:Script>
	<![CDATA[
		import mx.utils.URLUtil;
		import mx.managers.BrowserManager;
		import mx.managers.IBrowserManager;
		import mx.messaging.AbstractConsumer;
		import flash.net.navigateToURL;
		import mx.rpc.events.FaultEvent;
		import mx.controls.Alert;
		import mx.rpc.events.ResultEvent;
		import Classes.Booking;
		
		[Bindable]
			private var result:String=new String;			
			private var bm:IBrowserManager;			
			private var UName:String;
			private var CityId:String;
			
			public function show(e:Event):void
			{
				bm=BrowserManager.getInstance();
				bm.init("","welcome");
				var o:Object=URLUtil.stringToObject(bm.fragment,"&");
				UName=o.UserName;
				CityId=o.CityId;
				//Alert.show(UName.toString());
				//Alert.show(CityId.toString());
			}
			public function init():void
            {     
            	//Alert.show(UName);
            	var rd:URLRequest=new URLRequest("Payment.html#UserName="+UName+"&CityId="+CityId+"&FromId="+FromDt.selectedDate+"&ToId="+ToDt.selectedDate+"&NoOfAdults="+Noofadults.selectedItem+"&NoOfChild="+Noofchildren.selectedItem);
            	navigateToURL(rd,"_self");
            }
             
	public function getresult(event:ResultEvent):void
	{
		
	}
	public function fault(event:FaultEvent):void
	{
	}
	public function Home():void
	{
		var url:URLRequest=new URLRequest("Home.html");
			navigateToURL(url,"_self");
	}
	
	public function Logout():void
	{
		var url:URLRequest=new URLRequest("Login.html");
			navigateToURL(url,"_self");
	}
	]]>
</mx:Script>

	<mx:WebService
		id="HolidayTripWebService" 
		wsdl="http://localhost:50854/HTWS/Service.asmx?wsdl"
		showBusyCursor="true">
		<mx:operation name="InsertUser" resultFormat="object" result="getresult(event)">
        </mx:operation>		
	</mx:WebService>

	<mx:Label x="84" y="85" text="From Date:" fontWeight="bold" fontStyle="italic" fontSize="13"/>	
	<mx:DateField x="178" y="86" height="21" id="FromDt"/>
	<mx:Label x="350" y="85" text="To Date:" fontWeight="bold" fontStyle="italic" fontSize="13"/>
	<mx:DateField x="441" y="86" height="21" id="ToDt"/>
	<mx:Label x="165" y="187" text="Number Of Adults:" fontWeight="bold" fontStyle="italic" fontSize="13"/>
	<mx:ComboBox x="331" y="188" id="Noofadults">
	<mx:ArrayCollection>
		<mx:String>Select No Of Adults</mx:String>
		<mx:String>1</mx:String>
		<mx:String>2</mx:String>
		<mx:String>3</mx:String>
		<mx:String>4</mx:String>
	</mx:ArrayCollection>
	</mx:ComboBox>
	<mx:Label x="165" y="259" text="Number Of Childern" fontWeight="bold" fontStyle="italic" fontSize="13"/>
	<mx:ComboBox x="331" y="260" id="Noofchildren">
	<mx:ArrayCollection>
		<mx:String>Select No Of Children</mx:String>
		<mx:String>1</mx:String>
		<mx:String>2</mx:String>
		<mx:String>3</mx:String>
		<mx:String>4</mx:String>
	</mx:ArrayCollection>
	</mx:ComboBox>
	<mx:Button x="301" y="344" label="Next &gt;&gt;" width="80" height="27" borderColor="#259DF1" fillAlphas="[1.0, 1.0]" fillColors="[#D62F2F, #190606]" color="#B6D2D8" cornerRadius="20" click="init()"/>
	<mx:Label x="285" y="23" text="Booking" fontFamily="Courier New" fontSize="20" fontWeight="bold" fontStyle="italic" color="#B1D913" height="31"/>
	<mx:LinkButton x="661" y="28" label="Home" cornerRadius="20" themeColor="#ECF0F3" click="Home()"/>
	<mx:LinkButton x="763" y="28" label="Logout" themeColor="#ECF0F3" cornerRadius="20" click="Logout()"/>
	
</mx:Application>
