var Path='./builder/';

window.onload = defaultPage;

function defaultPage() {
	HideExtraElements();
	document.getElementById("boatDetails").style.display = 'none';
	document.getElementById("boatDetails").style.visibility = 'hidden';
	document.getElementById("PackageName").style.display = 'none';
	document.getElementById("PackageName").style.visibility = 'hidden';
	document.getElementById("TourPrice").innerHTML = "$0.00";
	document.getElementById("AccomPrice").innerHTML = "$0.00";
	document.getElementById("ExtraCosts").innerHTML = "$0.00";
	UpdatePrices();
}

function UpdatePackage(obj){
	boatIndex=obj.selectedIndex;
	if (boatIndex<1){ 
	defaultPage();
	return; }
	
	document.getElementById("boatDetails").style.display = '';
	document.getElementById("boatDetails").style.visibility = 'visible';
	document.getElementById("PackageName").style.display = '';
	document.getElementById("PackageName").style.visibility = 'visible';
	ChangeBoatPicture(obj.options[boatIndex].value);
	ChangePackagePrice(boatIndex);
	ChangeExtraCosts(boatIndex);
	ChangeDivingOptions(boatIndex);
	ChangeSailDuration(boatIndex);
	ChangeDepartureDays(boatIndex);
	ChangeTotalPAX(boatIndex);
	ChangeBoatDescription(boatIndex);
	ChangePackageName(boatIndex);
	ChangeIncludedAccom(boatIndex);
	UpdatePrices();
}

function ChangeBoatPicture(boatName){
	document.getElementById("BoatImage").src=Path+boatName;
}

function ChangePackagePrice(Bindex){
	if (Bindex == 1){ // Ocean Rafting
		document.getElementById("TourPrice").innerHTML = "$249.00";
	}else if (Bindex == 2){ // Maxi Ragamuggin
		document.getElementById("TourPrice").innerHTML = "$279.00";
	}else if (Bindex == 3){ // Camira
		document.getElementById("TourPrice").innerHTML = "$289.00";
	}else if (Bindex >= 4 && Bindex <= 5){ // Tongarra & Habibi
		document.getElementById("TourPrice").innerHTML = "$329.00";
	}else if (Bindex >= 6 && Bindex <= 7){ // Siska & Hammer
		document.getElementById("TourPrice").innerHTML = "$399.00";
	}else if (Bindex == 8){ // New Horizon
		document.getElementById("TourPrice").innerHTML = "$419.00";
	}else if (Bindex == 9){ // Cipper
		document.getElementById("TourPrice").innerHTML = "$469.00";
	}else if (Bindex == 10){ // Pride Of Airlie
		document.getElementById("TourPrice").innerHTML = "$000.00";
	}else if (Bindex == 11){ // The Card
		document.getElementById("TourPrice").innerHTML = "$000.00";
	}else if (Bindex == 12){ // Anaconda II
		document.getElementById("TourPrice").innerHTML = "$000.00";
	}else if (Bindex >= 13 && Bindex <= 16){ // British Defender, Boomerang, Condor & Broomstick
		document.getElementById("TourPrice").innerHTML = "$459.00";
	}else if (Bindex >= 17 && Bindex <= 19){ // Fright Train, Matador & Mandrake
		document.getElementById("TourPrice").innerHTML = "$499.00";
	}else if (Bindex == 20){ // Avatar
		document.getElementById("TourPrice").innerHTML = "$564.00";
	}else if (Bindex >= 21 && Bindex <= 22){ // Southern Cross & Ragamuffin II
		document.getElementById("TourPrice").innerHTML = "$605.00";
	}else if (Bindex >= 23 && Bindex <= 24){ // Enid & Ron of Argyll
		document.getElementById("TourPrice").innerHTML = "$629.00";
	}else if (Bindex == 25){ // Ise Pearl
		document.getElementById("TourPrice").innerHTML = "$659.00";
	}else if (Bindex == 26){ // Anaconda III
		document.getElementById("TourPrice").innerHTML = "$639.00";
	}else if (Bindex >= 27 && Bindex <= 28){ // Pacific Star & Spank Me
		document.getElementById("TourPrice").innerHTML = "$659.00";
	}else if (Bindex == 29){ // Solway Lass
		document.getElementById("TourPrice").innerHTML = "$659.00";
	}else if (Bindex == 30){ // Whitsunday Magic
		document.getElementById("TourPrice").innerHTML = "$849.00";
	}
}

