function PopupWin_HotelInfo( venderId, productCode)
{
//alert (venderId);
//alert (productCode);


	myWindow=window.open('PopupHotelInfo.aspx?VENDERID='+venderId+'&PRODUCTCODE='+productCode,'win','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,ScreenY=0,width=1000,height=800');
	myWindow.moveTo(100,100);

}

function RedirectToCheckOut(txtTotalId)
{
	var objTxtTotal=document.getElementById(txtTotalId);
	var total=objTxtTotal.value;
	//alert (total);
	if(total  !="" && total !="0" && total !="0.00")
	{
	 document.location = "PaxInfo.aspx";
	}
	else
	{
		alert ("Shopping cart is empty");
	}

}
function PopupWin_DailyRates(venderId, productCode,dateOfService,duration)
{
//window.open('PopupHotelrates.aspx','win','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,ScreenY=0,width=410,height=470');
//alert (venderId);
//alert (productCode);
//alert (dateOfService);
//alert (duration);
	myWindow=window.open('PopupHotelDailyRates.aspx?VENDERID='+venderId+'&PRODUCTCODE='+productCode+'&SERVICEDATE='+dateOfService+'&DURATION='+duration,'win','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,ScreenY=0,width=850,height=600');
	myWindow.moveTo(100,100);

}

function PopupWin_ViewBookingDetail(confirmNumber)
{
	//alert (confirmNumber);
	myWindow=window.open('ViewBookingDetail.aspx?CONFNUMBER='+confirmNumber,'win','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,ScreenY=0,width=1000,height=1000');
	myWindow.moveTo(100,100);
 
}


function PopupWin_TourInfo(optionControlId)
{
			var objDropDown=document.getElementById(optionControlId);
			var selectedIndex  = objDropDown.selectedIndex;
			var selectedValue = objDropDown.options[selectedIndex].value;
			//alert (selectedValue);
			if(selectedValue !=null && selectedValue!='' )
			{
			
			myWindow=window.open('PopupTourdetail.aspx?TOURID='+selectedValue,'win','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,ScreenY=0,width=950,height=400');
			myWindow.moveTo(100,100);
			}

}

function MoreHotelInfo(optionControlId)
{
			var objDropDown=document.getElementById(optionControlId);
			var selectedIndex  = objDropDown.selectedIndex;
			var selectedValue = objDropDown.options[selectedIndex].value;
			var venderIdAndProductId=selectedValue.split(",");
			//alert (venderIdAndProductId[0]);
			//alert (venderIdAndProductId[1]);
			PopupWin_HotelInfo(venderIdAndProductId[0],venderIdAndProductId[1]);
		
}

