/* author: Dominik Cabos */
/* Creation date: 2004-01-15 */

/* Modified: Artur Pakuszewski */

// 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('1000001000', 5, 0, 0, 169, 0, 'EUR', '/LondraCargill', 'Londra Cargill', 'Rome');
hotels[i++] = new hotel('1000010000', 5, 1, 0, 180, 0, 'EUR', '/AldrovandiPalace', 'Aldrovandi Palace', 'Rome');
hotels[i++] = new hotel('1000010000', 5, 0, 0, 180, 0, 'EUR', '/RiverPalace', 'River Palace', 'Rome');
hotels[i++] = new hotel('1000010000', 5, 0, 0, 210, 0, 'EUR', '/ReginaBaglioni', 'Regina Baglioni', 'Rome');
hotels[i++] = new hotel('1000110000', 5, 0, 0, 246, 0, 'EUR', '/Majestic', 'Majestic', 'Rome');
hotels[i++] = new hotel('1000110000', 5, 1, 0, 260, 0, 'EUR', '/SplendideRoyal', 'Splendide Royal', 'Rome');
hotels[i++] = new hotel('1001100000', 5, 0, 0, 273, 0, 'EUR', '/GrandPlaza', 'Grand Hotel Plaza', 'Rome');
hotels[i++] = new hotel('1000110000', 5, 0, 1, 279, 0, 'EUR', '/AmbasciatoriPalace', 'Ambasciatori Palace', 'Rome');
hotels[i++] = new hotel('1000010000', 5, 1, 1, 290, 0, 'EUR', '/GrandParcodeiPrincipi', 'Grand Hotel Parco dei Principi', 'Rome');
hotels[i++] = new hotel('1000001000', 5, 1, 1, 311, 0, 'EUR', '/LeGrand', 'Le Grand Hotel', 'Rome');
hotels[i++] = new hotel('1001000000', 5, 1, 1, 333, 0, 'EUR', '/GranddelaMinerve', 'Grand Hotel de la Minerve', 'Rome');
hotels[i++] = new hotel('1000110000', 5, 0, 0, 350, 0, 'EUR', '/Excelsior', 'Excelsior', 'Rome');
hotels[i++] = new hotel('1000110000', 5, 1, 0, 380, 0, 'EUR', '/DeRussie', 'Hotel De Russie', 'Rome');
hotels[i++] = new hotel('1000110000', 5, 1, 1, 412, 0, 'EUR', '/HasslerVillaMedici', 'Hassler Villa Medici', 'Rome');
hotels[i++] = new hotel('1000110000', 5, 0, 0, 415, 0, 'EUR', '/Eden', 'Eden', 'Rome');
hotels[i++] = new hotel('1000110000', 5, 1, 1, 419, 0, 'EUR', '/DeLaVilleInter-Continental', 'De La Ville Inter-Continental', 'Rome');
hotels[i++] = new hotel('1001100000', 5, 1, 1, 490, 0, 'EUR', '/BerniniBristol', 'Bernini Bristol', 'Rome');