function ChangeIncludedAccom(Cindex){
	if (Cindex >= 1 && Cindex <= 16){ // 2 Nights Accommodation
		HideExtraElements();
	}else if (Cindex >= 17 && Cindex <= 30){ // 4 Nights Accommodation
		ShowExtraElements();
	}
}

function HideExtraElements(){
	document.getElementById("DropDownAccom").style.display = 'none';
	document.getElementById("DropDownAccom").selectedIndex = 0;
	document.getElementById("AccomPrice").innerHTML = "$0.00"; // No Extra Night so no fee for Accom
	document.getElementById("AccomRow").style.display = 'none';
	document.getElementById("ExtraAccomLabel").style.display = 'none';
}

function ShowExtraElements(){
	document.getElementById("DropDownAccom").style.display = '';
	document.getElementById("DropDownAccom").selectedIndex=0;
	document.getElementById("AccomPrice").innerHTML = "$0.00"; // No Extra Night so no fee for Accom
	document.getElementById("AccomRow").style.display = '';
	document.getElementById("ExtraAccomLabel").style.display = '';
}

function ChangeExtraCosts(Jindex){
	if (Jindex >= 1 && Jindex <= 3){
		document.getElementById("ExtraCosts").innerHTML = "$0.00";
	}else if (Jindex == 4 || Jindex == 5 || (Jindex >= 8 && Jindex <= 10) ){
		document.getElementById("ExtraCosts").innerHTML = "$65.00";
	}else if (Jindex == 6 || Jindex == 7){
		document.getElementById("ExtraCosts").innerHTML = "$36.00";
	}else if (Jindex == 11){
		document.getElementById("ExtraCosts").innerHTML = "$55.00";
	}else if (Jindex == 12 || Jindex == 25){
		document.getElementById("ExtraCosts").innerHTML = "$50.00";
	}else if (Jindex >= 13 && Jindex <= 16){
		document.getElementById("ExtraCosts").innerHTML = "$54.00";
	}else if (Jindex == 19 || Jindex == 20 || Jindex == 17 || Jindex == 23 || Jindex == 28){
		document.getElementById("ExtraCosts").innerHTML = "$59.00";
	}else if (Jindex == 21 || Jindex == 22 || Jindex == 24){
		document.getElementById("ExtraCosts").innerHTML = "$39.00";
	}else if (Jindex == 26){
		document.getElementById("ExtraCosts").innerHTML = "$70.00";
	}else if (Jindex == 18){
		document.getElementById("ExtraCosts").innerHTML = "$35.00";
	}else if (Jindex == 27){
		document.getElementById("ExtraCosts").innerHTML = "$60.00";
	}else if (Jindex >= 29 && Jindex <= 30){
		document.getElementById("ExtraCosts").innerHTML = "$49.00";
	}

	UpdatePrices();
}

