var charter_trips= new Array("Angel Fish","Conch - Sunset Sail","Star Fish","Sea Horse","Sail Fish","Dolphin AM","Dolphin PM","Oyster Romance Dinner Sail","Oyster Romance Dinner Sail Snorkel","Coral Reef Overnight Stay");	

var charter_trips2= new Array("Angel Fish","Conch - Sunset Sail","Star Fish","Sea Horse","Sail Fish","Dolphin AM","Dolphin PM","Oyster Romance Dinner Sail","Oyster Romance Dinner Sail Snorkel","Coral Reef Overnight Stay");	

var charter_trips3= new Array("Angel Fish","Conch - Sunset Sail","Star Fish","Sea Horse","Sail Fish","Dolphin AM","Dolphin PM","Oyster Romance Dinner Sail","Oyster Romance Dinner Sail Snorkel","Coral Reef Overnight Stay");	

var charter_trips4= new Array("Angel Fish","Conch - Sunset Sail","Star Fish","Sea Horse","Sail Fish","Dolphin AM","Dolphin PM","Oyster Romance Dinner Sail","Oyster Romance Dinner Sail Snorkel","Coral Reef Overnight Stay");	

var charter_trips5= new Array("Angel Fish","Conch - Sunset Sail","Star Fish","Sea Horse","Sail Fish","Dolphin AM","Dolphin PM","Oyster Romance Dinner Sail","Oyster Romance Dinner Sail Snorkel","Coral Reef Overnight Stay");	

var charter_trips6= new Array("Angel Fish","Conch - Sunset Sail","Star Fish","Sea Horse","Sail Fish","Dolphin AM","Dolphin PM","Oyster Romance Dinner Sail","Oyster Romance Dinner Sail Snorkel","Coral Reef Overnight Stay");	

var champagne_toast= new Array("None","Freixenet","Veuve Cliquot","Veuve Cliquot Vintage","Moet Chandon Brut","Moet Chandon Brut Rose\'","Moet Chandon Rose\' Vintage","Krug Brut","Dom Perignon","Dom Perignon Rose\'");

var discount = .05;

charter_trips["Angel Fish"] = 450; // 1-2 people 
charter_trips2["Angel Fish"] = 550; // 3-4 people
charter_trips3["Angel Fish"] = 650; // 5-6 people
charter_trips4["Angel Fish"] = 750; // 7-8 people
charter_trips5["Angel Fish"] = 850; // 9-10 people
charter_trips6["Angel Fish"] = 950; // 11-12 people

charter_trips["Conch - Sunset Sail"] = 400; // 1-2 people 
charter_trips2["Conch - Sunset Sail"] = 475; // 3-4 people
charter_trips3["Conch - Sunset Sail"] = 550; // 5-6 people
charter_trips4["Conch - Sunset Sail"] = 625; // 7-8 people
charter_trips5["Conch - Sunset Sail"] = 700; // 9-10 people
charter_trips6["Conch - Sunset Sail"] = 775; // 11-12 people

charter_trips["Star Fish"] = 550; // 1-2 people 
charter_trips2["Star Fish"] = 650; // 3-4 people
charter_trips3["Star Fish"] = 750; // 5-6 people
charter_trips4["Star Fish"] = 850; // 7-8 people
charter_trips5["Star Fish"] = 950; // 9-10 people
charter_trips6["Star Fish"] = 1050; // 11-12 people

charter_trips["Sea Horse"] = 650; // 1-2 people 
charter_trips2["Sea Horse"] = 750; // 3-4 people
charter_trips3["Sea Horse"] = 900; // 5-6 people
charter_trips4["Sea Horse"] = 1050; // 7-8 people
charter_trips5["Sea Horse"] = 1200; // 9-10 people
charter_trips6["Sea Horse"] = 1350; // 11-12 people

charter_trips["Sail Fish"] = 750; // 1-2 people 
charter_trips2["Sail Fish"] = 900; // 3-4 people
charter_trips3["Sail Fish"] = 1050; // 5-6 people
charter_trips4["Sail Fish"] = 1200; // 7-8 people
charter_trips5["Sail Fish"] = 1350; // 9-10 people
charter_trips6["Sail Fish"] = "Not Available"; // 11-12 people


