
function fillVessel(){ 
 // this function is used to fill the category list on load
addOption(document.Bookings.Vessel, "Sailing", "Sailing Vessel (with Engine)", "");
addOption(document.Bookings.Vessel, "Motor", "Motor Vessel", "");

}

function fillEvent(){ 
 // this function is used to fill the category list on load
addOption(document.Bookings.Event, "Join_a_scheduled_cruise", "Join a scheduled cruise (with other passengers)", "");
addOption(document.Bookings.Event, "Book_a_Private_Charter", "Book a Private Charter", "");
addOption(document.Bookings.Event, "Special_Cruise", "Book a Special Cruise", "");

}


function SelectSubCatV(){
// ON selection of category this function will work


removeAllOptions(document.Bookings.SubCatV);
addOption(document.Bookings.SubCatV, "", "Please make a Selection", "");


// 1st Option For Vessels

if(document.Bookings.Vessel.value == 'Sailing'){
addOption(document.Bookings.SubCatV,"Esperance", "Esperance");
addOption(document.Bookings.SubCatV,"Spirit of Victoria", "Spirit of Victoria");
addOption(document.Bookings.SubCatV,"Sail Trainer One", "Sail Trainer One");
addOption(document.Bookings.SubCatV,"Freestyle", "Freestyle");
}
// 2nd Option For Vessels
{
if(document.Bookings.Vessel.value == 'Motor'){
addOption(document.Bookings.SubCatV,"Southern Cross", "Southern Cross");
addOption(document.Bookings.SubCatV,"Sea Princess", "Sea Princess");
addOption(document.Bookings.SubCatV,"Condor", "Condor", "");
addOption(document.Bookings.SubCatV,"Dawn", "Dawn", "");
addOption(document.Bookings.SubCatV,"Jet Boat", "Jet Boat", "");
}
}
}

function SelectSubCatE(){
// ON selection of category this function will work

removeAllOptions(document.Bookings.SubCatE);
addOption(document.Bookings.SubCatE, "", "Please make a Selection", "");

// 1st Option For Event
if(document.Bookings.Event.value == 'Join_a_scheduled_cruise'){
addOption(document.Bookings.SubCatE,"1_HR_ECO_ADVENTURE_CRUISE", "1 HR ECO/ADVENTURE CRUISE ");
addOption(document.Bookings.SubCatE,"ROBBEN_ISLAND_COASTAL_CRUISE", "ROBBEN ISLAND COASTAL CRUISE ");
addOption(document.Bookings.SubCatE,"WHALE_WATCHING", "WHALE WATCHING", "");
addOption(document.Bookings.SubCatE,"ONE_AND_HALF_HOUR_SAILING_CRUISE", "ONE AND HALF HOUR SAILING CRUISE ", "");
addOption(document.Bookings.SubCatE,"ONE_HOUR_BAY_CRUISE", "ONE HOUR BAY CRUISE", "");
addOption(document.Bookings.SubCatE,"ONE_HOUR_HARBOUR_CRUISE", "ONE HOUR HARBOUR CRUISE", "");
addOption(document.Bookings.SubCatE,"HALF_HOUR_HARBOUR_SEAL_CRUISE", "HALF HOUR HARBOUR SEAL CRUISE ", "");
addOption(document.Bookings.SubCatE,"ONE_HOUR_CHAMPAGNE_CRUISE", "ONE HOUR CHAMPAGNE CRUISE", "");
addOption(document.Bookings.SubCatE,"CHAMPAGNE_CRUISE", "CHAMPAGNE CRUISE", "");
addOption(document.Bookings.SubCatE,"SUNSET_CHAMPAGNE_CRUISE", "SUNSET CHAMPAGNE CRUISE ", "");
}
{
if(document.Bookings.Event.value == 'Book_a_Private_Charter'){
addOption(document.Bookings.SubCatE,"1_hour_Private_Charter", "1 hour Private Charter");
addOption(document.Bookings.SubCatE,"2_hour_Private_Charter", "2 hour Private Charter");
addOption(document.Bookings.SubCatE,"3_hour_Private_Charter", "3 hour Private Charter", "");
addOption(document.Bookings.SubCatE,"Half_Day_Charter", "Half Day Charter", "");
addOption(document.Bookings.SubCatE,"Full_Day_Charter", "Full Day Charter", "");
}
}
{
if(document.Bookings.Event.value == 'Special_Cruise'){
addOption(document.Bookings.SubCatE,"Cruise_and_Dine-Dinner", " Dinner - Cruise and Dine package with 221 Waterfront Restaurant");
addOption(document.Bookings.SubCatE,"Cruise_and_Dine-Lunch", "Lunch - Cruise and Dine package with 221 Waterfront Restaurant");
addOption(document.Bookings.SubCatE,"Vagas_Nights", "Vegas Nights Aboard Sea Princess ", "");
addOption(document.Bookings.SubCatE,"XX", "The Power Sail - ( xx ) - or Double x ", "");
addOption(document.Bookings.SubCatE,"XXX", "The Triple Extreme - ( xxx) - or Triple X", "");
addOption(document.Bookings.SubCatE,"Pinguine_Release", "Penguin Release", "");
addOption(document.Bookings.SubCatE,"Dassen_island_cruise", "Dassen Island Cruise ", "");
addOption(document.Bookings.SubCatE,"Cape_Point_Cruise", "Cape Point Cruise", "");
addOption(document.Bookings.SubCatE,"Seal_Island_in_False_Bay", "Seal Island in False Bay ", "");
addOption(document.Bookings.SubCatE,"Drumming_at_Sea", "Drumming at Sea", "");
addOption(document.Bookings.SubCatE,"Sailing_To_The_Beat", "Sail to the beat of the drums", "");
addOption(document.Bookings.SubCatE,"Active_Cruise", "Active Cruise", "");
addOption(document.Bookings.SubCatE,"BBQ_Cruise", "BBQ Cruise", "");
addOption(document.Bookings.SubCatE,"Schooner_Match_Racing", "Schooner Match Racing", "");
addOption(document.Bookings.SubCatE,"Clay_Shooting_Cruise", "Clay Shooting Cruise", "");
}
}
}

////////////////// 

function removeAllOptions(selectbox)
{
	var i;
	for(i=selectbox.options.length-1;i>=0;i--)
	{
		//selectbox.options.remove(i);
		selectbox.remove(i);
	}
}


function addOption(selectbox, value, text )
{
	var optn = document.createElement("OPTION");
	optn.text = text;
	optn.value = value;

	selectbox.options.add(optn);
}