function ChangePackageName(Dindex){
	if (Dindex >= 1 && Dindex <= 3){
		document.getElementById("PackageName").innerHTML = "Day Tripper";
	}else if (Dindex >= 4 && Dindex <= 5){
		document.getElementById("PackageName").innerHTML = "Party Budget";
	}else if (Dindex >= 6 && Dindex <= 7){
		document.getElementById("PackageName").innerHTML = "2 Day/1 Night Sail To The Max";
	}else if (Dindex >= 8 && Dindex <= 9){
		document.getElementById("PackageName").innerHTML = "Fun & Diving";
	}else if (Dindex >= 10 && Dindex <= 12){
		document.getElementById("PackageName").innerHTML = "THESE BOATS CURRENTLY UNAVAILBLE";
	}else if (Dindex >= 13 && Dindex <= 16){
		document.getElementById("PackageName").innerHTML = "2 Day/2 Night Sail To The Max";
	}else if (Dindex >= 17 && Dindex <= 20){
		document.getElementById("PackageName").innerHTML = "Adrenalin Oz Style";
	}else if (Dindex >= 21 && Dindex <= 22){
		document.getElementById("PackageName").innerHTML = "3 Day/2 Night Sail To The Max";
	}else if (Dindex >= 23 && Dindex <= 25){
		document.getElementById("PackageName").innerHTML = "Classic Sail";
	}else if (Dindex >= 26 && Dindex <= 28){
		document.getElementById("PackageName").innerHTML = "Reef & Island";
	}else if (Dindex >= 29 && Dindex <= 30){
		document.getElementById("PackageName").innerHTML = "Tall Ship Adventures";
	}
}

function ChangeTotalPAX(Eindex){
	if (Eindex == 25){
		document.getElementById("TotalPAX").innerHTML = "8";
	}else if (Eindex == 24){
		document.getElementById("TotalPAX").innerHTML = "12";
	}else if (Eindex == 22){
		document.getElementById("TotalPAX").innerHTML = "13";
	}else if (Eindex == 21){
		document.getElementById("TotalPAX").innerHTML = "14";
	}else if (Eindex == 19){
		document.getElementById("TotalPAX").innerHTML = "15";
	}else if (Eindex == 17){
		document.getElementById("TotalPAX").innerHTML = "18";
	}else if (Eindex == 23 || Eindex == 27){
		document.getElementById("TotalPAX").innerHTML = "21";
	}else if (Eindex == 6 || Eindex == 7){
		document.getElementById("TotalPAX").innerHTML = "22";
	}else if (Eindex == 4){
		document.getElementById("TotalPAX").innerHTML = "23";
	}else if (Eindex == 1 || Eindex == 11){
		document.getElementById("TotalPAX").innerHTML = "25";
	}else if (Eindex == 5 || Eindex == 16 || Eindex == 20){
		document.getElementById("TotalPAX").innerHTML = "26";
	}else if ((Eindex >= 12 && Eindex <= 14) || Eindex == 28){
		document.getElementById("TotalPAX").innerHTML = "28";
	}else if (Eindex == 15){
		document.getElementById("TotalPAX").innerHTML = "29";
	}else if (Eindex == 8 || Eindex == 26 || Eindex == 29 || Eindex == 30){
		document.getElementById("TotalPAX").innerHTML = "32";
	}else if (Eindex == 18){
		document.getElementById("TotalPAX").innerHTML = "33";
	}else if (Eindex == 9){
		document.getElementById("TotalPAX").innerHTML = "53";
	}else if (Eindex == 2){
		document.getElementById("TotalPAX").innerHTML = "56";
	}else if (Eindex == 10){
		document.getElementById("TotalPAX").innerHTML = "65";
	}else if (Eindex == 3){
		document.getElementById("TotalPAX").innerHTML = "80";
	}
}

function ChangeSailDuration(Findex){
	if (Findex >= 1 && Findex <= 3){
		document.getElementById("SailDuration").innerHTML = "1 Day";
	}else if (Findex == 6 || Findex == 7){
		document.getElementById("SailDuration").innerHTML = "2 Day 1 Night";
	}else if (Findex == 4 || Findex == 5 || (Findex >= 8 && Findex <= 10) || (Findex >= 13 || Findex <= 19)){
		document.getElementById("SailDuration").innerHTML = "2 Day 2 Nights";
	}else if (Findex == 11 || Findex == 12 || (Findex >= 20 && Findex <= 24)){
		document.getElementById("SailDuration").innerHTML = "3 Day 2 Nights";
	}else if (Findex >= 25 || Findex == 30){
		document.getElementById("SailDuration").innerHTML = "3 Day 3 Nights";
	}
}