hotels[i++] = new hotel('1000000001', 4, 0, 0, 120, 1, 'EUR', '/ParkVillaGrazioli', '<font>Park Hotel Villa Grazioli</font>', 'Rome');
hotels[i++] = new hotel('1000000010', 4, 0, 0, 70, 0, 'EUR', '/GrandHermitage', 'Grand Hotel Hermitage', 'Rome');
hotels[i++] = new hotel('1000000100', 4, 0, 0, 80, 0, 'EUR', '/StarMichelangelo', 'Starhotel Michelangelo', 'Rome');
hotels[i++] = new hotel('1000001000', 4, 0, 0, 96, 0, 'EUR', '/Executive', 'Executive', 'Rome');
hotels[i++] = new hotel('1000000100', 4, 0, 0, 96, 0, 'EUR', '/GrandOlympic', 'Grand Hotel Olympic', 'Rome');
hotels[i++] = new hotel('1000000100', 4, 0, 1, 100, 0, 'EUR', '/AtlanteGarden', 'Atlante Garden', 'Rome');
hotels[i++] = new hotel('1000001000', 4, 0, 0, 100, 0, 'EUR', '/Napoleon', 'Napoleon', 'Rome');
hotels[i++] = new hotel('1000000010', 4, 0, 0, 100, 0, 'EUR', '/Regent', 'Quality Regent', 'Rome');
hotels[i++] = new hotel('1100000000', 4, 1, 0, 105, 0, 'EUR', '/MercureDeltaColosseo', 'Mercure Delta Colosseo', 'Rome');
hotels[i++] = new hotel('1000001000', 4, 0, 0, 105, 0, 'EUR', '/MecenatePalace', 'Mecenate Palace', 'Rome');
hotels[i++] = new hotel('1001000000', 4, 0, 0, 106, 0, 'EUR', '/PaceElvezia', 'Pace Elvezia', 'Rome');
hotels[i++] = new hotel('1000000010', 4, 0, 0, 110, 0, 'EUR', '/Ritz', 'Ritz', 'Rome');
hotels[i++] = new hotel('1000110000', 4, 0, 0, 110, 0, 'EUR', '/Valadier', 'Valadier', 'Rome');
hotels[i++] = new hotel('1000001000', 4, 0, 0, 119, 0, 'EUR', '/Gioberti', 'Gioberti', 'Rome');
hotels[i++] = new hotel('1100000000', 4, 0, 0, 123, 0, 'EUR', '/Palatino', 'Palatino', 'Rome');
hotels[i++] = new hotel('1010000000', 4, 0, 0, 125, 0, 'EUR', '/Genio', 'Genio', 'Rome');
hotels[i++] = new hotel('1000001000', 4, 0, 0, 129, 0, 'EUR', '/Ariston', 'Ariston', 'Rome');
hotels[i++] = new hotel('1000000010', 4, 1, 0, 130, 0, 'EUR', '/RipaAllSuites', 'Ripa All Suites', 'Rome');
hotels[i++] = new hotel('1000010000', 4, 0, 0, 130, 0, 'EUR', '/Victoria', 'Victoria', 'Rome');
hotels[i++] = new hotel('1000001000', 4, 0, 0, 131, 0, 'EUR', '/RoyalSantina', 'Royal Santina', 'Rome');
hotels[i++] = new hotel('1000001000', 4, 0, 0, 134, 0, 'EUR', '/Universo', 'Universo', 'Rome');
hotels[i++] = new hotel('1000001000', 4, 0, 0, 134, 0, 'EUR', '/SanGiorgio', 'San Giorgio', 'Rome');
hotels[i++] = new hotel('1100000000', 4, 0, 0, 134, 0, 'EUR', '/President', 'President', 'Rome');
hotels[i++] = new hotel('1000001000', 4, 0, 0, 135, 0, 'EUR', '/AteneoPalace', 'Ateneo Palace', 'Rome');
hotels[i++] = new hotel('1000001000', 4, 0, 0, 135, 0, 'EUR', '/Diana', 'Diana', 'Rome');
hotels[i++] = new hotel('1100000000', 4, 0, 0, 135, 0, 'EUR', '/AmbraPalace', 'Ambra Palace Hotel', 'Rome');
hotels[i++] = new hotel('1000001000', 4, 0, 0, 139, 0, 'EUR', '/StarMetropole', 'Starhotel Metropole', 'Rome');
hotels[i++] = new hotel('1000000001', 4, 0, 0, 139, 0, 'EUR', '/AppiaPark', 'Appia Park', 'Rome');
hotels[i++] = new hotel('1000000100', 4, 0, 0, 142, 0, 'EUR', '/GrandTiberio', 'Grand Hotel Tiberio', 'Rome');
hotels[i++] = new hotel('1011001000', 4, 0, 0, 144, 0, 'EUR', '/Quirinale', 'Quirinale', 'Rome');
hotels[i++] = new hotel('1001000000', 4, 0, 0, 145, 0, 'EUR', '/White', 'White', 'Rome');
hotels[i++] = new hotel('1001000000', 4, 0, 0, 150, 0, 'EUR', '/DelleNazioni', 'Delle Nazioni', 'Rome');
hotels[i++] = new hotel('1000000100', 4, 0, 0, 150, 0, 'EUR', '/Cicerone', 'Cicerone', 'Rome');
hotels[i++] = new hotel('1000110000', 4, 0, 0, 150, 0, 'EUR', '/Savoy', 'Savoy', 'Rome');
hotels[i++] = new hotel('1100000000', 4, 0, 0, 154, 0, 'EUR', '/Tiziano', 'Tiziano', 'Rome');
hotels[i++] = new hotel('1000001000', 4, 0, 0, 154, 0, 'EUR', '/Genova', 'Genova', 'Rome');
hotels[i++] = new hotel('1100000000', 4, 0, 0, 155, 0, 'EUR', '/Forum', 'Forum', 'Rome');
hotels[i++] = new hotel('1000010000', 4, 0, 0, 160, 0, 'EUR', '/ViscontiPalace', 'Visconti Palace', 'Rome');
hotels[i++] = new hotel('1000001000', 4, 0, 0, 162, 0, 'EUR', '/Artemide', 'Artemide', 'Rome');
hotels[i++] = new hotel('1011000000', 4, 0, 0, 166, 0, 'EUR', '/QualityInnTraiano', 'Quality Inn Traiano', 'Rome');
hotels[i++] = new hotel('1000010000', 4, 0, 0, 170, 0, 'EUR', '/Albani', 'Albani', 'Rome');
hotels[i++] = new hotel('1000001000', 4, 0, 0, 173, 0, 'EUR', '/Artdeco', 'Artdeco', 'Rome');
hotels[i++] = new hotel('1000000001', 4, 1, 1, 179, 0, 'EUR', '/SheratonRoma', 'Sheraton Roma', 'Rome');
hotels[i++] = new hotel('1000001000', 4, 1, 1, 182, 0, 'EUR', '/EmpirePalace', 'Empire Palace', 'Rome');
hotels[i++] = new hotel('1000011000', 4, 0, 0, 185, 0, 'EUR', '/MarcellaRoyal', 'Marcella Royal Hotel', 'Rome');
hotels[i++] = new hotel('1011000000', 4, 1, 0, 186, 0, 'EUR', '/ColonnaPalace', 'Colonna Palace', 'Rome');
hotels[i++] = new hotel('1011000000', 4, 0, 0, 189, 0, 'EUR', '/DeiBorgognoni', 'Dei Borgognoni', 'Rome');
hotels[i++] = new hotel('1001000000', 4, 0, 0, 200, 0, 'EUR', '/Nazionale', 'Nazionale', 'Rome');
hotels[i++] = new hotel('1000110000', 4, 0, 0, 207, 0, 'EUR', '/Sofitel', 'Sofitel', 'Rome');
hotels[i++] = new hotel('1000110000', 4, 0, 0, 210, 0, 'EUR', '/JollyVittorioVeneto', 'Jolly Hotel Vittorio Veneto', 'Rome');
hotels[i++] = new hotel('1000000100', 4, 0, 0, 213, 0, 'EUR', '/AtlanteStar', 'Atlante Star', 'Rome');
hotels[i++] = new hotel('1000110000', 4, 0, 0, 219, 0, 'EUR', '/d`Inghilterra', 'Hotel d&rsquo;Inghilterra', 'Rome');
hotels[i++] = new hotel('1001110000', 4, 0, 0, 223, 0, 'EUR', '/Imperiale', 'Imperiale', 'Rome');
hotels[i++] = new hotel('1000001000', 4, 0, 0, 240, 0, 'EUR', '/GiulioCesare', 'Giulio Cesare', 'Rome');
hotels[i++] = new hotel('1000100000', 4, 0, 0, 250, 0, 'EUR', '/DeiMellini', 'Dei Mellini', 'Rome');
hotels[i++] = new hotel('1000010000', 4, 0, 0, 276, 0, 'EUR', '/TheDuke', 'The Duke Hotel', 'Rome');
hotels[i++] = new hotel('1000010000', 4, 0, 0, 440, 0, 'EUR', '/BoscoloGrandPalace', 'Boscolo Grand Hotel Palace', 'Rome');

