function firstCalFlightSearch(){
var now = new Date();
var cal17 = new CalendarPopup("testdiv_flightsearch");
now.setDate(now.getDate()-1);
cal17.addDisabledDates(null,formatDate(now,"yyyy-MM-dd"));
//cal17.addDisabledDates("12/25/2007");
//cal17.addDisabledDates("Jan 1, 2008",null);
cal17.select(document.getElementById("bottomForm").datedepart,'anchorflight1','MM/dd/yyyy');
}
function secondCalFlightSearch(){
if(document.getElementById("bottomForm").datedepart.value=="")
{
	alert("Please select Departure Date");
	return false;
}
var now = new Date(document.getElementById("bottomForm").datedepart.value);

var plusnow = new Date(document.getElementById("bottomForm").datedepart.value)
plusnow.setDate(plusnow.getDate());
now.setDate(now.getDate()-1);
var fdate = formatDate(plusnow,"MM/dd/yyyy")
//alert(fdate);
var cal18 = new CalendarPopup("testdiv_flightsearch");
cal18.addDisabledDates(null,formatDate(now,"yyyy-MM-dd"));
//cal18.addDisabledDates("12/25/2007");
//cal18.addDisabledDates("Jan 1, 2008",null);
//cal18.select(document.bottomForm.datearrive,'anchorflight2','MM/dd/yyyy');
cal18.select(document.getElementById("bottomForm").datearrive,'anchorflight2','MM/dd/yyyy',(document.getElementById("bottomForm").datearrive.value=='')?fdate:null);
}