function ChangeDivingOptions(Gindex){
	if ((Gindex >= 1 && Gindex <=5) || (Gindex >= 10 && Gindex <= 12) || Gindex == 26){
		document.getElementById("DivingOptions").innerHTML = "N/A";
	}else if (Gindex == 6 || Gindex == 7 || (Gindex >= 13 && Gindex <= 16) || (Gindex >= 21 && Gindex <= 25) || Gindex == 29){
		document.getElementById("DivingOptions").innerHTML = "Optional";
	}else if (Gindex == 8 || Gindex == 9 || Gindex == 17 || Gindex == 18 || Gindex == 26 || Gindex == 30){
		document.getElementById("DivingOptions").innerHTML = "On Board";
	}else if (Gindex == 27 || Gindex == 28){
		document.getElementById("DivingOptions").innerHTML = "On Board <i>+ 1 <b>Free</b> Dive</i>";
	}
}

function ChangeDepartureDays(Hindex){
	if (Hindex >= 1 && Hindex <= 3){
		document.getElementById("DepartureDays").innerHTML = "Daily";
	}else if (Hindex == 7){
		document.getElementById("DepartureDays").innerHTML = "Even Days";
	}else if (Hindex == 28 || Hindex == 30){
		document.getElementById("DepartureDays").innerHTML = "Monday, Friday";
	}else if (Hindex == 22 || Hindex == 23){
		document.getElementById("DepartureDays").innerHTML = "Monday, Thursday";
	}else if (Hindex == 4){
		document.getElementById("DepartureDays").innerHTML = "Monday, Thursday, Saturday";
	}else if (Hindex == 8 || Hindex == 10 || Hindex == 16 || Hindex == 19){
		document.getElementById("DepartureDays").innerHTML = "Monday, Wednesday, Saturday";
	}else if (Hindex == 6){
		document.getElementById("DepartureDays").innerHTML = "Odd Days";
	}else if (Hindex == 12){
		document.getElementById("DepartureDays").innerHTML = "Thursday, Sunday";
	}else if (Hindex == 11 || Hindex == 21 || Hindex == 26){
		document.getElementById("DepartureDays").innerHTML = "Tuesday, Friday";
	}else if (Hindex == 29){
		document.getElementById("DepartureDays").innerHTML = "Tuesday, Saturday";
	}else if (Hindex == 9 || Hindex == 13){
		document.getElementById("DepartureDays").innerHTML = "Tuesday, Thursday, Saturday";
	}else if (Hindex == 15 || Hindex == 18){
		document.getElementById("DepartureDays").innerHTML = "Tuesday, Thursday, Sunday";
	}else if (Hindex == 25){
		document.getElementById("DepartureDays").innerHTML = "Wednesday";
	}else if (Hindex == 5 || Hindex == 14 || Hindex == 17){
		document.getElementById("DepartureDays").innerHTML = "Wednesday, Friday, Sunday";
	}else if (Hindex == 20 || Hindex == 27){
		document.getElementById("DepartureDays").innerHTML = "Wednesday, Saturday";
	}else if (Hindex == 24){
		document.getElementById("DepartureDays").innerHTML = "Wednesday, Sunday";
	}
}