hotels[i++] = new hotel('1000001000', 3, 0, 0, 80, 1, 'EUR', '/garda', '<font>Garda</font>', 'Rome');
hotels[i++] = new hotel('1000001000', 3, 0, 0, 70, 1, 'EUR', '/DomusAventina', '<font>Domus Aventina</font>', 'Rome');
hotels[i++] = new hotel('1000001000', 3, 0, 0, 75, 1, 'EUR', '/priscilla', '<font>Priscilla</font>', 'Rome');



hotels[i++] = new hotel('1000001000', 3, 0, 0, 70, 1, 'EUR', '/Aphrodite', '<font>Aphrodite Hotel</font>', 'Rome');
hotels[i++] = new hotel('1000001000', 3, 0, 0, 60, 0, 'EUR', '/Fiamma', 'Fiamma', 'Rome');
hotels[i++] = new hotel('1100000000', 3, 0, 0, 60, 0, 'EUR', '/Edera', 'Edera', 'Rome');
hotels[i++] = new hotel('1000001000', 3, 0, 0, 60, 0, 'EUR', '/Bled', 'Bled', 'Rome');
hotels[i++] = new hotel('1000001000', 3, 0, 0, 70, 1, 'EUR', '/VillaS.LorenzoMaria', '<font>Villa S. Lorenzo Maria</font>', 'Rome');
hotels[i++] = new hotel('1000000100', 3, 0, 0, 70, 0, 'EUR', '/Pacific', 'Pacific', 'Rome');
hotels[i++] = new hotel('1000001000', 3, 0, 0, 71, 0, 'EUR', '/Brasile', 'Brasile', 'Rome');
//hotels[i++] = new hotel('1000001000', 3, 0, 0, 71, 0, 'EUR', '/Eton', 'Eton', 'Rome');
hotels[i++] = new hotel('1000110000', 3, 0, 0, 75, 1, 'EUR', '/delCorso', '<font>Hotel del Corso</font>', 'Rome');
hotels[i++] = new hotel('1000001000', 3, 0, 0, 78, 0, 'EUR', '/Daniela', 'Daniela', 'Rome');
hotels[i++] = new hotel('1000000010', 3, 0, 0, 78, 0, 'EUR', '/SanGiusto', 'San Giusto', 'Rome');
hotels[i++] = new hotel('1000001000', 3, 1, 0, 80, 0, 'EUR', '/Gigliodell`Opera', 'Giglio dell&rsquo;Opera', 'Rome');
hotels[i++] = new hotel('1000000010', 3, 0, 0, 80, 0, 'EUR', '/PanamaGarden', 'Panama Garden', 'Rome');
hotels[i++] = new hotel('1000000001', 3, 0, 0, 86, 1, 'EUR', '/CancelliRossi', '<font>Cancelli Rossi</font>', 'Rome - Fiumicino');
hotels[i++] = new hotel('1000001000', 3, 0, 0, 90, 0, 'EUR', '/Morgana', 'Morgana', 'Rome');
hotels[i++] = new hotel('1000001000', 3, 0, 0, 90, 0, 'EUR', '/Torino', 'Torino', 'Rome');
hotels[i++] = new hotel('1000001000', 3, 0, 0, 95, 0, 'EUR', '/Viminale', 'Viminale', 'Rome');
hotels[i++] = new hotel('1000000010', 3, 0, 0, 98, 1, 'EUR', '/Aventino', '<font>Aventino</font>', 'Rome');
hotels[i++] = new hotel('1000000010', 3, 0, 0, 98, 1, 'EUR', '/VillaS.Pio', '<font>Villa S. Pio</font>', 'Rome');
hotels[i++] = new hotel('1011000000', 3, 0, 0, 100, 0, 'EUR', '/Adriano', 'Adriano', 'Rome');
hotels[i++] = new hotel('1000010000', 3, 0, 0, 100, 0, 'EUR', '/Gambrinus', 'Royal Gambrinus', 'Rome');
hotels[i++] = new hotel('1000001000', 3, 0, 0, 100, 0, 'EUR', '/Giolli', 'Giolli', 'Rome');
hotels[i++] = new hotel('1000001000', 3, 0, 0, 100, 0, 'EUR', '/Centro', 'Centro', 'Rome');
hotels[i++] = new hotel('1000110000', 3, 0, 0, 110, 0, 'EUR', '/Julia', 'Julia Hotel', 'Rome');
hotels[i++] = new hotel('1000110000', 3, 0, 0, 127, 0, 'EUR', '/Alexandra', 'Alexandra', 'Rome');
hotels[i++] = new hotel('1000001000', 3, 0, 0, 135, 0, 'EUR', '/Impero', 'Impero', 'Rome');
hotels[i++] = new hotel('1011000000', 3, 0, 0, 155, 0, 'EUR', '/Accademia', 'Accademia', 'Rome');
hotels[i++] = new hotel('1000001000', 3, 0, 0, 155, 0, 'EUR', '/Miami', 'Miami', 'Rome');
//hotels[i++] = new hotel('1000000000', 3, 0, 0, 155, 0, 'EUR', '/Venezia', 'Venezia', 'Rome');
hotels[i++] = new hotel('1000001000', 3, 0, 0, 179, 0, 'EUR', '/AedesGalles', 'Aedes Hotel Galles', 'Rome');
hotels[i++] = new hotel('1000001000', 3, 0, 0, 179, 0, 'EUR', '/AedesMadison', 'Aedes Hotel Madison', 'Rome');
hotels[i++] = new hotel('1000001000', 3, 0, 0, 179, 0, 'EUR', '/AedesPrince', 'Aedes Hotel Prince', 'Rome');
hotels[i++] = new hotel('1000000100', 3, 1, 0, 180, 0, 'EUR', '/Isa', 'Isa', 'Rome');
hotels[i++] = new hotel('1100001000', 3, 0, 0, 181, 0, 'EUR', '/Palladium', 'Palladium', 'Rome');
hotels[i++] = new hotel('1000001000', 3, 0, 0, 220, 0, 'EUR', '/DomusAurea', 'Domus Aurea', 'Rome');

