function process1()
{
	
	
	
	var frmadate1 = document.form4.ADate.value;
	var frmadate2 = document.form4.ADate2.value;
	//alert (frmadate2);
	if (document.form4.from1.value == "")
	{
		alert ("Please Select From Where You Need Ticket.");
		return false;
	}
	else if (document.form4.to1.value == "")
	{
		alert ("Please Select To Where You Need Ticket.");
		return false;
	}
	else if (document.form4.ADate.value == "")
	{
		alert ("Please Select Departure Date.");
		return false;
	}
	else if (document.form4.from1.value == document.form4.to1.value)
	{
		alert ("Departure and Destination Cannot Be Same.");
		return false;
	}
	else if (document.form4.ADate.value == document.form4.ADate2.value)
	{
		alert ("Departure Date and Return Date Cannot Be Same.");
		return false;
	}
	else if (document.form4.radiobutton1[0].checked)
	{
		if (document.form4.ADate2.value == "")
		{
			alert ("Please Select Return Date.");
			return false;
		}
		else if (document.form4.ADate.value != "" && document.form4.ADate2.value != "")
		{
			//alert ("meow..");
			var str1  = document.form4.ADate.value;
		   var str2  = document.form4.ADate2.value;
		   var dt1   = parseInt(str1.substring(0,2),10);
		   var mon1  = parseInt(str1.substring(3,5),10);
		   var yr1   = parseInt(str1.substring(6,10),10);
		   var dt2   = parseInt(str2.substring(0,2),10);
		   var mon2  = parseInt(str2.substring(3,5),10);
		   var yr2   = parseInt(str2.substring(6,10),10);
		   var date1 = new Date(yr1, mon1, dt1);
		   var date2 = new Date(yr2, mon2, dt2);
		
		   if(date2 < date1)
		   {
			  alert("Return date cannot be greater than Departure date");
			  return false;
		   }
		   else
		   {
				  //alert("Submitting ...");
				  //document.form1.submit();
	
			} 
		}
	
	}
	/*
	else if (IsAmount(document.form4.numberofpassengers.value))
	{
		alert("Please Enter Number in Number of Passengers.");
		return false
	}
	*/
	
}

function IsAmount(sText)
{
   var ValidChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ. ";
   var IsAmount=true;
   var Char;
   if(sText.value=="") return false
   for (i = 0; i <sText.length && IsAmount == true;i++) 
   { 
		Char =sText.charAt(i); 
		if (ValidChars.indexOf(Char) == -1) 
		 {
		 IsAmount = false;
		 }
   }
   return IsAmount;
}
