%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<% if Request.Form("Submit") <> "" then strBeachquality = Trim(Request.Form("beachquality")) strWeather = Trim(Request.Form("weather")) strEntertainment = Trim(Request.Form("entertainment")) strCulture = Trim(Request.Form("culture")) strActivities = Trim(Request.Form("activities")) strFamiliarity = Trim(Request.Form("familiarity")) strShopping = Trim(Request.Form("shopping")) strAnnualincome = Trim(Request.Form("annualincome")) strTime = Trim(Request.Form("time")) 'Use this to set the time prepared to travel n stone strTime = 5 'Percentage of income strsouthbeachpercent = 500/strAnnualincome * 100 strstivespercent = 100/strAnnualincome * 100 strbalipercent = 1000/strAnnualincome * 100 strcopacabanapercent = 900/strAnnualincome * 100 strwaikikipercent = 900/strAnnualincome * 100 strwhitesandspercent = 100/strAnnualincome * 100 strstjamespercent = 700/strAnnualincome * 100 strdahabpercent = 500/strAnnualincome * 100 strfijipercent = 1500/strAnnualincome * 100 strvaraderopercent = 800/strAnnualincome * 100 strcapetownpercent = 800/strAnnualincome * 100 stragadirpercent = 400/strAnnualincome * 100 strsttropezpercent = 300/strAnnualincome * 100 strsansebastianpercent = 400/strAnnualincome * 100 strcostasmeraldapercent = 250/strAnnualincome * 100 strboraborapercent = 2000/strAnnualincome * 100 strtuscanpercent = 450/strAnnualincome * 100 strcalapercent = 300/strAnnualincome * 100 strholkhampercent = 100/strAnnualincome * 100 strkohphiphipercent = 800/strAnnualincome * 100 'Calculations 'Koh Phi Phi strphiphicalc = (((strBeachquality*9)*(strWeather*8))+2*((strEntertainment*3)*(strCulture*7)*(strActivities*4))+SQR((strFamiliarity*6)*(strShopping*4)))/((strTime*11)+((strTime*strCulture)*strkohphiphipercent)) 'South beach strsouthbeachcalc = (((strBeachquality*6)*(strWeather*9))+2*((strEntertainment*10)*(strCulture*8)*(strActivities*10))+SQR((strFamiliarity*10)*(strShopping*8)))/((strTime*9)+((strTime*strCulture)*strsouthbeachpercent)) 'St Ives strstivescalc = (((strBeachquality*9)*(strWeather*7))+2*((strEntertainment*6)*(strCulture*7)*(strActivities*4))+SQR((strFamiliarity*7)*(strShopping*9)))/((strTime*5)+((strTime*strCulture)*strstivespercent)) 'Sanur, Bali strbalicalc = (((strBeachquality*7)*(strWeather*7))+2*((strEntertainment*5)*(strCulture*8)*(strActivities*7))+SQR((strFamiliarity*8)*(strShopping*7)))/((strTime*17)+((strTime*strCulture)*strbalipercent)) 'Copacabana strcopacabanacalc = (((strBeachquality*5)*(strWeather*5))+2*((strEntertainment*10)*(strCulture*5)*(strActivities*3))+SQR((strFamiliarity*9)*(strShopping*4)))/((strTime*10)+((strTime*strCulture)*strcopacabanapercent)) 'Waikiki strwaikikicalc = (((strBeachquality*6)*(strWeather*8))+2*((strEntertainment*8)*(strCulture*7)*(strActivities*9))+SQR((strFamiliarity*9)*(strShopping*10)))/((strTime*12)+((strTime*strCulture)*strwaikikipercent)) 'Whitesands strwhitesandscalc = (((strBeachquality*8)*(strWeather*5))+2*((strEntertainment*2)*(strCulture*7)*(strActivities*6))+SQR((strFamiliarity*7)*(strShopping*0)))/((strTime*5)+((strTime*strCulture)*strwhitesandspercent)) 'St James strstjamescalc = (((strBeachquality*9)*(strWeather*9))+2*((strEntertainment*2)*(strCulture*2)*(strActivities*6))+SQR((strFamiliarity*7)*(strShopping*2)))/((strTime*10)+((strTime*strCulture)*strstjamespercent)) 'Dahab strdahabcalc = (((strBeachquality*5)*(strWeather*9))+2*((strEntertainment*8)*(strCulture*9)*(strActivities*10))+SQR((strFamiliarity*9)*(strShopping*8)))/((strTime*5)+((strTime*strCulture)*strdahabpercent)) 'Beach Fiji strfijicalc = (((strBeachquality*9)*(strWeather*9))+2*((strEntertainment*0)*(strCulture*0)*(strActivities*7))+SQR((strFamiliarity*9)*(strShopping*0)))/((strTime*22)+((strTime*strCulture)*strfijipercent)) 'Varadero strvaraderocalc = (((strBeachquality*9)*(strWeather*9))+2*((strEntertainment*0)*(strCulture*7)*(strActivities*6))+SQR((strFamiliarity*6)*(strShopping*0)))/((strTime*10)+((strTime*strCulture)*strvaraderopercent)) 'Camps Bay, Cape Town strcampsbaycalc = (((strBeachquality*7)*(strWeather*8))+2*((strEntertainment*6)*(strCulture*5)*(strActivities*5))+SQR((strFamiliarity*7)*(strShopping*1)))/((strTime*12)+((strTime*strCulture)*strcapetownpercent)) 'Agadir stragadircalc = (((strBeachquality*7)*(strWeather*9))+2*((strEntertainment*4)*(strCulture*8)*(strActivities*6))+SQR((strFamiliarity*4)*(strShopping*7)))/((strTime*3.5)+((strTime*strCulture)*stragadirpercent)) 'St Tropez strsttropezcalc = (((strBeachquality*8)*(strWeather*8))+2*((strEntertainment*5)*(strCulture*2)*(strActivities*7))+SQR((strFamiliarity*6)*(strShopping*8)))/((strTime*2)+((strTime*strCulture)*strsttropezpercent)) 'San Sebastian strsansebastiancalc = (((strBeachquality*9)*(strWeather*9))+2*((strEntertainment*5)*(strCulture*6)*(strActivities*0))+SQR((strFamiliarity*7)*(strShopping*7)))/((strTime*2)+((strTime*strCulture)*strsansebastianpercent)) 'Costa Smeralda strcostasmeraldacalc = (((strBeachquality*7)*(strWeather*10))+2*((strEntertainment*10)*(strCulture*8)*(strActivities*3))+SQR((strFamiliarity*4)*(strShopping*9)))/((strTime*2.5)+((strTime*strCulture)*strcostasmeraldapercent)) 'Bora Bora strboraboracalc = (((strBeachquality*8)*(strWeather*9))+2*((strEntertainment*5)*(strCulture*4)*(strActivities*4))+SQR((strFamiliarity*9)*(strShopping*2)))/((strTime*20)+((strTime*strCulture)*strboraborapercent)) 'Tuscan Riviera, Italy strtuscanscalc = (((strBeachquality*8)*(strWeather*8))+2*((strEntertainment*4)*(strCulture*6)*(strActivities*5))+SQR((strFamiliarity*5)*(strShopping*5)))/((strTime*3)+((strTime*strCulture)*strtuscanpercent)) 'Cala strcalacalc = (((strBeachquality*7)*(strWeather*7))+2*((strEntertainment*7)*(strCulture*6)*(strActivities*6))+SQR((strFamiliarity*5)*(strShopping*4)))/((strTime*3)+((strTime*strCulture)*strcalapercent)) 'Holkham, Norfolk strholkhamcalc = (((strBeachquality*9)*(strWeather*7))+2*((strEntertainment*2)*(strCulture*2)*(strActivities*4))+SQR((strFamiliarity*6)*(strShopping*0)))/((strTime*3)+((strTime*strCulture)*strholkhampercent)) End if 'Start of ordering code Sub ObjSorter( byRef arrArray ) Dim row, k Dim objStartingKey, objSmallestKey Dim ValueToCompare Dim swap_pos For row = 0 To UBound( arrArray ) - 1 'Start OUTER loop. 'Take a snapshot of the first element 'in the array because if there is a 'smaller value elsewhere in the array 'we'll need to do a swap. Set objStartingKey = arrArray (row) Set objSmallestKey = arrArray (row) swap_pos = row For k = row + 1 to UBound( arrArray ) ' Start INNER loop. ' Call the objects Compare method of the current ' objSmallestKey object. Pass in the object that we are ' comparing against. ValueToCompare = objSmallestKey.Compare( arrArray(k) ) ' If 1 was returned then the value in arrArray(k) ' was smaller, so we do a swap. If ValueToCompare = 1 Then ' This is now the lowest number - ' remember it's position. swap_pos = k Set objSmallestKey = arrArray ( k ) End If Next If swap_pos <> row Then ' If we get here then we are about to do a swap ' within the array. Set arrArray ( swap_pos ) = objStartingKey Set arrArray ( row ) = objSmallestKey End If Set objStartingKey = Nothing Set objSmallestKey = Nothing Next End Sub 'create class and instances of class Class Perfectholiday Public Result Public Image 'This will be an absolute URL to an image of the beach Public Title 'will show the title of the beach example - South Beach Public From 'shows the from line Public Airport 'will show the Airport Public Description 'will show a short description of the beaches Public URL 'Will hopefully hold the url of the price Public Price 'will show the flight price Public Function Compare (objOther) ' Default Compare for the Class is to sort by Name Compare = strComp( me.Result, objOther.Result, vbTextCompare ) End Function End Class 'Koh Phi Phi Set aaPerfectholiday = New Perfectholiday aaPerfectholiday.Result = strphiphicalc aaPerfectholiday.Image = "images/kohphiphi.gif" aaPerfectholiday.Title = "Koh Phi Phi" aaPerfectholiday.From = "Fly to Bangkok from" aaPerfectholiday.Airport = "Airport" aaPerfectholiday.Description = "Its inspiring beauty ensures Phi Phi's legendary status as one of Thailand's favourite retreats" aaPerfectholiday.URL = "http://www.opodo.co.uk/otpbvpl/Jsp/affiliate/AffiliateLanding.jsp?ParamSet=1&Prepop=Y&A_City=Bangkok" aaPerfectholiday.Price = "£394" 'South Beach Set aPerfectholiday = New Perfectholiday aPerfectholiday.Result = strsouthbeachcalc aPerfectholiday.Image = "images/southbeach.gif" aPerfectholiday.Title = "South Beach" aPerfectholiday.From = "Fly to Miami from" aPerfectholiday.Airport = "Airport" aPerfectholiday.Description = "Indulge in a bit of celebrity spotting beachside before experiencing the night delights " aPerfectholiday.URL = "http://www.opodo.co.uk/otpbvpl/Jsp/affiliate/AffiliateLanding.jsp?ParamSet=1&Prepop=Y&A_City=Miami" aPerfectholiday.Price = "£325" 'St Ives Set bPerfectholiday = New Perfectholiday bPerfectholiday.Result = strstivescalc bPerfectholiday.Image = "images/stives.gif" bPerfectholiday.Title = "St Ives" bPerfectholiday.From = "Car rental per day from" bPerfectholiday.Airport = "Airport" bPerfectholiday.Description = "This historic Cornish gem offers world-class beaches and an art scene to match" bPerfectholiday.URL = "http://www.opodo.co.uk/otpbvpl/Jsp/opodo/StrutsServlet/EditCarSOSearch?offerId=ZE_1121700582831" bPerfectholiday.Price = "£19" 'Bali Set cPerfectholiday = New Perfectholiday cPerfectholiday.Result = strbalicalc cPerfectholiday.Image = "images/bali.gif" cPerfectholiday.Title = "Sanur Bali" cPerfectholiday.From = "Fly to Bali from" cPerfectholiday.Airport = "Airport" cPerfectholiday.Description = "An Asian snapshot of enticing white sands and rolling surf, flanked by elegant palms and temples" cPerfectholiday.URL = "http://www.opodo.co.uk/otpbvpl/Jsp/affiliate/AffiliateLanding.jsp?ParamSet=1&Prepop=Y&A_City=Denpasar" cPerfectholiday.Price = "£521" 'Copacabana Set dPerfectholiday = New Perfectholiday dPerfectholiday.Result = strcopacabanacalc dPerfectholiday.Image = "images/copacabana.gif" dPerfectholiday.Title = "Copacabana" dPerfectholiday.From = "Fly to Rio de Janeiro from" dPerfectholiday.Airport = "Airport" dPerfectholiday.Description = "A statement in fashion, Copacabana is one of the world's foremost beach experiences" dPerfectholiday.URL = "http://www.opodo.co.uk/otpbvpl/Jsp/affiliate/AffiliateLanding.jsp?ParamSet=1&Prepop=Y&A_City=Rio de Janeiro" dPerfectholiday.Price = "£460" 'Waikiki Set ePerfectholiday = New Perfectholiday ePerfectholiday.Result = strwaikikicalc ePerfectholiday.Image = "images/waikiki.gif" ePerfectholiday.Title = "Waikiki" ePerfectholiday.From = "Fly to Honolulu from" ePerfectholiday.Airport = "Airport" ePerfectholiday.Description = "Once a retreat for Hawaiian royalty, Waikiki is a buzzing Mecca for sun-lovers" ePerfectholiday.URL = "http://www.opodo.co.uk/otpbvpl/Jsp/affiliate/AffiliateLanding.jsp?ParamSet=1&Prepop=Y&A_City=HonoLulu" ePerfectholiday.Price = "£569" 'Whitesands Set fPerfectholiday = New Perfectholiday fPerfectholiday.Result = strwhitesandscalc fPerfectholiday.Image = "images/whitesands.gif" fPerfectholiday.Title = "Whitesands" fPerfectholiday.From = "Car rental per day from" fPerfectholiday.Airport = "Airport" fPerfectholiday.Description = "Idyllic holiday cottages, Welsh hospitality and a surf break to rival the best - all on your doorstep" fPerfectholiday.URL = "http://www.opodo.co.uk/otpbvpl/Jsp/opodo/StrutsServlet/EditCarSOSearch?offerId=ZE_1121700582831" fPerfectholiday.Price = "£19" 'St James Set gPerfectholiday = New Perfectholiday gPerfectholiday.Result = strstjamescalc gPerfectholiday.Image = "images/barbados.gif" gPerfectholiday.Title = "St James" gPerfectholiday.From = "Fly to Barbados from" gPerfectholiday.Airport = "Airport" gPerfectholiday.Description = "If you fancy a Caribbean caper then look no further than St James, the archetype Barbados beach" gPerfectholiday.URL = "http://www.opodo.co.uk/otpbvpl/Jsp/affiliate/AffiliateLanding.jsp?ParamSet=1&Prepop=Y&A_City=Barbados" gPerfectholiday.Price = "£458" 'Dahab Set hPerfectholiday = New Perfectholiday hPerfectholiday.Result = strDahabcalc hPerfectholiday.Image = "images/dahab.gif" hPerfectholiday.Title = "Dahab" hPerfectholiday.From = "Fly to Sharm el Sheik from" hPerfectholiday.Airport = "Airport" hPerfectholiday.Description = "Once you've experienced this Red Sea resort you'll understand why its Arabic name means 'Gold'" hPerfectholiday.URL = "http://www.avro.co.uk/index.htm?domain=opodo&" hPerfectholiday.Price = "£269" 'Beach Fiji Set iPerfectholiday = New Perfectholiday iPerfectholiday.Result = strfijicalc iPerfectholiday.Image = "images/fiji.gif" iPerfectholiday.Title = "Fiji" iPerfectholiday.From = "Fly to Nadi from" iPerfectholiday.Airport = "Airport" iPerfectholiday.Description = "Natadola provides South Pacific hospitality, tranquillity and some of the finest snorkelling anywhere" iPerfectholiday.URL = "http://www.opodo.co.uk/otpbvpl/Jsp/affiliate/AffiliateLanding.jsp?ParamSet=1&Prepop=Y&A_City=Nadi" iPerfectholiday.Price = "£674" 'Varadero Set jPerfectholiday = New Perfectholiday jPerfectholiday.Result = strvaraderocalc jPerfectholiday.Image = "images/varadero.gif" jPerfectholiday.Title = "Varadero" jPerfectholiday.From = "Fly to Havana from" jPerfectholiday.Airport = "Airport" jPerfectholiday.Description = "Rumba in Havana then head west to the Varadero, Cuba's premier beach experience" jPerfectholiday.URL = "http://www.opodo.co.uk/otpbvpl/Jsp/affiliate/AffiliateLanding.jsp?ParamSet=1&Prepop=Y&A_City=Havana" jPerfectholiday.Price = "£398" 'Camps Bay, Cape Town Set kPerfectholiday = New Perfectholiday kPerfectholiday.Result = strcampsbaycalc kPerfectholiday.Image = "images/campsbay.gif" kPerfectholiday.Title = "Camps Bay" kPerfectholiday.From = "Fly to Cape Town from" kPerfectholiday.Airport = "Airport" kPerfectholiday.Description = "Spectacular, vibrant and diverse, Cape Town has everything to complete your beach holiday" kPerfectholiday.URL = "http://www.opodo.co.uk/otpbvpl/Jsp/affiliate/AffiliateLanding.jsp?ParamSet=1&Prepop=Y&A_City=Cape Town" kPerfectholiday.Price = "£414" 'Agadir Set lPerfectholiday = New Perfectholiday lPerfectholiday.Result = stragadircalc lPerfectholiday.Image = "images/agadir.gif" lPerfectholiday.Title = "Agadir" lPerfectholiday.From = "Fly to Morocco from" lPerfectholiday.Airport = "Airport" lPerfectholiday.Description = "Once you've prised yourself from the sea and sand, make an excursion to some inland highlights" lPerfectholiday.URL = "http://www.opodo.co.uk/otpbvpl/Jsp/affiliate/AffiliateLanding.jsp?ParamSet=1&Prepop=Y&A_City=Agadir" lPerfectholiday.Price = "£280" 'St Tropez Set mPerfectholiday = New Perfectholiday mPerfectholiday.Result = strsttropezcalc mPerfectholiday.Image = "images/sttropez.gif" mPerfectholiday.Title = "St Tropez" mPerfectholiday.From = "Fly to Nice from" mPerfectholiday.Airport = "Airport" mPerfectholiday.Description = "Rustic charm coupled with superb entertainment makes this French jewel a playground for all" mPerfectholiday.URL = "http://www.opodo.co.uk/otpbvpl/Jsp/affiliate/AffiliateLanding.jsp?ParamSet=1&Prepop=Y&A_City=Nice" mPerfectholiday.Price = "£78" 'San Sebastian Set nPerfectholiday = New Perfectholiday nPerfectholiday.Result = strsansebastiancalc nPerfectholiday.Image = "images/sansebastian.gif" nPerfectholiday.Title = "San Sebastian" nPerfectholiday.From = "Fly to San Sebastian from" nPerfectholiday.Airport = "Airport" nPerfectholiday.Description = "San Sebastian's beaches provide a focal point to relax after you've explored the highlights of Basque" nPerfectholiday.URL = "http://www.opodo.co.uk/otpbvpl/Jsp/affiliate/AffiliateLanding.jsp?ParamSet=1&Prepop=Y&A_City=Bilbao" nPerfectholiday.Price = "£100" 'Costa Smeralda Set oPerfectholiday = New Perfectholiday oPerfectholiday.Result = strcostasmeraldacalc oPerfectholiday.Image = "images/costa.gif" oPerfectholiday.Title = "Costa Smeralda" oPerfectholiday.From = "Fly to Olbia from" oPerfectholiday.Airport = "Airport" oPerfectholiday.Description = "From medieval ramparts to the clear waters of the Med. Experience this Sardinian classic" oPerfectholiday.URL = "http://www.opodo.co.uk/otpbvpl/Jsp/affiliate/AffiliateLanding.jsp?ParamSet=1&Prepop=Y&A_City=Olbia" oPerfectholiday.Price = "£319" 'Bora Bora Set pPerfectholiday = New Perfectholiday pPerfectholiday.Result = strboraboracalc pPerfectholiday.Image = "images/borabora.gif" pPerfectholiday.Title = "Bora Bora" pPerfectholiday.From = "Fly to Papeete from" pPerfectholiday.Airport = "Airport" pPerfectholiday.Description = "A dazzling Pacific paradise, combining tropical island sun and sand with rich Polynesian culture" pPerfectholiday.URL = "http://www.opodo.co.uk/otpbvpl/Jsp/affiliate/AffiliateLanding.jsp?ParamSet=1&Prepop=Y&A_City=Papeete" pPerfectholiday.Price = "£671" 'Tuscan Riviera, Italy Set qPerfectholiday = New Perfectholiday qPerfectholiday.Result = strtuscanscalc qPerfectholiday.Image = "images/tuscan.gif" qPerfectholiday.Title = "Tuscan Riviera" qPerfectholiday.From = "Fly to Pisa from" qPerfectholiday.Airport = "Airport" qPerfectholiday.Description = "Long golden sand beaches set against the backdrop of the Apuan Alps" qPerfectholiday.URL = "http://www.opodo.co.uk/otpbvpl/Jsp/affiliate/AffiliateLanding.jsp?ParamSet=1&Prepop=Y&A_City=Pisa" qPerfectholiday.Price = "£98" 'Cala D'or Set rPerfectholiday = New Perfectholiday rPerfectholiday.Result = strcalacalc rPerfectholiday.Image = "images/cala.gif" rPerfectholiday.Title = "Cala D'or" rPerfectholiday.From = "Fly to Mallorca from" rPerfectholiday.Airport = "Airport" rPerfectholiday.Description = "If you're looking for a relaxing Spanish beach escape, there's no better spot than Cala d'Or" rPerfectholiday.URL = "http://www.opodo.co.uk/otpbvpl/Jsp/affiliate/AffiliateLanding.jsp?ParamSet=1&Prepop=Y&A_City=Mallorca" rPerfectholiday.Price = "£69" 'Holkham, Norfolk Set sPerfectholiday = New Perfectholiday sPerfectholiday.Result = strholkhamcalc sPerfectholiday.Image = "images/holkham.gif" sPerfectholiday.Title = "Holkham" sPerfectholiday.From = "Car rental per day from" sPerfectholiday.Airport = "Airport" sPerfectholiday.Description = "Appreciate the superb ecological diversity rising with the sand dunes on this vast Norfolk beach" sPerfectholiday.URL = "http://www.opodo.co.uk/otpbvpl/Jsp/opodo/StrutsServlet/EditCarSOSearch?offerId=ZE_1121700582831" sPerfectholiday.Price = "£19" arrArray = Array(aPerfectholiday, bPerfectholiday, cPerfectholiday, dPerfectholiday, ePerfectholiday, fPerfectholiday, gPerfectholiday, hPerfectholiday, iPerfectholiday, jPerfectholiday, kPerfectholiday, lPerfectholiday, mPerfectholiday, nPerfectholiday, oPerfectholiday, pPerfectholiday, qPerfectholiday, rPerfectholiday, sPerfectholiday, aaPerfectholiday) call ObjSorter( arrArray ) %>![]() |
||
![]() |
It's official Science has determined the world's best beach holiday destinations. After months of painstaking research, Opodo and Dr Dimitrios Buhalis of the University of Surrey have made the breakthrough that generations of sun worshippers have been waiting for. If it takes a little more than structurally unsound sandcastles and soggy chips to make your perfect beach break, you'll value this formula. The formula has been applied to 250 leading beach destinations throughout the world. The top results are displayed below. Give it a go - use the formula to work out the best beaches for you... |
|