hotels[i++] = new hotel('1000001000', 2, 0, 0, 35, 1, 'EUR', '/ScottHouse', '<font>Scott House Hotel</font>', 'Rome');

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<10; 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>Rome Hotels - Search Results</title>\r\n<link rel=stylesheet type=text/css href=cityStyles.css>\r\n');
	document.write('<script language=javascript src=rome.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%>');
	document.write('<tr><td><img src=romehotels.gif alt=\"Rome Hotels\"><span style="position: relative; left: -119px; top: -2px; font-size: 22px;"><nobr>Rome 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>');
	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>');
	document.write('<tr><td colspan=2><img src=b.gif width=1 height=4></td></tr>');
	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>');
	document.write('<b>Welcome to Rome, Italy!</b>');
	document.write(" We present one of the most comprehensive selections of hotels in Rome available through the web, with detailed information on the hotels&nbsp;  facilities, photos, maps, and secure reservation forms.<Br> Whether you\'re on a budget or looking for luxury accommodations in Rome, our Rome 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 of <a class=hotel href=http://www.hotelsitalyonline.com>hotelsitalyonline.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>");
	document.write('<TR><TD width=50% valign=top class=light><TABLE name=ALLHOTELS width=100% cellspacing=0 cellpadding=0 border=0>');
	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>');
	document.write('<td class=title align=left valign=top><img src=r1.gif width=14 height=9></td>');
	document.write('<td class=title> All Rome hotels</td><td align=right class=title><font class=a3>Currently <b>'+hotels.length+' hotels</b> available</font></td>');
	document.write('<td class=title align=right valign=top><img src=r2.gif width=14 height=9></td></table></td></tr>');
	document.write('<tr><td colspan=4 bgcolor=#333366><form name=theForm>');
	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">');
	document.write('<tr class=old><td colspan=4><img src=b.gif width=1 height=1></td></tr>');
	document.write('<tr class=old><td><img src=b.gif width=3 height=1></td>');
	document.write('<td><img src=arrow.gif width=4 height=7>&nbsp;&nbsp;&nbsp;Category</td>');
	document.write('<td align=center><select onchange="listHotels()" style="width:80px;" name=category>');
	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>');
	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>&nbsp;&nbsp;&nbsp;Location&nbsp;');
	document.write('<select style="width:160px;" name=location onchange="listHotels()">');
	document.write('<option value="0">all</option><option value="1" '+selLocation[1]+'>Colosseum & Roman Forum</option><option value="2" '+selLocation[2]+'>Pantheon</option><option value="3" '+selLocation[3]+'>Trevi Fountain</option><option value="4" '+selLocation[4]+'>Spanish Steps</option><option value="5" '+selLocation[5]+'>Borghese Gardens</option><option value="6" '+selLocation[6]+'>Termini Station</option><option value="7" '+selLocation[7]+'>Vatican</option><option value="8" '+selLocation[8]+'>Suburbs</option><option value="9" '+selLocation[9]+'>Out of city</option></select></td>');
	document.write('</select></td></tr>');
	document.write('<tr class=old><td><img src=b.gif width=3 height=1></td>');
	document.write('<td><img src=arrow.gif width=4 height=7>&nbsp;&nbsp;&nbsp;<nobr>Prices from</nobr></td>');
	document.write('<td align=center><select style="width:80px;" name=priceRange onchange="listHotels()">');
	document.write('<option value="all">all</option><option value="0" '+selPrice[0]+'>< &euro; 50</option><option value="50" '+selPrice[50]+'>&euro; 50 - &euro; 100</option><option value="100" '+selPrice[100]+'>&euro; 100 - &euro; 150</option>');
	document.write('<option value="150" '+selPrice[150]+'>&euro; 150 - &euro; 200</option><option value="200" '+selPrice[200]+'>> &euro; 200</option></select></td>');
	document.write('<td><table cellspacing=0 cellpadding=0 border=0 width=100% class=normal style="font-size:8pt">');
	document.write('<tr class=old><td width=50%><img src=b.gif width=10 height=1><img src=arrow.gif width=4 height=7>&nbsp;&nbsp;&nbsp;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>&nbsp;&nbsp;&nbsp;Business<img src=b.gif width=5 height=1><input type=checkbox name=business onclick="listHotels()" '+selBusiness+'>&nbsp;</td></tr>');
	document.write('</table></td></tr>');

