/* author: Dominik Cabos */
/* Creation date: 2004-01-15 */

/* Modified: Halina Jasklowska */

// dist - string began with 1 (for 'all' category). 1 indicates hotel should be displayed during listing suitable category, 0 - no display

function hotel(dist, cat, fit, bus, price, instant, cur, dir, name, town)
{
	this.dist = dist;
	this.cat = cat;
	this.fit = fit;
	this.bus = bus;
	this.price = price;
	this.instant = instant;
	this.cur = cur;
	this.dir = dir;
	this.name = name;
	this.town = town;
}

i=0;
hotels = new Array();

hotels[i++] = new hotel	('10000000010000000000000000000000', 5,1,0,210,0, 'EUR', '/DorintGolfresort&Spa','Dorint Sofitel Royal Golfresort & Spa','Camp de Mar');
hotels[i++] = new hotel	('10000000000000000000010000000000', 5,1,0,315,0, 'EUR', '/CastilloSonVida','Castillo Son Vida', '	Palma de Mallorca');
hotels[i++] = new hotel	('10000000000000000000010000000000', 5,1,0,20,0, 'EUR', '/MeliadeMar','Melia de Mar', '	Palma de Mallorca');
hotels[i++] = new hotel	('10000000000000000000010000000000', 5,1,0,205,0, 'EUR', '/ValparaisoPalace','Valparaiso Palace	', '	Palma de Mallorca');
hotels[i++] = new hotel	('10000000000000000000000100000000', 5,1,0,95,0, 'EUR', '/HesperiaVillamil','Hesperia Villamil','Peguera');
hotels[i++] = new hotel	('10000000000000000000000010000000', 5,1,1,72,0, 'EUR', '/PalacedeMuro','Palace de Muro	','Platja de Muro');
hotels[i++] = new hotel	('10000000000000000000000000100000', 5,1,0,59,0, 'EUR', '/Alcudiamar','Alcudiamar ','Port d`Alcudia');
hotels[i++] = new hotel	('10000000000000000000000000010000', 5,1,0,163,0, 'EUR', '/Formentor','Formentor ','Port de Pollensa');
hotels[i++] = new hotel	('10100000000000000000000000000000', 4,1,0,61,0, 'EUR', '/MeliaCaladOr','Melia Cala d`Or ','Cala d`Or');
hotels[i++] = new hotel	('10100000000000000000000000000000', 4,1,0,92,0, 'EUR', '/RiuCalaEsmeralda','Riu Cala Esmeralda ','Cala d`Or');
hotels[i++] = new hotel	('10010000000000000000000000000000', 4,1,0,47,0, 'EUR', '/RIUPlayaCalaMillor','RIU Playa Cala Millor','Cala Millor');
hotels[i++] = new hotel	('10010000000000000000000000000000', 4,1,0,62,0, 'EUR', '/Sumba','Sumba','Cala Millor');
hotels[i++] = new hotel	('10010000000000000000000000000000', 4,1,0,62,0, 'EUR', '/Borneo','Borneo','Cala Millor');
hotels[i++] = new hotel	('10001000000000000000000000000000', 4,1,0,40,0, 'EUR', '/BellaPlaya','Bella Playa','Cala Rajada');
hotels[i++] = new hotel	('10000100000000000000000000000000', 4,1,0,101,0, 'EUR', '/Molins','Molins','Cala Sant Vicenc');
hotels[i++] = new hotel	('10000000100000000000000000000000', 4,1,0,60,0, 'EUR', '/BarceloAlbatros','Barcelo Albatros','Calvia');
hotels[i++] = new hotel	('10000000010000000000000000000000', 4,1,0,70,0, 'EUR', '/RiuCampdeMar','Riu Camp de Mar','Camp de Mar');
hotels[i++] = new hotel	('10000000000001000000000000000000', 4,1,0,138,0, 'EUR', '/EurotelGolfPUNTAROTJA','Eurotel Golf PUNTA ROTJA','Costa de los Pinos');
hotels[i++] = new hotel	('10000000000000100000000000000000', 4,1,0,159,0, 'EUR', '/EsMoli','Es Moli','Deya');
hotels[i++] = new hotel	('10000000000000001000000000000000', 4,1,0,140,0, 'EUR', '/BonSol','Bon Sol','Illetas');
hotels[i++] = new hotel	('10000000000000001000000000000000', 4,1,0,50,0, 'EUR', '/RiuBonanzaPark','Riu Bonanza Park','Illetas');
hotels[i++] = new hotel	('10000000000000001000000000000000', 4,1,0,94,0, 'EUR', '/RiuPalaceBonanzaPlaya','Riu Palace Bonanza Playa','Illetas');
hotels[i++] = new hotel	('10000000000000000010000000000000', 4,0,0,98,0, 'EUR', '/PetitCasComte ','<font>		Petit Ca s Comte	</font>','Lloseta	 ');
hotels[i++] = new hotel	('10000000000000000001000000000000', 4,1,0,47,0, 'EUR', '/Maioris','Maioris','Llucmajor');
hotels[i++] = new hotel	('10000000000000000000100000000000', 4,1,0,61,0, 'EUR', '/SolAntillasBarbados','Sol Antillas Barbados','Magalluf	 ');
// hotels[i++] = new hotel	('10000000000000000000000100000000', 4,1,0,35,1, 'EUR', '/smsolivera','<font>	Saint Michel 	S´Olivera	</font>','Peguera');
// hotels[i++] = new hotel	('10000000000000000000000100000000', 4,1,0,46,1, 'EUR', '/smmadrigal ','<font>	Saint Michel 	Madrigal 	</font>','Peguera');
// hotels[i++] = new hotel	('10000000000000000000000001000000', 4,1,0,40,1, 'EUR', '/smgoldenplaya','<font>	Saint Michel 	Golden Playa	</font>','Playa de Palma	 ');
hotels[i++] = new hotel	('10000000000000000000010000000000', 4,0,1,81,1, 'EUR', '/ACCiutatdePalma ','<font>		AC Ciutat de Palma	</font>','Palma de Mallorca');
hotels[i++] = new hotel	('10000000000000000000010000000000', 4,1,1,90,1, 'EUR', '/Armadams','<font>Armadams</font>','Palma de Mallorca');
hotels[i++] = new hotel	('10000000000000000000010000000000', 4,1,0,336,0, 'EUR', '/GranMeliaVictoria','Gran Melia Victoria','Palma de Mallorca');
hotels[i++] = new hotel	('10000000000000000000010000000000', 4,1,0,70,0, 'EUR', '/HesperiaCiutatdeMallorca','Hesperia Ciutat de Mallorca','Palma de Mallorca');
hotels[i++] = new hotel	('10000000000000000000010000000000', 4,1,1,81,0, 'EUR', '/MeliaPalasAtenea','Melia Palas Atenea','Palma de Mallorca');
hotels[i++] = new hotel	('10000000000000000000010000000000', 4,1,0,73,1, 'EUR', '/Mirador','<font>Mirador</font>','Palma de Mallorca');
hotels[i++] = new hotel	('10000000000000000000010000000000', 4,1,1,150,0, 'EUR', '/NixePalace','Nixe Palace','Palma de Mallorca');
hotels[i++] = new hotel	('10000000000000000000010000000000', 4,1,0,88,0, 'EUR', '/PlayaCalaMayor','Playa Cala Mayor','Palma de Mallorca');
hotels[i++] = new hotel	('10000000000000000000010000000000', 4,1,1,205,0, 'EUR', '/TrypBellver','Tryp Bellver','Palma de Mallorca');
hotels[i++] = new hotel	('10000000000000000000001000000000', 4,1,0,54,0, 'EUR', '/SolCalaBlanca','Sol Cala Blanca','Palma Nova');
hotels[i++] = new hotel	('10000000000000000000001000000000', 4,1,1,64,0, 'EUR', '/SonCaliu','Son Caliu','Palma Nova');
hotels[i++] = new hotel	('10000000000000000000000100000000', 4,1,0,145,0, 'EUR', '/CalaFornells','Cala Fornells','Peguera');
hotels[i++] = new hotel	('10000000000000000000000100000000', 4,1,0,70,0, 'EUR', '/PalmiraBeach','Palmira Beach','Peguera');
hotels[i++] = new hotel	('10000000000000000000000100000000', 4,1,0,65,0, 'EUR', '/GranSunnaPark','Gran Sunna Park','Peguera');
hotels[i++] = new hotel	('10000000000000000000000100000000', 4,1,0,128,0, 'EUR', '/Galatzo','Galatzo','Peguera');
hotels[i++] = new hotel	('10000000000000000000000010000000', 4,1,0,129,0, 'EUR', '/EsperanzaPark','Esperanza Park','Platja de Muro');
hotels[i++] = new hotel	('10000000000000000000000001000000', 4,1,0,39,0, 'EUR', '/BarceloFlamingo','Barcelo Flamingo','Playa de Palma');
hotels[i++] = new hotel	('10000000000000000000000001000000', 4,1,0,55,0, 'EUR', '/RiuBravo','Riu Bravo','Playa de Palma');
hotels[i++] = new hotel	('10000000000000000000000001000000', 4,1,0,51,0, 'EUR', '/RiuFestival','Riu Festival','Playa de Palma');
hotels[i++] = new hotel	('10000000000000000000000001000000', 4,1,0,53,0, 'EUR', '/RiuSanFrancisco','Riu San Francisco','Playa de Palma');
hotels[i++] = new hotel	('10000000000000000000000001000000', 4,1,0,84,0, 'EUR', '/TaurusPark','Taurus Park','Playa de Palma');
hotels[i++] = new hotel	('10000000000000000000000000010000', 4,1,0,49,0, 'EUR', '/IllaDor','Illa Dor','Port de Pollensa');
hotels[i++] = new hotel	('10000000000000000000000000010000', 4,1,0,60,1, 'EUR', '/ApartDuva','<font>ApartDuva</font>','Port de Pollensa');
hotels[i++] = new hotel	('10000000000000000000000000001000', 4,1,0,87,0, 'EUR', '/OfraResortMallorca','Ofra Resort Mallorca','Portals Nous');
hotels[i++] = new hotel	('10000000000000000000000000000100', 4,1,0,56,0, 'EUR', '/ElVistamar','El Vistamar','Porto Colom');
hotels[i++] = new hotel	('10000000000000000000000000000010', 4,1,0,63,0, 'EUR', '/SaComaPlaya','Sa Coma Playa','Sa Coma');
hotels[i++] = new hotel	('10000000000000000000000000000001', 4,1,0,78,0, 'EUR', '/BahiadelSol','Bahia del Sol','Santa Ponsa	 ');
hotels[i++] = new hotel	('10100000000000000000000000000000', 3,1,0,63,0, 'EUR', '/MarinaSkorpios ','<font>		Marina Skorpios 	</font>','Cala d`Or');
hotels[i++] = new hotel	('10100000000000000000000000000000', 3,1,0,63,0, 'EUR', '/MarinaCorfu ','<font>		Marina Corfu 	</font>','Cala d`Or');
hotels[i++] = new hotel	('10100000000000000000000000000000', 3,1,0,31,0, 'EUR', '/BarceloPonentPlaya','Barcelo Ponent Playa','Cala d`Or');
hotels[i++] = new hotel	('10010000000000000000000000000000', 3,1,0,42,1, 'EUR', '/Morito ','<font>		Morito	</font>','Cala Millor');
hotels[i++] = new hotel	('10010000000000000000000000000000', 3,1,0,25,0, 'EUR', '/aptosanbaromani ','<font>		Hotel-Apartamentos An Ba Romani	</font>','Cala Millor');
hotels[i++] = new hotel	('10010000000000000000000000000000', 3,1,0,40,0, 'EUR', '/Voramar','Voramar','Cala Millor');
// hotels[i++] = new hotel	('11000000000000000000000000000000', 3,1,0,48,1, 'EUR', '/smpresident','<font>	Saint Michel 	President	</font>','Alcudia	 ');
// hotels[i++] = new hotel	('10001000000000000000000000000000', 3,1,0,45,1, 'EUR', '/smregana ','<font>	Saint Michel 	Regana 	</font>','Cala Rajada');
// hotels[i++] = new hotel	('10000001000000000000000000000000', 3,1,0,48,1, 'EUR', '/smcanariospark','<font>	Saint Michel 	Canarios Park	</font>','Calas de Mallorca');
// hotels[i++] = new hotel	('10000001000000000000000000000000', 3,1,0,62,1, 'EUR', '/smaptoscalaspark','<font>	Saint Michel 	Apartments Calas Park	</font>','Calas de Mallorca');
// hotels[i++] = new hotel	('10000000000000010000000000000000', 3,1,0,28,1, 'EUR', '/smreinadelmar','<font>	Saint Michel 	Reina Del Mar	</font>','El Arenal');
// hotels[i++] = new hotel	('10000000000000000000100000000000', 3,1,0,30,1, 'EUR', '/smdonjuan','<font>	Saint Michel 	Don Juan	</font>','Magaluf');
// hotels[i++] = new hotel	('10000000000000000000000100000000', 3,1,0,34,1, 'EUR', '/smlindaplaya','<font>	Saint Michel 	Linda Playa	</font>','Peguera');
// hotels[i++] = new hotel	('10000000000000000000000010000000', 3,1,0,23,1, 'EUR', '/smaptoslagopark','<font>	Saint Michel 	Apartments Lago Park I – II	</font>','Playa de Muro');
// hotels[i++] = new hotel	('10000000000000000000000001000000', 3,1,0,41,1, 'EUR', '/smvenusplaya','<font>	Saint Michel 	Venus Playa	</font>','Playa de Palma');
// hotels[i++] = new hotel	('10000000000000000000000001000000', 3,1,0,23,1, 'EUR', '/smalejandria','<font>	Saint Michel 	Alejandria	</font>','Playa de Palma');
hotels[i++] = new hotel	('10000100000000000000000000000000', 3,1,0,52,0, 'EUR', '/DonPedro','Don Pedro','Cala Sant Vicenc');
hotels[i++] = new hotel	('10000010000000000000000000000000', 3,1,0,37,0, 'EUR', '/BarceloCalaVinas','Barcelo Cala Vinas','Cala Vinas');
hotels[i++] = new hotel	('10000001000000000000000000000000', 3,1,0,39,0, 'EUR', '/SolBalmoral','Sol Balmoral','Calas de Mallorca');
hotels[i++] = new hotel	('10000001000000000000000000000000', 3,1,0,67,0, 'EUR', '/SolMastines','Sol Mastines','Calas de Mallorca');
hotels[i++] = new hotel	('10000001000000000000000000000000', 3,1,0,94,0, 'EUR', '/RiuTropicana','Riu Tropicana','Calas de Mallorca');
hotels[i++] = new hotel	('10000000001000000000000000000000', 3,1,0,90,0, 'EUR', '/SantaFe','Santa Fe','Can Picafort');
hotels[i++] = new hotel	('10000000001000000000000000000000', 3,1,0,48,0, 'EUR', '/VistaPark','Vista Park','Can Picafort');
hotels[i++] = new hotel	('10000000000100000000000000000000', 3,1,0,47,1, 'EUR', '/CanyamelPark','<font>Canyamel Park</font>','Canyamel');
hotels[i++] = new hotel	('10000000000010000000000000000000', 3,1,0,67,0, 'EUR', '/SurMallorca','Sur Mallorca','Colonia de Sant Jordi');
hotels[i++] = new hotel	('10000000000000000000100000000000', 3,1,0,63,0, 'EUR', '/MarinaBarracuda ','<font>		Marina Barracuda 	</font>','Magalluf');
hotels[i++] = new hotel	('10000000000000000000100000000000', 3,1,0,88,0, 'EUR', '/SolGuadalupe','Sol Guadalupe','Magalluf');
hotels[i++] = new hotel	('10000000000000000000100000000000', 3,1,0,86,0, 'EUR', '/SolJamaica','Sol Jamaica','Magalluf');
hotels[i++] = new hotel	('10000000000000000000100000000000', 3,1,0,50,0, 'EUR', '/SolMagallufPark','Sol Magalluf Park','Magalluf');
hotels[i++] = new hotel	('10000000000000000000100000000000', 3,1,0,40,0, 'EUR', '/SolTrinidad','Sol Trinidad','Magalluf');
hotels[i++] = new hotel	('10000000000000000000100000000000', 3,1,0,85,0, 'EUR', '/VistaSol','Vista Sol','Magalluf');
hotels[i++] = new hotel	('10000000000000000000010000000000', 3,0,0,80,0, 'EUR', '/Almudaina','Almudaina','Palma de Mallorca');
hotels[i++] = new hotel	('10000000000000000000010000000000', 3,1,0,60,0, 'EUR', '/Araxa','Araxa','Palma de Mallorca');
hotels[i++] = new hotel	('10000000000000000000010000000000', 3,1,0,30,0, 'EUR', '/BarceloPuebloPalma','Barcelo Pueblo Palma','Palma de Mallorca');
hotels[i++] = new hotel	('10000000000000000000010000000000', 3,1,0,53,0, 'EUR', '/CostaAzul','Costa Azul','Palma de Mallorca');
hotels[i++] = new hotel	('10000000000000000000010000000000', 3,1,0,41,0, 'EUR', '/Gala','Gala','Palma de Mallorca');
hotels[i++] = new hotel	('10000000000000000000010000000000', 3,1,0,53,0, 'EUR', '/HusaZenith','Husa Zenith','Palma de Mallorca');
hotels[i++] = new hotel	('10000000000000000000010000000000', 3,1,0,39,0, 'EUR', '/ParadisoGarden','Paradiso Garden','Palma de Mallorca');
hotels[i++] = new hotel	('10000000000000000000010000000000', 3,1,0,83,0, 'EUR', '/TrypBosque','Tryp Bosque','Palma de Mallorca');
hotels[i++] = new hotel	('10000000000000000000010000000000', 3,1,0,45,0, 'EUR', '/TrypJaimeIII','Tryp Jaime III','Palma de Mallorca');
hotels[i++] = new hotel	('10000000000000000000001000000000', 3,1,0,51,0, 'EUR', '/DelfinPlaya','Delfin Playa','Palma Nova');
// hotels[i++] = new hotel	('10000000000000000000001000000000', 3,1,0,63,0, 'EUR', '/MarinaTorrenova','Marina Torrenova','Palma Nova');
hotels[i++] = new hotel	('10000000000000000000001000000000', 3,1,0,66,0, 'EUR', '/SolMirlosTordos','Sol Mirlos Tordos','Palma Nova');
hotels[i++] = new hotel	('10000000000000000000000100000000', 3,1,0,50,0, 'EUR', '/PalmiraCormoran','Palmira Cormoran','Peguera');
hotels[i++] = new hotel	('10000000000000000000000001000000', 3,1,0,42,0, 'EUR', '/AcapulcoPlaya','Acapulco Playa','Playa de Palma');
hotels[i++] = new hotel	('10000000000000000000000001000000', 3,1,0,48,0, 'EUR', '/Aya','Aya','Playa de Palma');
hotels[i++] = new hotel	('10000000000000000000000001000000', 3,1,0,63,0, 'EUR', '/Orient','Orient','Playa de Palma');
hotels[i++] = new hotel	('10000000000000000000000001000000', 3,1,0,39,0, 'EUR', '/RiuBali','Riu Bali','Playa de Palma');
hotels[i++] = new hotel	('10000000000000000000000001000000', 3,1,0,39,0, 'EUR', '/RiuChico','Riu Chico','Playa de Palma');
hotels[i++] = new hotel	('10000000000000000000000001000000', 3,1,0,42,0, 'EUR', '/RiuConcordia','Riu Concordia','Playa de Palma');
hotels[i++] = new hotel	('10000000000000000000000001000000', 3,1,0,39,0, 'EUR', '/RiuPlayaPark','Riu Playa Park','Playa de Palma');
hotels[i++] = new hotel	('10000000000000000000000001000000', 3,1,0,53,0, 'EUR', '/RiuSofia','Riu Sofia','Playa de Palma');
hotels[i++] = new hotel	('10000000000000000000000001000000', 3,1,0,50,0, 'EUR', '/Riutort','Riutort','Playa de Palma');
hotels[i++] = new hotel	('10000000000000000000000001000000', 3,1,0,56,0, 'EUR', '/SolEliteTropical','Sol Elite Tropical','Playa de Palma');
hotels[i++] = new hotel	('10000000000000000000000000100000', 3,1,0,27,0, 'EUR', '/BahiadeAlcudia','Bahia de Alcudia','Port d`Alcudia');
hotels[i++] = new hotel	('10000000000000000000000000100000', 3,0,0,35,0, 'EUR', '/SolAlcudiaCenter','Sol Alcudia Center','Port d`Alcudia');
hotels[i++] = new hotel	('10000000000000000000000000010000', 3,1,0,110,0, 'EUR', '/RiuRomantica','Riu Romantica','Port de Pollensa');
hotels[i++] = new hotel	('10000000000000000000000000010000', 3,1,0,58,0, 'EUR', '/Daina','Daina','Port de Pollensa');
hotels[i++] = new hotel	('10000000000000000000000000010000', 3,1,0,51,0, 'EUR', '/Miramar','Miramar','Port de Pollensa');
hotels[i++] = new hotel	('10000000000000000000000000010000', 3,1,0,97,0, 'EUR', '/Flora','Flora','Port de Pollensa');
hotels[i++] = new hotel	('10000000000000000000000000010000', 3,1,0,56,0, 'EUR', '/PollencaPark','Pollenca Park','Port de Pollensa');
hotels[i++] = new hotel	('10000000000000000000000000010000', 3,1,0,54,0, 'EUR', '/Pollentia','Pollentia','Port de Pollensa');
hotels[i++] = new hotel	('10000000000000000000000000010000', 3,1,0,55,0, 'EUR', '/Uyal','Uyal','Port de Pollensa');
hotels[i++] = new hotel	('10000000000000000000000000000001', 3,1,0,49,0, 'EUR', '/DelfinMar','Delfin Mar','Santa Ponsa');
hotels[i++] = new hotel	('10000000000000000000000000000001', 3,1,0,49,0, 'EUR', '/DelfinSiestaMar','Delfin Siesta Mar','Santa Ponsa');
hotels[i++] = new hotel	('10000000000000000000000000000001', 3,1,0,45,0, 'EUR', '/HesperiaPlayasdeMallorca','Hesperia Playas de Mallorca','Santa Ponsa');
hotels[i++] = new hotel	('10000000000000000000000000000001', 3,1,0,51,0, 'EUR', '/BarceloJardindelMar','Barcelo Jardin del Mar','Santa Ponsa');
hotels[i++] = new hotel	('10000000000000000000000000000001', 3,1,0,68,0, 'EUR', '/SantaPonsaPark','Santa Ponsa Park','Santa Ponsa');
// hotels[i++] = new hotel	('10000000000000010000000000000000', 2,1,0,23,1, 'EUR', '/smreinaisabel','<font>	Saint Michel 	Reina Isabel	</font>','El Arenal');
// hotels[i++] = new hotel	('10000000000000010000000000000000', 2,1,0,23,1, 'EUR', '/smeuropa','<font>	Saint Michel 	Europa	</font>','El Arenal');
hotels[i++] = new hotel	('10000000000000000100000000000000', 2,1,0,112,0, 'EUR','/FincaSaRotadEnPalerm','Finca Sa Rota d’En Palerm','Lloret de Vistalegre');
																	