charter_trips["Dolphin AM"] = 950; // 1-2 people 
charter_trips2["Dolphin AM"] = 1200; // 3-4 people
charter_trips3["Dolphin AM"] = 1350; // 5-6 people
charter_trips4["Dolphin AM"] = 1500; // 7-8 people
charter_trips5["Dolphin AM"] = 1650; // 9-10 people
charter_trips6["Dolphin AM"] = "Not Available"; // 11-12 people

charter_trips["Dolphin PM"] = 950; // 1-2 people 
charter_trips2["Dolphin PM"] = 1200; // 3-4 people
charter_trips3["Dolphin PM"] = 1350; // 5-6 people
charter_trips4["Dolphin PM"] = 1500; // 7-8 people
charter_trips5["Dolphin PM"] = 1650; // 9-10 people
charter_trips6["Dolphin PM"] = "Not Available"; // 11-12 people

charter_trips["Oyster Romance Dinner Sail"] = 600; // 1-2 people 
charter_trips2["Oyster Romance Dinner Sail"] = 900; // 3-4 people
charter_trips3["Oyster Romance Dinner Sail"] = "Not Available"; // 5-6 people
charter_trips4["Oyster Romance Dinner Sail"] = "Not Available"; // 7-8 people
charter_trips5["Oyster Romance Dinner Sail"] = "Not Available"; // 9-10 people
charter_trips6["Oyster Romance Dinner Sail"] = "Not Available"; // 11-12 people

charter_trips["Oyster Romance Dinner Sail Snorkel"] = 700; // 1-2 people 
charter_trips2["Oyster Romance Dinner Sail Snorkel"] = 1000; // 3-4 people
charter_trips3["Oyster Romance Dinner Sail Snorkel"] = "Not Available"; // 5-6 people
charter_trips4["Oyster Romance Dinner Sail Snorkel"] = "Not Available"; // 7-8 people
charter_trips5["Oyster Romance Dinner Sail Snorkel"] = "Not Available"; // 9-10 people
charter_trips6["Oyster Romance Dinner Sail Snorkel"] = "Not Available"; // 11-12 people


charter_trips["Coral Reef Overnight Stay"] = 1600; // 1-2 people 
charter_trips2["Coral Reef Overnight Stay"] = "Not Available"; // 3-4 people
charter_trips3["Coral Reef Overnight Stay"] = "Not Available"; // 5-6 people
charter_trips4["Coral Reef Overnight Stay"] = "Not Available"; // 7-8 people
charter_trips5["Coral Reef Overnight Stay"] = "Not Available"; // 9-10 people
charter_trips6["Coral Reef Overnight Stay"] = "Not Available"; // 11-12 people

champagne_toast["None"] = 0;
champagne_toast["Freixenet"] = 25;
champagne_toast["Veuve Cliquot"] = 80;
champagne_toast["Veuve Cliquot Vintage"] = 110;
champagne_toast["Moet Chandon Brut"] = 65;
champagne_toast["Moet Chandon Brut Rose\'"] = 85;
champagne_toast["Moet Chandon Rose\' Vintage"] = 110;
champagne_toast["Dom Perignon"] = 170;
champagne_toast["Dom Perignon Rose\'"] = 400;

function tellme (s,submit1){
    alert(s);
    submit1.disabled=true;
    return false;
}
function makeArrayFromString() {
   for (var i = 1; i <= makeArrayFromString.arguments.length; i++){
      this[i] = makeArrayFromString.arguments[i];
   }
   this[length] = makeArrayFromString.arguments.length;
   return this;
}


function on_champagne(charter_request,champagne){
    if ((charter_request.value == 'Coral Reef Overnight Stay') || (charter_request.value == 'Oyster Romance Dinner Sail') || (charter_request.value == 'Oyster Romance Dinner Sail Snorkel')) 
    	{champagne.disabled=false} 
       	else {champagne.disabled=true}
}