function ChangeBoatDescription(Iindex){
	if (Iindex == 1){
		document.getElementById("BoatDescription").innerHTML = "Ocean Rafting, Queensland Adventure Tourism Winner 2001.The fastest tour around the Whitsunday Islands includes exploring Whitehaven Beach, snorkelling pristine reefs and Tropical Island guided walks.";
	}else if (Iindex == 2){
		document.getElementById("BoatDescription").innerHTML = "Depending on the day of departure you will do Whitehaven Beach Picnic Adventure, covering its 5 kilometre length is soft pure white silica sand, making it unique and one of the worlds most famous beaches. The warm, tropical water is usually nothing less than crystal clear so it is a great spot to enjoy a swim. Or Blue Pearl Bay Snorkelling Adventure. A comfortable two-hour sail from the mainland, Blue Pearl Bay is the site of some of Queensland's most spectacular fringing reef. This bay is full of beautifully formed coral and teeming with thousands of colourful tropical fish.";
	}else if (Iindex == 3){
		document.getElementById("BoatDescription").innerHTML = "It\'s a full on all inclusive day on board Camira - one of the world\'s fastest sailing catamarans. That's Sailing with a capital \'S\' on a $4 million yacht! She is capable of sailing at speeds up to 30kts! There\'s plenty of room to chill with indoor and outdoor seating areas - Camira is 85ft of pure adrenalin!";
	}else if (Iindex == 4){
		document.getElementById("BoatDescription").innerHTML = "Tongarra is the FUN, multihull catamaran! If you\’re looking for a good laugh and a great crew, Tongarra is an easy way to see the Whitsunday Islands with out the airs and graces! Tongarra is famous for great snorkelling locations and extra friendly crew. It maintains large deck spaces, so of an evening pull your mattress and sleeping bag onto the deck and fall asleep under the stars.";
	}else if (Iindex == 5){
		document.getElementById("BoatDescription").innerHTML = "If you fancy a cruising sailing yacht, huge deck spaces, shaded areas, beautiful cabins, decked out with exotic timbers, a professional and friendly crew, not to mention delicious food, for a very affordable price Habibi will take you on an adventure through the Whitsunday by day and anchor in secluded coves and inlets to party under the stars at night.";
	}else if (Iindex == 6){
		document.getElementById("BoatDescription").innerHTML = "This 80ft Ocean Racing Maxi Yacht has challenged and won some of the best from Australia, New Zealand, Hawai, Hong Kong, England, & South Africa. In her claims to fame Siska\'s crew above all will introduce you to the excitement of sailing, as was also done for Prince Charles, as he joined the crew in the Queen Victoria Cup and won!";
	}else if (Iindex == 7){
		document.getElementById("BoatDescription").innerHTML = "Hammer offers an awesome sailing adventure aboard this Maxi Yacht.  See the magnificent Whitehaven Beach and snorkel the coral reefs that are teeming with marine life.";
	}else if (Iindex == 8){
		document.getElementById("BoatDescription").innerHTML = "New Horizon has beautiful features, you can see the hard work which has been put into her, and she even has a human size figurehead. She is very spacious and has a lovely wooden galley with a big half-round table for entertainment. A 97ft classic wooden schooner she offers the experience of big boat sailing at a budget price.";
	}else if (Iindex == 9){
		document.getElementById("BoatDescription").innerHTML = "The Clipper is a 111ft liveaboard sailing Yacht.  Geared toward the young adventurous traveller who want a little more for their money.  She is one of the best equiped dive boats in the. A really comfortable cruising yacht with air-conditioning throughout and a fabulous heated spa bath for 12!";
	}else if (Iindex == 10){
		document.getElementById("BoatDescription").innerHTML = "THIS BOAT IT CURRENTLY UNAVAILABLE - Pride of Airlie is a sailing catamaran that offers tropical island resort accommodation. Visit the natural beauty of the Great Barrier Reef Marine Park, South Molle Island and Whitehaven Beach with crystal clear water and white silica sand. Snorkel island fringing reef and tropical fish.";
	}else if (Iindex == 11){
		document.getElementById("BoatDescription").innerHTML = "THIS BOAT IT CURRENTLY UNAVAILABLE - The Card takes you on a Whitsunday Island Adventure you\'ll never forget. The flexible itinerary includes the jewel of the Whitsundays, magnificent Whitehaven Beach, wilderness anchorages, uninhabited beaches and the best snorkelling locations. Sail the best of the Whitsunday Islands and Coral Reefs aboard \"The Card\" a high powered around the world racing yacht";
	}else if (Iindex == 12){
		document.getElementById("BoatDescription").innerHTML = "THIS BOAT IT CURRENTLY UNAVAILABLE - Spend three unforgettable days and two magical nights cruising the Whitsunday Isalnds, with the highly expereinced crew of this race winning legend. Anaconda II has successfully completed numerous Sydney to Hobart challenges, as well as many varied blue water classic races. At 85Ft Anaconda II is the Largest Fibre Glass Maxi Yacht in the World.";
	}else if (Iindex == 13){
		document.getElementById("BoatDescription").innerHTML = "It only gets better onboard the lush, stylish and spacious British Defender! If you\’re looking to rig, navigate, sail, snorkel and sneek a few cheeky beers of an evening ......and see the Whitsunday Islands with in extreme fun then don\'t miss British Defender.";
	}else if (Iindex == 14){
		document.getElementById("BoatDescription").innerHTML = "Go for it! Want to experience the adrenalin of sailing on a fast maxi? Take a chance with Boomerang and you'll never want to come back! With this winner of the 2002 Whitsunday Fun Race, get excited, get involved, get it pumping and let the wind take you around the Whitsunday on an adventure that will blow your mind.";
	}else if (Iindex == 15){
		document.getElementById("BoatDescription").innerHTML = "Condor has won many races - Sydney to Hobart, Fastnet, Bermuda Cup, World Maxi Championship, Porto Cervo Maxi Series, Antigua Race Week and more. Built in Penryn, Cornwall, United Kingdom and now sails the Whitsunday Islands. Hoist the sails or take the wheel with plenty of opportunities to get involved while seeing the best destinations.";
	}else if (Iindex == 16){
		document.getElementById("BoatDescription").innerHTML = "Broomstick was built in South Africa for the Cape Town to Rio Race.  From there she went on to compete in many races including the famous Sydney to Hobart and now sails the Whitsunday Islands. Hoist the sails or take the wheel with plenty of opportunities to get involved while seeing the best destinations.";
	}else if (Iindex == 17){
		document.getElementById("BoatDescription").innerHTML = "Experience two super fast days and two thrilling nights on our eco accredited 18.1m Pocket Maxi Freight Train. Although this former Sydney-Hobart winner is now retired from ocean racing, you can still go for the ride of your life as you take control and trim the sails as you sail from one unbelievably gorgeous destination to another.";
	}else if (Iindex == 18){
		document.getElementById("BoatDescription").innerHTML = "At 24.9m in length she is the largest International Offshore Racing Maxi ever built. Matador was designed, developed and constructed at a cost of over US$20 million in 1991. The yacht is constructed from carbon fi bre, titanium and aluminium. Matador competed in 52 races, 8 regattas and 2 Maxi world championships and was undefeated!";
	}else if (Iindex == 19){
		document.getElementById("BoatDescription").innerHTML = "America\'s Cup defence training vessel, now transformed into an extremely comfortable charter yacht accommodating just 15 guests. Join in and hoist the sails or sit back, relax and enjoy the amazing Whitsundays";
	}else if (Iindex == 20){
		document.getElementById("BoatDescription").innerHTML = "Experience this truly unique combination of an Eco Accredited operation and Formula One multihull sailing.  Relax on the decks of this awesome 18.3m ocean racing trimaran Avatar, whilst the crew sail to some of the most amazing natural wonders the World Heritage Listed Whitsunday Islands have to offer.";
	}else if (Iindex == 21){
		document.getElementById("BoatDescription").innerHTML = "An America\'s Cup Legend! Impressed already? If you want an experienced crew, smaller groups, and light fast sailing experience with the opportunity to get involved, then Southern Cross will make your journey around the Whitsundays unforgettable";
	}else if (Iindex == 22){
		document.getElementById("BoatDescription").innerHTML = "53ft Admirals Cup Yacht, Designed by Americas Cup yacht designer, Ben Lexcen.  If you are looking for a fast sailing experience, but with a smaller group size, then Ragamuffin 2 could be just for you!";
	}else if (Iindex == 23){
		document.getElementById("BoatDescription").innerHTML = "THIS BOAT IT CURRENTLY UNAVAILABLE - As an eco accredited vessel, guests can get involved in the sailing or just sit back and enjoy the beautiful secluded bays teeming with tropical fish and coral.  Enid was built when ocean racing was dominated by beautiful timber boats designed with timeless classic lines. Launched in 1961 and restored in 2002/2003 Enid has a long history of racing, including 4 Sydney to Hobarts.";
	}else if (Iindex == 24){
		document.getElementById("BoatDescription").innerHTML = "Aboard Ron of Argyll you will see the magical Whitsunday Islands and Whitehaven Beach. There are plenty of chances to snorkel the fringing coral reefs that extend from the islands, or even get involved and help with the sailing.";
	}else if (Iindex == 25){
		document.getElementById("BoatDescription").innerHTML = "Ise Pearl is the prettiest sailing vessel in the Whitsunday without a doubt! She has sailied as a Japanese Pearl Lugger on the Coral Sea, and has now made a home for herself in the Whitsunday Islands.  Snorkel, swim, bushwalk, fish by day and sink a few glasses of wine by night on this world famous sailing vessel. Claims to fame include features in Warner Bros, \"The Tales of the Seven Seas & Flipper\".";
	}else if (Iindex == 26){
		document.getElementById("BoatDescription").innerHTML = "Anaconda III is a 101ft Luxurious Mega Yacht. See the Outer Reef and Whitsunday Islands about this Fully Equipped Dive Vessel.";
	}else if (Iindex == 27){
		document.getElementById("BoatDescription").innerHTML = "Experience the highlights of the Whitsunday Islands and Great Barrier Reef on board our eco accredited, purpose built sail/dive vessel Pacific Star. She also has a purpose built dive platform and takes 2 professional dive instructors who are keen to assist Certified as well as first time Divers in experiencing the Great Barrier Reef.";
	}else if (Iindex == 28){
		document.getElementById("BoatDescription").innerHTML = "THIS BOAT IT CURRENTLY UNAVAILABLE - Experience the best of the Whitsunday Islands and Outer Reef on board our eco accredited Spank Me, a 23.9m Maxi. Built in 1989 by Alan Bond, Spank Me was originally named \'Drumbeat\' and won the 1989 Sydney to Hobart Race. Each passenger receives a free 20 minute dive and for those who want to get involved in the sailing, our experienced crew will need the help of enthusiastic passengers to get on the grinder and pull up the main sail.";
	}else if (Iindex == 29){
		document.getElementById("BoatDescription").innerHTML = "Solway Lass is a 127ft Traditional Tallship built in 1902.  It is the Whitsunday's largest tall ship &amp; most authentic.  A real Pirate ship offering a Giant Tarzan Rope Swing!";
	}else if (Iindex == 30){
		document.getElementById("BoatDescription").innerHTML = "Visiting Whithaven Beach among many more of Whitsunday\'s most spectacular scenery you will enjoy the relaxed atmosphere of this tallship.  With Snorkelling and Glass Bottom Boat excersions you will see the amazing Fish & other Marine Life on the Coral Reefs.";
	}
}