//	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>&nbsp;&nbsp;&nbsp;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>&nbsp;&nbsp;&nbsp;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>');
	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>');
	document.write('</table name=allhotels></td><td><img src=b.gif width=10></td>');
	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>');
// 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%>');
	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>');
					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>');
					document.write('<tr><td colspan=9  align=left ><b class=h3>'+hotels[k].cat+'-star Rome hotels</b class=h3></td></tr><tr><td colspan=9><hr></td></tr>');
				}

// 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=top><a  href="'+hotels[k].dir+'" class=hotel>'+hotels[k].name+'</a></td><td valign=top> '+imgCen+ ' ' +imgFit + ' '+ imgBus + ' '+imgIns+ '  </td><td align=right valign=top>from</td><td align=right valign=top width=5%><b>&euro; '+hotels[k].price+'</b></td><td><img src=b.gif width=15 height=1></td>');
				}
				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=top><a  href="'+hotels[k].dir+'" class=hotel>'+hotels[k].name+'</a></td><td valign=top>  '+imgCen+ ' ' +imgFit + ' '+ imgBus + ' '+imgIns+ '  </td><td align=right valign=top>from</td><td align=right valign=top width=5% ><b>&euro; '+hotels[k].price+'</b></td></tr>');
				}
			}
		}	// 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>");
	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>');

//legenda

	document.write('</TABLE name=LAYOUT>');
	document.write('<img src=b.gif width=1 height=5><br><div align=center style="font:8pt;">&copy; 2003 Rome hotels</i></div>');
	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>');
	document.write('</body></html>');
}