function on_correspondance(subject,required,Arrival_Date,Charter_Date,customer_status,State,billcountry,hotel,Adults,kids,cost,print_blank_fields,address1,address2,zipcode,city,Phone){
    switch (subject.value) { 
				case 'Question_Comment' :   Arrival_Date.disabled=true;
											Charter_Date.disabled=true;
											customer_status.disabled=true;
											State.disabled=true;
											billcountry.disabled=true;
											hotel.disabled=true;
											Adults.disabled=true;
											kids.disabled=true;
											cost.disabled=true;
											print_blank_fields.value=0;
											required.value="email,Name";
											address1.disabled=true;
											address2.disabled=true;
											city.disabled=true;
											State.disabled=true;
											zipcode.disabled=true;
											Phone.disabled=true;
									break;
				case 'Gift_Certificate' :   Arrival_Date.disabled=false;
											Charter_Date.disabled=false;
											customer_status.disabled=false;
											State.disabled=false;
											billcountry.disabled=false;
											hotel.disabled=false;
											Adults.disabled=false;
											kids.disabled=false;
											cost.disabled=false;
											address1.disabled=false;
											address2.disabled=false;
											city.disabled=false;
											zipcode.disabled=false;
											Phone.disabled=false;
											print_blank_fields.value=1;
											required.value="email,Name,Phone,Charter_Date,Arrival_Date,Hotel,charter_request,customer_status,State,address1,address2,city,zipcode";
									break;
			    default : Arrival_Date.disabled=false;
											Charter_Date.disabled=false;
											customer_status.disabled=false;
											State.disabled=false;
											billcountry.disabled=false;
											hotel.disabled=false;
											Adults.disabled=false;
											kids.disabled=false;
											cost.disabled=false;
											address1.disabled=true;
											address2.disabled=true;
											city.disabled=true;
											zipcode.disabled=true;
											Phone.disabled=false;
											print_blank_fields.value=1;
											required.value="email,Name,Phone,Charter_Date,Arrival_Date,Hotel,charter_request,customer_status,State";
									break;
				}
}

function people_number(Adults,kids,charter_request,passangers,submit1){
		submit1.disabled=false;
		foo = Adults.value;
		for ( i=0;i<kids.value ; i++){
				foo++;
		}
		
		switch (charter_request.value) {
			case 'Coral Reef Overnight Stay' : if (foo > 2) {
													tellme ('We are sorry, but for our overnight charters, we can not accomodate more than 2 guests.',submit1)										
												} 
												break;
			case 'Oyster Romance Dinner Sail' :
												if (foo > 4) {
													tellme ('We are sorry, but for our dinner charters, we can not accomodate more than 4 guests.',submit1)
												}	
												break;									 
			case 'Dolphin AM' :  if (foo > 10) {
													tellme ('We are sorry, but for our Dolphin charter, we can not accomodate more than 10 guests.',submit1)
												}
												break;
			case 'Sail Fish' :  if (foo > 10) {
													tellme ('We are sorry, but for our Sail Fish charter, we can not accomodate more than 10 guests.',submit1)
												}
												break;
			case 'Oyster Romance Dinner Sail Snorkel' :
												if (foo > 4) {
													tellme ('We are sorry, but for our dinner charters, we can not accomodate more than 4 guests.',submit1)
												}	
												break;									 
			case 'Dolphin PM' :  if (foo > 10) {
													tellme ('We are sorry, but for our Dolphin charter, we can not accomodate more than 10 guests.',submit1)
												}
												break;
												
			default :  if (foo > 12) {
			    		tellme ('We are sorry, but we can not accommodate more than 12 people on any of our charters.',submit1)
			    	}
			    	break;
			}
					 					
	passangers.value = foo;       	
}


function total_cost(passangers,charter_request,champagne,cost){
	my_design=false;
	switch(charter_request.value){
			case 'Custom Request' : my_design = true;
						my_cost = "We will let you know the cost!";
						break;
			default : if (passangers.value < 3) {
							my_cost = charter_trips[charter_request.value]
						} else { if (passangers.value < 5) { 
									my_cost = charter_trips2[charter_request.value]
								} else {if (passangers.value < 7) {
										my_cost = charter_trips3[charter_request.value]
										} else { if (passangers.value < 9) { 
													my_cost = charter_trips4[charter_request.value]
										} else { if (passangers.value < 11) { 
													my_cost = charter_trips5[charter_request.value]
										} else {my_cost = charter_trips6[charter_request.value]
										}}}}}
						break;
	}
	if ((charter_request.value != 'Custom Request') && (my_cost != 'Not Available')) {
		    my_cost = my_cost - (my_cost * discount);
 			my_cost = my_cost + champagne_toast[champagne.value];

		 } else {my_design = true};						
		 
	if (!my_design) 
		{cost.value = ("$" + my_cost)}
		else {cost.value = my_cost}
}