function ChangeAccomPrice(obj){
	index=obj.selectedIndex;

	// Change Total Price For Each Individual Whitsunday Trip
	if (index == 0){ // Koala Backpackers No Extra
		document.getElementById("AccomPrice").innerHTML = "$0.00";
	}else if (index == 1){ // Magnums $9.00
		document.getElementById("AccomPrice").innerHTML = "$9.00";
	}else if (index == 2){ // Airlie Waterfront 17 Bed $21.00
		document.getElementById("AccomPrice").innerHTML = "$21.00";
	}else if (index == 3){ // Airlie Waterfront 10 Bed $30.00
		document.getElementById("AccomPrice").innerHTML = "$30.00";
	}else if (index == 4){ // Airlie Waterfront 8 Bed Female $30.00
		document.getElementById("AccomPrice").innerHTML = "$30.00";
	}

	UpdatePrices();
}

function UpdatePrices(){
	// Calculate total Price
	var packPrice = parseFloat(document.getElementById("TourPrice").innerHTML.substring(1,4));
	var accPrice = parseFloat(document.getElementById("AccomPrice").innerHTML.substring(1,5));
	var fraserExtraCosts = parseFloat(document.getElementById("FraserExtraCosts").innerHTML.substring(1,4));
	var extCosts = parseFloat(document.getElementById("ExtraCosts").innerHTML.substring(1,4));
	var totalPrice = packPrice + accPrice + fraserExtraCosts + extCosts;

	// Update Total Price
	if (parseInt((totalPrice.toString()).substring(4,5)) == 5){
		document.getElementById("TotalPrice").innerHTML = "$" + totalPrice + "0";
	}else {
		document.getElementById("TotalPrice").innerHTML = "$" + totalPrice + ".00";
	}
}