function CallPrint(strid)
{
	var prtContent = document.getElementById(strid);
	var WinPrint =
	window.open('','','letf=0,top=0,width=1000,height=1,t toolbar=0,scrollbars=0,status=0');
	WinPrint.document.write(prtContent.innerHTML);
	WinPrint.document.close();
	WinPrint.focus();
	//WinPrint.print();
	//WinPrint.close();
}
function PrintConfirmation()
{

	var WinPrint =	window.open('','','letf=0,top=0,width=1000,height=1000,t toolbar=0,scrollbars=0,status=0');
	
	var count=3;
	//Hotels
	var idRootGrid    = 'HotelBookingConfirmation1_dgHotelBookingConfirmation__ctl'; 
    var idlblHotelName = '_lblHotelName';
    var idlblDates = '_lblDates';
    var idlblRoomsNumType = '_lblRoomsNumType';
    var idlblTotalRate = '_lblTotalRate';
    //Package
    var idRootPackageGrid    = 'PackageBookingConfirmation1_dgPackageBookingConfirmation__ctl'; 
    var idlblPackage = '_lblPackageName';
    var idlblPackageDate = '_lblPackageDates';
    var idlblPackageRoom = '_lblPackageRoomsNumType';
    var idlblPackageTotal = '_lblPackageTotalRate';
    
	WinPrint.document.write('<html>');
	//Heading
	WinPrint.document.write('<h2>Please print this page as your receipt.</h2><br>');
	var lblRooms=document.getElementById('lblRooms');
	var rooms='Rooms	: ';
	if(lblRooms !=null)
	{
		rooms = rooms+lblRooms.innerHTML
		WinPrint.document.write(rooms);
		WinPrint.document.write('<br>');
		WinPrint.document.write('<br>');
	}
	//Children
	var lblchild=document.getElementById('lblChilren');
	var children='Children : ';
	if(lblchild !=null)
	{
		children = children+lblchild.innerHTML
		WinPrint.document.write(children);
		WinPrint.document.write('<br>');
		WinPrint.document.write('<br>');
	}
	//customerId
	var lblCustomer=document.getElementById('lblCustomerID');
	var CUSTOMER='Customer ID : ';
	if(lblchild !=null)
	{
		CUSTOMER = CUSTOMER+lblCustomer.innerHTML
		WinPrint.document.write(CUSTOMER);
		WinPrint.document.write('<br>');
		WinPrint.document.write('<br>');
	}
	//customer rEF
	var lblCustomerRef=document.getElementById('lblCustomerRef');
	var customerRef='Customer Ref  : ';
	if(lblCustomerRef !=null)
	{
		customerRef = customerRef+lblCustomerRef.innerHTML
		WinPrint.document.write(customerRef);
		WinPrint.document.write('<br>');
		WinPrint.document.write('<br>');
	}
	
	//customer rEF
	var lblLeadPassenger1=document.getElementById('lblLeadPassenger1');
	var customerRef='Passenger 1  : ';
	if(lblLeadPassenger1 !=null)
	{
		customerRef = customerRef+lblLeadPassenger1.innerHTML
		WinPrint.document.write(customerRef);
		WinPrint.document.write('<br>');
		WinPrint.document.write('<br>');
	}
	//Hotel Info
	if(document.getElementById('HotelBookingConfirmation1_dgHotelBookingConfirmation') != null)
	{
		//alert ('in');
		WinPrint.document.write('<h3>Hotels.</h3>');
		//alert(txtctrl.innerHTML);
		WinPrint.document.write('<table  cellspacing="1" border="1" >');
		//Hotel Header
		
		WinPrint.document.write('<TR>');
			
			//Hotel Name
			WinPrint.document.write('<TD>');
			WinPrint.document.write('<h3>Hotel</h3>');
			WinPrint.document.write('</TD>');
			WinPrint.document.write('<TD>');
			WinPrint.document.write('</TD>');
			
			//Dates
			WinPrint.document.write('<TD>');
			WinPrint.document.write('<h3>Dates</h3>');
			WinPrint.document.write('</TD>');
			WinPrint.document.write('<TD>');
			WinPrint.document.write('</TD>');
			
			//Room Type
			WinPrint.document.write('<TD>');
			WinPrint.document.write('<h3># Room Type </h3>');
			WinPrint.document.write('</TD>');
			WinPrint.document.write('<TD>');
			WinPrint.document.write('</TD>');
			
			//Total Rates
			WinPrint.document.write('<TD>');
			WinPrint.document.write('<h3>Total</h3>');
			WinPrint.document.write('</TD>');
			WinPrint.document.write('<TD>');
			WinPrint.document.write('</TD>');
			
			WinPrint.document.write('</TR>');
			
		//Hotel Header End
		
		var txtctrl=document.getElementById(idRootGrid+count+idlblHotelName);
		while (txtctrl != null)
		{
			WinPrint.document.write('<TR>');
			
			//Hotel Name
			WinPrint.document.write('<TD>');
			WinPrint.document.write(txtctrl.innerHTML);
			WinPrint.document.write('</TD>');
			WinPrint.document.write('<TD>');
			WinPrint.document.write('</TD>');
			
			//Dates
			var txtctrl2 = document.getElementById(idRootGrid + count + idlblDates);
			WinPrint.document.write('<TD>');
			WinPrint.document.write(txtctrl2.innerHTML);
			WinPrint.document.write('</TD>');
			WinPrint.document.write('<TD>');
			WinPrint.document.write('</TD>');
			
			//Room Type
			
			var txtctrl3 = document.getElementById(idRootGrid + count + idlblRoomsNumType);
			WinPrint.document.write('<TD>');
			WinPrint.document.write(txtctrl3.innerHTML);
			WinPrint.document.write('</TD>');
			WinPrint.document.write('<TD>');
			WinPrint.document.write('</TD>');
			
			//Total Rates
			
			var txtctrl4 = document.getElementById(idRootGrid + count + idlblTotalRate);
			WinPrint.document.write('<TD>');
			WinPrint.document.write(txtctrl4.innerHTML);
			WinPrint.document.write('</TD>');
			WinPrint.document.write('<TD>');
			WinPrint.document.write('</TD>');
			
			
			WinPrint.document.write('</TR>');
			
			count++
			var txtctrl=document.getElementById(idRootGrid+count+idlblHotelName);
		}
		 
		WinPrint.document.write('</table> ');
	}
	
	//Package Info
	if(document.getElementById('PackageBookingConfirmation1_dgPackageBookingConfirmation') != null)
	{
		count =3;
		WinPrint.document.write('<h3>Packages.</h3>');
		//alert(txtctrl.innerHTML);
		WinPrint.document.write('<table  cellspacing="1" border="1" >');
		//Hotel Header
		
		WinPrint.document.write('<TR>');
			
			//Hotel Name
			WinPrint.document.write('<TD>');
			WinPrint.document.write('<h3>Package</h3>');
			WinPrint.document.write('</TD>');
			WinPrint.document.write('<TD>');
			WinPrint.document.write('</TD>');
			
			//Dates
			WinPrint.document.write('<TD>');
			WinPrint.document.write('<h3>Dates</h3>');
			WinPrint.document.write('</TD>');
			WinPrint.document.write('<TD>');
			WinPrint.document.write('</TD>');
			
			//Room Type
			WinPrint.document.write('<TD>');
			WinPrint.document.write('<h3># Room Type </h3>');
			WinPrint.document.write('</TD>');
			WinPrint.document.write('<TD>');
			WinPrint.document.write('</TD>');
			
			//Total Rates
			WinPrint.document.write('<TD>');
			WinPrint.document.write('<h3>Total</h3>');
			WinPrint.document.write('</TD>');
			WinPrint.document.write('<TD>');
			WinPrint.document.write('</TD>');
			
			WinPrint.document.write('</TR>');
		
		//Hotel Header End
		 
		var txtctrlPk=document.getElementById(idRootPackageGrid+count+idlblPackage);
		while (txtctrlPk != null)
		{
			WinPrint.document.write('<TR>');
			
			//Hotel Name
			WinPrint.document.write('<TD>');
			WinPrint.document.write(txtctrlPk.innerHTML);
			WinPrint.document.write('</TD>');
			WinPrint.document.write('<TD>');
			WinPrint.document.write('</TD>');
			
			//Dates
			var txtctrl2Pk = document.getElementById(idRootPackageGrid + count + idlblPackageDate);
			WinPrint.document.write('<TD>');
			WinPrint.document.write(txtctrl2Pk.innerHTML);
			WinPrint.document.write('</TD>');
			WinPrint.document.write('<TD>');
			WinPrint.document.write('</TD>');
			
			//Room Type
			
			var txtctrl3Pk = document.getElementById(idRootPackageGrid + count + idlblPackageRoom);
			WinPrint.document.write('<TD>');
			WinPrint.document.write(txtctrl3Pk.innerHTML);
			WinPrint.document.write('</TD>');
			WinPrint.document.write('<TD>');
			WinPrint.document.write('</TD>');
			
			//Total Rates
			
			var txtctrl4Pk = document.getElementById(idRootPackageGrid + count + idlblPackageTotal);
			WinPrint.document.write('<TD>');
			WinPrint.document.write(txtctrl4Pk.innerHTML);
			WinPrint.document.write('</TD>');
			WinPrint.document.write('<TD>');
			WinPrint.document.write('</TD>');
		
			WinPrint.document.write('</TR>');
			
			count++
			var txtctrlPk=document.getElementById(idRootPackageGrid+count+idlblPackage);
		}
		 
		WinPrint.document.write('</table> ');
	
	}
	//footer
	WinPrint.document.write('<br>');
	WinPrint.document.write('<br>');
	
	var varTxtBookingTotal=document.getElementById('lblBookingTotal');
	var txtTotal='<h3>Total	: ';
	if(varTxtBookingTotal !=null)
	{
		txtTotal = txtTotal+varTxtBookingTotal.innerHTML+'</h3>'
		WinPrint.document.write(txtTotal);
		WinPrint.document.write('<br>');
		WinPrint.document.write('<br>');
	}
	var varTxtComments=document.getElementById('txtComments');
	var Comments='Comments	: ';
	if(varTxtComments !=null)
	{
		//alert (varTxtComments.value);
		//alert (varTxtComments.innerHTML);
		Comments = Comments+varTxtComments.innerHTML
		WinPrint.document.write(Comments);
		WinPrint.document.write('<br>');
		WinPrint.document.write('<br>');
	}
	
	
	
	
	WinPrint.document.write('</html>');
	
	WinPrint.document.close();
	WinPrint.focus();
	WinPrint.print();
	WinPrint.close();

}