function sortCategory()
{
	for (p=1; p<hotels.length; p++)
	{
		for(q=0; q<(hotels.length-1); q++)
		{
			if (hotels[q].cat < hotels[q+1].cat) 
			{
				a = new hotel;
				a = hotels[q];
				hotels[q] = hotels[q+1];
				hotels[q+1] = a;
			} 
		}
	}
}

function sortPrice()
{
//	alert("sortPrice()");

	for (p=1; p<hotels.length; p++)
	{
		for (q=0; q<(hotels.length-1); q++)
		{
			if (hotels[q].price > hotels[q+1].price) 
			{
				a = new hotel;
				a = hotels[q];
				hotels[q] = hotels[q+1];
				hotels[q+1] = a;
			} 
		}
	}
}

function listHotels()
{
	category = document.theForm['category'].value;
	locationSearch = document.theForm['location'].value;
	priceRange = document.theForm['priceRange'].value;
	fitness = document.theForm['fitness'].checked;
	business = document.theForm['business'].checked;

// tablice wartosci domyslnych

	selCategory = new Array();
	selLocation = new Array();
	selPrice = new Array();
	var selFitness, selBusiness;

	for (m=1; m<6; m++) if (category==m) selCategory[m]="selected";
	for (m=1; m<5; m++) if (locationSearch==m) selLocation[m] = "selected";
	for (m=0; m<=200; m=m+50) if (priceRange==m) selPrice[m] = "selected";
	if (fitness) selFitness = "checked";
	if (business) selBusiness = "checked";

// koniec wartosci domyslnych =================

	location.reload();

// Headers & main text

	document.write('<html>\r\n<head>\r\n<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\r\n<title>Mallorca Hotels - Search Results</title>\r\n<link rel=stylesheet type=text/css href=mallorca_hotels/mallorca_hotels.css>\r\n');
	document.write('<script language=javascript src=mallorca_hotels/mallorca_hotels.js></script>\r\n</head>\r\n\r\n<body>\r\n\r\n<table name=LAYOUT WIDTH=85% BORDER=0 align=center>\r\n');
	document.write('<TR><TD colspan=3><img src=b.gif width=740 height=10> <table cellspacing=0 cellpadding=0 border=0 width=100%>\r\n');
	document.write('<tr><td><img src=mallorca_hotels/mallorca_hotels.gif alt=\"Mallorca Hotels\"><span style="position: relative; left: -119px; top: -2px; font-size: 22px;"><nobr>Mallorca Hotels</nobr></span></td><td align=right valign=bottom><a href=http://www.res99.com/nexres/cars/search.cgi?src=10004159 target=_blank><img src=car.gif width=125 height=26 border=0></a><img src=b.gif width=5 height=1>\r\n');
	document.write('<a href=http://www.res99.com/nexres/start-pages/frame.cgi?src=10004159&product=AIR target=_blank><img src=air.gif width=125 height=26 border=0></a><img src=b.gif width=5 height=1><a href=mailto:ontravel@pol.pl><img src=contact.gif width=126 height=25 border=0></a></td></tr>\r\n');
	document.write('<tr><td colspan=2><img src=b.gif width=1 height=4></td></tr>\r\n');
	document.write('<tr><td bgcolor=#333366 colspan=2><img src=b.gif width=1 height=1></td></tr></table><img src=b.gif width=1 height=7><br>\r\n');
	document.write('<b>Welcome to Mallorca, Spain!</b>\r\n');
	document.write(" We present one of the most comprehensive selections of hotels in Mallorca available through the web, with detailed information on the hotels  facilities, photos, maps, and secure reservation forms.<Br> Whether you\'re on a budget or looking for luxury accommodations in Mallorca, our Mallorca hotels directory offers a wide range of possibilities for your stay, from cheap hotels, inns, motels, to deluxe hotels. Some of the hotels presented in this directory offer <u>prices lower than the hotel rack rates</u>. These kind of offers are exclusive for <a class=hotel href=http://www.hotelsspainonline.com>hotelsspainonline.com</a> and are available only when booked through our secure reservation forms.<br><img src=b.gif width=1 height=10><br></TD></TR>\r\n");
	document.write('<TR><TD width=50% valign=top class=light><TABLE name=ALLHOTELS width=100% cellspacing=0 cellpadding=0 border=0>\r\n');
	document.write('<tr><td colspan=4 align=left height=28 valign=top class=title><table cellspacing=0 cellpadding=0 width=100% border=0><tr height=28>\r\n');
	document.write('<td class=title align=left valign=top><img src=r1.gif width=14 height=9></td>\r\n');
	document.write('<td class=title> All Mallorca hotels</td><td align=right class=title><font class=a3>Currently <b>'+hotels.length+' hotels</b> available</font></td>\r\n');
	document.write('<td class=title align=right valign=top><img src=r2.gif width=14 height=9></td></table></td></tr>\r\n');
	document.write('<tr><td colspan=4 bgcolor=#333366><form name=theForm>\r\n');
	document.write('<table name=marginsearchbox cellspacing=0 cellpadding=0 class=title border=0 width=100%><tr><td><img src=b.gif width=1 height=1></td><td><table width=100% cellspacing=0 cellpadding=2 border=0 class=normal style="font-size:8pt">\r\n');
	document.write('<tr class=old><td colspan=4><img src=b.gif width=1 height=1></td></tr>\r\n');
	document.write('<tr class=old><td><img src=b.gif width=3 height=1></td>\r\n');
	document.write('<td><img src=arrow.gif width=4 height=7>   Category</td>\r\n');
	document.write('<td align=center><select onchange="listHotels()" style="width:80px;" name=category>\r\n');
	document.write('<option value="all">all</option><option value="5" '+selCategory[5]+'>5 stars</option><option value="4" '+selCategory[4]+'>4 stars</option><option value="3" '+selCategory[3]+'>3 stars</option><option value="2" '+selCategory[2]+'>2 stars</option>\r\n');
	document.write('<option value="1" '+selCategory[1]+'>other</option></select></td><td><img src=b.gif width=10 height=1><img src=arrow.gif width=4 height=7>   Location \r\n');
	document.write('<select style="width:180px;" name=location onchange="listHotels()">\r\n');
	document.write('<option value="0">all</option>');
	document.write('	<option value="1" '+selLocation[1]+'>	Alcudia	</option>	 ');		
	document.write('	<option value="2" '+selLocation[2]+'>	Cala d`Or 	</option>	 ');
	document.write('	<option value="3" '+selLocation[3]+'>	Cala Millor 	</option>	 ');		
	document.write('	<option value="4" '+selLocation[4]+'>	Cala Rajada 	</option>	 ');		
	document.write('	<option value="5" '+selLocation[5]+'>	Cala Sant Vicenc 	</option>	 ');		
	document.write('	<option value="6" '+selLocation[6]+'>	Cala Vinas 	</option>	 ');		
	document.write('	<option value="7" '+selLocation[7]+'>	Calas de Mallorca 	</option>	 ');		
	document.write('	<option value="8" '+selLocation[8]+'>	Calvia 	</option>	 ');		
	document.write('	<option value="9" '+selLocation[9]+'>	Camp de Mar 	</option>	 ');		
	document.write('	<option value="10" '+selLocation[10]+'>	Can Picafort 	</option>	 ');		
	document.write('	<option value="11" '+selLocation[11]+'>	Canyamel 	</option>	 ');		
	document.write('	<option value="12" '+selLocation[12]+'>	Colonia de Sant Jordi 	</option>	 ');		
	document.write('	<option value="13" '+selLocation[13]+'>	Costa de los Pinos 	</option>	 ');		
	document.write('	<option value="14" '+selLocation[14]+'>	Deya 	</option>	 ');		
	document.write('	<option value="15" '+selLocation[15]+'>	El Arenal 	</option>	 ');		
	document.write('	<option value="16" '+selLocation[16]+'>	Illetas 	</option>	 ');
	document.write('	<option value="17" '+selLocation[17]+'>	Lloret de Vistalegre	</option>	 ');
	document.write('	<option value="18" '+selLocation[18]+'>	Lloseta	</option>	 ');
	document.write('	<option value="19" '+selLocation[19]+'>	Llucmajor 	</option>	 ');
	document.write('	<option value="20" '+selLocation[20]+'>	Magaluf 	</option>	 ');
	document.write('	<option value="21" '+selLocation[21]+'>	Palma de Mallorca 	</option>	 ');
	document.write('	<option value="22" '+selLocation[22]+'>	Palma Nova 	</option>	 ');
	document.write('	<option value="23" '+selLocation[23]+'>	Peguera 	</option>	 ');
	document.write('	<option value="24" '+selLocation[24]+'>	Playa de Muro 	</option>	 ');
	document.write('	<option value="25" '+selLocation[25]+'>	Playa de Palma	</option>	 ');
	document.write('	<option value="26" '+selLocation[26]+'>	Port d`Alcudia 	</option>	 ');
	document.write('	<option value="27" '+selLocation[27]+'>	Port de Pollensa 	</option>	 ');
	document.write('	<option value="28" '+selLocation[28]+'>	Portals Nous 	</option>	 ');
	document.write('	<option value="29" '+selLocation[29]+'>	Porto Colom 	</option>	 ');
	document.write('	<option value="30" '+selLocation[30]+'>	Sa Coma 	</option>	 ');
	document.write('	<option value="31" '+selLocation[31]+'>	Santa Ponsa	</option>	 ');
	document.write('</select></td>\r\n');
	document.write('</select></td></tr>\r\n');
	document.write('<tr class=old><td><img src=b.gif width=3 height=1></td>\r\n');
	document.write('<td><img src=arrow.gif width=4 height=7>   <nobr>Prices from</nobr></td>\r\n');
	document.write('<td align=center><select style="width:80px;" name=priceRange onchange="listHotels()">\r\n');
	document.write('<option value="all">all</option><option value="0" '+selPrice[0]+'>< € 50</option><option value="50" '+selPrice[50]+'>€ 50 - € 100</option><option value="100" '+selPrice[100]+'>€ 100 - € 150</option>\r\n');
	document.write('<option value="150" '+selPrice[150]+'>€ 150 - € 200</option><option value="200" '+selPrice[200]+'>> € 200</option></select></td>\r\n');
	document.write('<td><table cellspacing=0 cellpadding=0 border=0 width=100% class=normal style="font-size:8pt">\r\n');
	document.write('<tr class=old><td width=50%><img src=b.gif width=10 height=1><img src=arrow.gif width=4 height=7>   Fitness<img src=b.gif width=5 height=1><input type=checkbox name=fitness onclick="listHotels()" '+selFitness+'></td><td width=50%><img src=b.gif width=10 height=1><img src=arrow.gif width=4 height=7>   Business<img src=b.gif width=5 height=1><input type=checkbox name=business onclick="listHotels()" '+selBusiness+'> </td></tr>\r\n');
	document.write('</table></td></tr>\r\n');

//	document.write('<option value="all">all</option><option value="1" '+selLocation[1]+'>city center</option><option value="2" '+selLocation[2]+'>suburbs</option><option value="3" '+selLocation[3]+'>out of city</option></select></td>');
//	document.write('<td><img src=b.gif width=10 height=1><img src=arrow.gif width=4 height=7>   Fitness<img src=b.gif width=5 height=1><input type=checkbox name=fitness onclick="listHotels()" '+selFitness+'><img src=b.gif width=10 height=1><img src=arrow.gif width=4 height=7>   Business<img src=b.gif width=5 height=1><input type=checkbox name=business onclick="listHotels()" '+selBusiness+'> </td></tr>');

	document.write('<tr class=old><td colspan=4><img src=b.gif width=1 height=1></td></tr>\r\n');
	document.write('</form></table name=searchbox></td><td><img src=b.gif width=1 height=1></td></tr><tr><td colspan=3><img src=b.gif width=1 height=1></td></table name=marginsearchbox></td></tr>\r\n');
	document.write('</table name=allhotels></td><td><img src=b.gif width=10></td>\r\n');
	document.write('<td width=50% valign=top><img src=b.gif width=1 height=7><br><img src=cen2.gif width=13 height=13 align=middle> - city center <br><img src=fit2.gif width=13 height=13 align=middle> - fitness facilities: swimming pool / gym / tennis courts <br><img src=bus2.gif width=13 height=13 align=middle> - business facilities: business center / PC available to guests<br><img src=ins.gif width=13 height=13 align=middle> - instant availability check and reservations<br><font><b>Recommended hotels are marked with this color.</b></font></td></tr>\r\n');
// Koniec elementow statycznych

// test zmiennych:
// document.write('cat: ' + category + ' loc: ' +locationSearch + ' price: ' + priceRange +' fit: ' + fitness + ' bus: ' + business);

// test sortowanie:

	document.write('<tr><td colspan=3 class=light><table name=marginesy cellspacing=0 cellpadding=0 width=100%><tr><td><img src=b.gif width=3 height=0></td><td><table name="wyniki" cellspacing=0 cellpadding=1 border=0 width=100%>\r\n');
	sortPrice();
	sortCategory();
	var lastIndex = 99999;
	var resCount = 0;
	
	for (k=0; k<hotels.length; k++) //glowna petla
	{
// Okreslenie price range

		skok = 50;
		for (r=0; r<5; r++)
		{
			if (hotels[k].price<200)
			{
				if (hotels[k].price>=r*skok&&hotels[k].price<(r*skok+skok)) hotelPriceRange = r*skok;
			}
			else hotelPriceRange = 200;
		}

// warunki

		if ( (hotels[k].dist.charAt(locationSearch)=="1") && 
			 (hotels[k].fit=="1" || !fitness) && 
			 (hotels[k].bus=="1" || !business) && 
			 (hotelPriceRange==priceRange || priceRange=="all") && 
			 (hotels[k].cat==category || category=="all") ) 
			{
				resCount++;

//zmienne obrazkow

				var imgFit, imgBus, imgCen, imgIns
				if (hotels[k].fit==1) imgFit = "<img src=fit2.gif width=13 height=13>"; else imgFit ="";
				if (hotels[k].bus==1) imgBus = "<img src=bus2.gif width=13 height=13>"; else imgBus ="";
				if (hotels[k].dist.charAt(1)=="1") imgCen = "<img src=cen2.gif width=13 height=13>"; else imgCen ="";
				if (hotels[k].instant==1) imgIns = "<img src=ins.gif width=13 height=13>"; else imgIns ="";

// okreslenie czy to pierwszy hotel w swej kat.

			 	if (lastIndex==99999) isFirst="yes";
				else 
					if(hotels[k].cat!=hotels[lastIndex].cat) {isFirst="yes";} 
	 				else isFirst="no";

				lastIndex0 = lastIndex; // kontrola
			 	lastIndex=k;

				if (isFirst=="yes") 
				{
					if (lastIndex0!=99999) document.write('<tr><td colspan=9><hr></td></tr>\r\n');
					else document.write('<tr><td width=27%></td><td></td><td></td><td width=5%><td><img src=b.gif width=10 height=4></td><td width=27%></td><td></td><td></td><td width=5%></td></tr>\r\n');
					document.write('<tr><td colspan=9 align=left ><b class=h3>'+hotels[k].cat+'-star Mallorca hotels</b class=h3></td></tr><tr><td colspan=9><hr></td></tr>\r\n');
				}

// wypis hotelu		

/* AP */		if (isFirst=="yes")	resCount=1;

				if (resCount%2!=0) 
				{

//document.write('<br>Hotel:' + hotels[k].name + ' Cat: ' + hotels[k].cat + ' Price: ' + hotels[k].price +' Dist: ' + hotels[k].dist + ' Fit: ' + hotels[k].fit + ' Bus: ' +hotels[k].bus + ' Town: ' + hotels[k].town + ' PriceRange: ' + hotelPriceRange + ' last index: ' + lastIndex0 + imgFit + imgBus + imgCen + imgIns + '1st column' );

					document.write('<tr><td width=27% valign=middle><a href="'+hotels[k].dir+'" class=hotel>'+hotels[k].name+'</a></td><td valign=middle> '+imgCen+ ' ' +imgFit + ' '+ imgBus + ' '+imgIns+ ' </td><td align=right valign=middle>from</td><td align=right valign=middle width=5%><b>€ '+hotels[k].price+'</b></td><td><img src=b.gif width=15 height=1></td>\r\n');
				}
				else 
				{

//document.write('<br>Hotel:' + hotels[k].name + ' Cat: ' + hotels[k].cat + ' Price: ' + hotels[k].price +' Dist: ' + hotels[k].dist + ' Fit: ' + hotels[k].fit + ' Bus: ' +hotels[k].bus + ' Town: ' + hotels[k].town + ' PriceRange: ' + hotelPriceRange + ' last index: ' + lastIndex0 + imgFit + imgBus + imgCen + imgIns + '2 nd column');

					document.write('<td width=27% valign=middle><a href="'+hotels[k].dir+'" class=hotel>'+hotels[k].name+'</a></td><td valign=middle> '+imgCen+ ' ' +imgFit + ' '+ imgBus + ' '+imgIns+ ' </td><td align=right valign=middle>from</td><td align=right valign=middle width=5% ><b>€ '+hotels[k].price+'</b></td></tr>\r\n');
				}
			}
		}	// koniec glownej petli

	if (resCount==0) document.write("<img src=b.gif width=1 height=5><br><b><i>No hotels matched your criteria. Please try again.</i></b><br><img src=b.gif width=1 height=5>\r\n");
	document.write('</table name=wyniki><img src=b.gif width=1 height=5></td><td><img src=b.gif width=3 height=1></td></tr></table name=marginesy></td></tr>\r\n');

//legenda

	document.write('</TABLE name=LAYOUT>\r\n');
	document.write('<img src=b.gif width=1 height=5><br><div align=center style="font:8pt;">© 2004 Mallorca hotels</i></div>\r\n');
	document.write('</td></tr></table></td><td><img src=b.gif width=1 height=1></td></tr><tr><td><img src=b.gif width=1 height=1></td></tr></table name=linksmargins></td></tr></table name=LAYOUT>\r\n');
	document.write('</body></html>\r\n');
}