function orderPackage(){
	boatIndex = document.getElementById("DropDownBoat").selectedIndex;
	accomIndex = document.getElementById("DropDownAccom").selectedIndex + 1;
	packageIndex = 0;

	if (boatIndex >= 1 && boatIndex <= 3){
		packageIndex = 1;
		accomIndex = 0;
	}else if (boatIndex >= 4 && boatIndex <= 5){
		packageIndex = 2;
		accomIndex = 0;
	}else if (boatIndex >= 6 && boatIndex <= 7){
		packageIndex = 3;
		accomIndex = 0;
	}else if (boatIndex >= 8 && boatIndex <= 9){
		packageIndex = 4;
	}else if (boatIndex >= 10 && boatIndex <= 12){
		packageIndex = 5;
		accomIndex = 0;
	}else if (boatIndex >= 13 && boatIndex <= 16){
		packageIndex = 6;
		accomIndex = 0;
	}else if (boatIndex >= 17 && boatIndex <= 20){
		packageIndex = 7;
	}else if (boatIndex >= 21 && boatIndex <= 22){
		packageIndex = 8;
	}else if (boatIndex >= 23 && boatIndex <= 25){
		packageIndex = 9;
	}else if (boatIndex >= 26 && boatIndex <= 28){
		packageIndex = 10;
	}else if (boatIndex >= 29 && boatIndex <= 30){
		packageIndex = 11;
	}

	window.location.href = "https://secure15.myownserver.net/~herveybp/package-order.php?bID=" + boatIndex + "&aID=" + accomIndex + "&pID=" + packageIndex;
}

