function calculate_costs(card_type)
	{
		var customer_no = document.form1.numofcustomers.value;
		var cost =customer_no * 395 ;
		if(card_type == "Amex"){
			var extra_cost= ((cost * 3)/100);
		}	
		if(card_type == "Master"){
			var extra_cost= ((cost * 1.5)/100);			
		}	
		if(card_type == "Visa"){
			var extra_cost= ((cost * 1.5)/100);			
		}	
		
		var total_cost= cost + extra_cost;
	 	
		
	 	document.getElementById("costtotal"). innerHTML = "Total Cost = $AUD "+total_cost; 
	 	//document.getElementById("totalcost").value = total_cost; 
	}
function check_blank()
	{
	
	 	if(document.form1.numofcustomers.options[0].selected){
		  alert("Choose the no of Guest");
		   return false;  
		}
		
		if(document.form1.customer_fname.value.length==0 || document.form1.customer_fname.value.length < 2){
		  alert("Please Enter Customer First Name ");
		   return false;  
		}
		
		if(document.form1.customer_lname.value.length==0 || document.form1.customer_lname.value.length < 2){
		  alert("Please Enter Customer Last Name ");
		   return false;  
		}
		
		if(emailValidate(document.getElementById("txtEmail").value)==false) {
		alert("Please Enter Valid Email.");
		return false;
		}
		
		if(document.form1.txtAddress.value.length==0 || document.form1.txtAddress.value.length < 2){
		  alert("Please Enter Address");
		   return false;  
		}
		
		if(document.form1.txtPostcode.value.length==0 || document.form1.txtPostcode.value.length < 2){
		  alert("Please Enter Postcode");
		   return false;  
		}
		
		if(document.form1.booked_by.value.length==0 || document.form1.booked_by.value.length < 2){
		  alert("Can't Be Blank or Invalid Entry! Please Enter Booked By Name");
		   return false;  
		}
		
		if(document.form1.pickup_dest.options[0].selected){
		  alert("Select Destination");
		   return false;  
		}
		
		if(document.form1.tourdate.options[0].selected){
		  alert("Select Tour Date");
		   return false;  
		}
		
		if(document.form1.nationality.value.length==0 || document.form1.nationality.value.length < 2){
		  alert("Can't Be Blank or Invalid Entry! Please Enter Your Nationality");
		   return false;  
		}	
		
		if(document.form1.diet.options[0].selected){
		  alert("Select Dietary");
		   return false;  
		}

		if(document.form1.chname.value.length==0 || document.form1.chname.value.length < 2){
		  alert("Please Enter Card Holder Name ");
		   return false;  
		}
		
		if(document.getElementById('cr_type').checked==false && document.getElementById('crtype_master').checked==false && document.getElementById('crtype_Amex').checked==false)
		{
			alert("Select Credit Card Type");			
			return false;
		}
		
		if(document.form1.ccnumber.value.length==0 || document.form1.ccnumber.value.length < 4){
		  alert("Can't Be Blank or Invalid Entry! Please Enter Card Number");
		   return false;  
		}			
				
		if(document.form1.ddlExpiryMonth.value.length==0 || document.form1.ddlExpiryYear.value==0){
			alert("Enter Card Expiration Date");
		   return false;  
		}			
		
	}	

function emailValidate(str){
	
    var  filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i	
    if (filter.test(str)){
        testresults=true;
	}else{
       testresults=false;
    }
    return (testresults);
}	