function enquirePackage(){
	boatIndex = document.getElementById("DropDownBoat").selectedIndex;
	accomIndex = document.getElementById("DropDownAccom").selectedIndex + 1;
	packageIndex = 0;

	if (boatIndex >= 1 && boatIndex <= 3){
		packageIndex = 1;
		accomIndex = 0;
	}else if (boatIndex >= 4 && boatIndex <= 5){
		packageIndex = 2;
		accomIndex = 0;
	}else if (boatIndex >= 6 && boatIndex <= 7){
		packageIndex = 3;
		accomIndex = 0;
	}else if (boatIndex >= 8 && boatIndex <= 9){
		packageIndex = 4;
	}else if (boatIndex >= 10 && boatIndex <= 12){
		packageIndex = 5;
		accomIndex = 0;
	}else if (boatIndex >= 13 && boatIndex <= 16){
		packageIndex = 6;
		accomIndex = 0;
	}else if (boatIndex >= 17 && boatIndex <= 20){
		packageIndex = 7;
	}else if (boatIndex >= 21 && boatIndex <= 22){
		packageIndex = 8;
	}else if (boatIndex >= 23 && boatIndex <= 25){
		packageIndex = 9;
	}else if (boatIndex >= 26 && boatIndex <= 28){
		packageIndex = 10;
	}else if (boatIndex >= 29 && boatIndex <= 30){
		packageIndex = 11;
	}

	window.location.href = "./package-contact.php?bID=" + boatIndex + "&aID=" + accomIndex + "&pID=" + packageIndex;
}