function hotelinfo (hname, hlink,aaa)
{
	this.hname = hname;
	this.hlink = hlink;
	this.aaa=aaa;
	
}

hotels = new Array();
hotels[0] = new  hotelinfo("A-1 Motel","Niagara-Falls/a1/index.html","1");
hotels[1] = new  hotelinfo("Advantage Inn","Niagara-Falls/advantage/index.html","1");
hotels[2] = new  hotelinfo("Americana Resort","Niagara-Falls/americana/index.html","1");
hotels[3] = new  hotelinfo("Astons Michael's Inn","Niagara-Falls/michaels/index.html","1");
hotels[4] = new  hotelinfo("Best Inns &amp; Suites","Niagara-Falls/best/index.html","0");
hotels[5] = new  hotelinfo("Best Western Fallsview","Niagara-Falls/bestwestern/index.html","1");
hotels[6] = new  hotelinfo("The Niagara Falls Plaza","Niagara-Falls/parkplaza/index.html","0");
hotels[7] = new  hotelinfo("Candlelight Motor Inn","Niagara-Falls/candlelight/index.html","0");
hotels[8] = new  hotelinfo("Caravan Thriftlodge","Niagara-Falls/caravan/index.html","0");
hotels[9] = new  hotelinfo("Chalet Inn &amp; Suites","Niagara-Falls/chalet/index.html","1");
hotels[10] = new  hotelinfo("Clarion President Hotel","Niagara-Falls/clarion/index.html","1");
hotels[11] = new  hotelinfo("Comfort Inn Lundy's Lane","Niagara-Falls/comfort_lundy/index.html","1");
hotels[12] = new  hotelinfo("Waters Edge Inn","Niagara-Falls/watersedgeinn/index.html","1");
hotels[13] = new  hotelinfo("Diplomat Inn","Niagara-Falls/diplomat/index.html","0");
hotels[14] = new  hotelinfo("Econolodge Clifton Hill","Niagara-Falls/econo/index.html","0");
hotels[15] = new  hotelinfo("Econolodge Near the Falls","Niagara-Falls/econofalls/index.html","1");
hotels[16] = new  hotelinfo("Rodeway Inn","Niagara-Falls/rodeway/index.html","1");
hotels[17] = new  hotelinfo("Fairway Motor Inn","Niagara-Falls/fairway/index.html","0");
hotels[18] = new  hotelinfo("Falcon Inn","Niagara-Falls/falcon/index.html","0");
hotels[19] = new  hotelinfo("Falls Manor Motel","Niagara-Falls/manor/index.html","0");
hotels[20] = new  hotelinfo("Americas Best Value Inn","Niagara-Falls/bestvalueinn/index.html","1");
hotels[21] = new  hotelinfo("Happiness Inn","Niagara-Falls/happiness/index.html","0");
hotels[22] = new  hotelinfo("Holiday Inn by the Falls","Niagara-Falls/holidayinn_falls/index.html","1");
hotels[23] = new  hotelinfo("Howard Johnson Inn","Niagara-Falls/hojo_lundy/index.html","1");
hotels[24] = new  hotelinfo("E-Lodge near the falls","Niagara-Falls/elodge/index.html","0");
hotels[25] = new  hotelinfo("Inn by the Falls","Niagara-Falls/innbythefalls/index.html","0");
hotels[26] = new  hotelinfo("Kings Inn Near the Falls","Niagara-Falls/kings/index.html","1");
hotels[27] = new  hotelinfo("Knights Inn by the Falls","Niagara-Falls/knight_falls/index.html","1");
hotels[28] = new  hotelinfo("Knights Inn Lundy's Lane","Niagara-Falls/knight/index.html","1");
hotels[29] = new  hotelinfo("Melody Motel","Niagara-Falls/melody/index.html","0");
hotels[30] = new  hotelinfo("Niagara Inn Downtown","Niagara-Falls/niagarainn/index.html","0");
hotels[31] = new  hotelinfo("Niagara Inn Lundy's Lane","Niagara-Falls/niagarainnll/index.html","0");
hotels[32] = new  hotelinfo("Niagara Parkway Court","Niagara-Falls/niagaraparkway/index.html","1");
hotels[33] = new  hotelinfo("Niagara Riverview Inn","Niagara-Falls/nprv/index.html","0");
hotels[34] = new  hotelinfo("Oasis Inn near the Falls","Niagara-Falls/oasis/index.html","0");
hotels[35] = new  hotelinfo("Old Stone Inn","Niagara-Falls/oldstoneinn/index.html","1");
hotels[36] = new  hotelinfo("Niagara Family Inn","Niagara-Falls/niagarafamilyinn/index.html","1");
hotels[37] = new  hotelinfo("Quality Hotel near the Falls","Niagara-Falls/quality_hotel/index.html","1");
hotels[38] = new  hotelinfo("Radisson Fallsview Hotel","Niagara-Falls/radisson/index.html","1");
hotels[39] = new  hotelinfo("Ramada Plaza Fallsview","Niagara-Falls/ramada/index.html","1");
hotels[40] = new  hotelinfo("Renaissance Fallsview","Niagara-Falls/renaissance/index.html","1");
hotels[41] = new  hotelinfo("Seneca Motel","Niagara-Falls/seneca/index.html","0");
hotels[42] = new  hotelinfo("Sheraton Fallsview Hotel","Niagara-Falls/sheraton/index.html","1");
hotels[43] = new  hotelinfo("Villager Lodge","Niagara-Falls/villager/index.html","1");
hotels[44] = new  hotelinfo("Waldorf Motel","Niagara-Falls/waldorf/index.html","0");
hotels[45] = new  hotelinfo("Hilton Fallsview","Niagara-Falls/hilton/index.html","1");
hotels[46] = new  hotelinfo("Arkona Motel","Niagara-Falls/arkona/index.html","0");
hotels[47] = new  hotelinfo("Best Western Cairn Croft","Niagara-Falls/bestwestcairn/index.html","1");
hotels[48] = new  hotelinfo("Howard Johnson by the Falls","Niagara-Falls/hojobythefalls/index.html","1");
hotels[49] = new  hotelinfo("Days Inn North of Falls","Niagara-Falls/daysnorth/index.html","1");
hotels[50] = new  hotelinfo("Days Inn Fallsview District","Niagara-Falls/daysFallsD/index.html","1");
hotels[51] = new  hotelinfo("Hampton Inn North of Falls","Niagara-Falls/hampton/index.html","1");
hotels[52] = new  hotelinfo("Super 8 Hotel","Niagara-Falls/super8/index.html","1");
hotels[53] = new  hotelinfo("Bestwestern Fireside","Niagara-Falls/Bestfireside/index.html","1");
hotels[54] = new  hotelinfo("Lincoln Motor Inn Fallsview","Niagara-Falls/lincoln/index.html","1");
hotels[55] = new  hotelinfo("Carriage House Motor Inn ","Niagara-Falls/carriage/index.html","1");
hotels[56] = new  hotelinfo("Cascade Inn","Niagara-Falls/cascade/index.html","0");
hotels[57] = new  hotelinfo("Blue Moon Motel","Niagara-Falls/bluemoon/index.html","0");
hotels[58] = new  hotelinfo("Travelodge Bonaventure","Niagara-Falls/travelodge/index.html","1");
hotels[59] = new  hotelinfo("Willow Motel","Niagara-Falls/awillow/index.html","0");
hotels[60] = new  hotelinfo("Econolodge West of Falls","Niagara-Falls/econowest/index.html","0");
hotels[61] = new  hotelinfo("Stardust Inn","Niagara-Falls/stardust/index.html","0");
hotels[62] = new  hotelinfo("Hilton Garden Inn","Niagara-Falls/hiltongarden/index.html","1");
hotels[63] = new  hotelinfo("Days Inn Suites by the Falls","Niagara-Falls/days_suites_falls/index.html","1");
hotels[64] = new  hotelinfo("Glengate Hotel","Niagara-Falls/glengate/index.html","0");

hotelsUSA = new Array();
hotelsUSA[0] = new  hotelinfo("Howard Johnson closest to Falls","Niagara-Falls-USA/hojo_usa/index.html","1");
hotelsUSA[1] = new  hotelinfo("Four Points - Sheraton","Niagara-Falls-USA/fourpoints/index.html","1");


hotelsOnLake = new Array();
hotelsOnLake[0] = new  hotelinfo("Niagara College Residence","Niagara-on-the-Lake/niagara_college/index.html","0");
hotelsOnLake[1] = new  hotelinfo("Victorian Suites Inn","Niagara-on-the-Lake/victorian/index.html","1");
hotelsOnLake[2] = new  hotelinfo("White Oaks Resort","Niagara-on-the-Lake/whiteoaks/index.html","1");
hotelsOnLake[3] = new  hotelinfo("Hilton Garden Inn","Niagara-Falls/hiltongarden/index.html","1");

hotelsSouth = new Array();
hotelsSouth[0] = new  hotelinfo("Holiday Inn Fort Erie","Niagara-South/holidayinn/index.html","1");
hotelsSouth[1] = new  hotelinfo("Days Inn Welland","Niagara-South/daysinn_welland/index.html","1");

hotelsWest = new Array();
hotelsWest[0] = new  hotelinfo("Riverboat Motel","Niagara-West/riverboat/index.html","0");

hotelsOMBH = new Array();
hotelsOMBH[0] = new  hotelinfo("Hilton Garden Inn Burlington","Metro-Toronto/hiltongardeninn/index.html","1");


function doSort(a,b)
{
	if(a.hname.toUpperCase() < b.hname.toUpperCase())
		return -1;
	if(a.hname.toUpperCase() > b.hname.toUpperCase())
		return 1;
		
	return 0;
		
}

function doDisplay(number,index)
{
	hotels.sort(doSort);	
	hotelsUSA.sort(doSort);
	hotelsOnLake.sort(doSort);
	hotelsSouth.sort(doSort);
	hotelsWest.sort(doSort);
	hotelsOMBH.sort(doSort);
	if(index == 1)
	{
	switch(number)
	{
		case 1:
		for(i=0;i<hotels.length;i++)
		{
			document.write("<tr ONMOUSEOVER=\"this.bgColor = '#E8E8E0'\" ONMOUSEOUT=\"this.bgColor = 'white';\"><td align='left'><a href="+ hotels[i].hlink +">"+ hotels[i].hname + "</a></td>");
			if (hotels[i].aaa == "1")
				document.write("<td align='right'><img src='../../../images/aaa.gif'></td></tr>");
			else
				document.write("<td></td></tr>");
			
		}
		break;
		case 2:
		for(i=0;i<hotelsOnLake.length;i++)
		{
			document.write("<tr ONMOUSEOVER=\"this.bgColor = '#E8E8E0'\" ONMOUSEOUT=\"this.bgColor = 'white';\"><td align='left'><a href="+ hotelsOnLake[i].hlink +">"+ hotelsOnLake[i].hname + "</a></td>");
			if (hotelsOnLake[i].aaa == "1")
				document.write("<td align='right'><img src='../../../images/aaa.gif'></align></td></tr>");
			else
				document.write("<td></td></tr>");
		}
		break;
		case 3:
				for(i=0;i<hotelsUSA.length;i++)
		{
			document.write("<tr ONMOUSEOVER=\"this.bgColor = '#E8E8E0'\" ONMOUSEOUT=\"this.bgColor = 'white';\"><td align='left'><a href="+ hotelsUSA[i].hlink +">"+ hotelsUSA[i].hname + "</a></td>");
			if (hotelsUSA[i].aaa == "1")
				document.write("<td align='right'><img src='../../../images/aaa.gif'></align></td></tr>");
			else
				document.write("<td></td></tr>");
		}
		break;
		case 4:
				for(i=0;i<hotelsWest.length;i++)
		{
			document.write("<tr ONMOUSEOVER=\"this.bgColor = '#E8E8E0'\" ONMOUSEOUT=\"this.bgColor = 'white';\"><td align='left'><a href="+ hotelsWest[i].hlink +">"+ hotelsWest[i].hname + "</a></td>");
			if (hotelsWest[i].aaa == "1")
				document.write("<td align='right'><img src='../../../images/aaa.gif'></align></td></tr>");
			else
				document.write("<td></td></tr>");
		}
		break;
		case 5:
				for(i=0;i<hotelsSouth.length;i++)
		{
			document.write("<tr ONMOUSEOVER=\"this.bgColor = '#E8E8E0'\" ONMOUSEOUT=\"this.bgColor = 'white';\"><td align='left'><a href="+ hotelsSouth[i].hlink +">"+ hotelsSouth[i].hname + "</a></td>");
			if (hotelsSouth[i].aaa == "1")
				document.write("<td align='right'><img src='../../../images/aaa.gif'></align></td></tr>");
			else
				document.write("<td></td></tr>");
		}
		break;
		case 6:
				for(i=0;i<hotelsOMBH.length;i++)
		{
			document.write("<tr ONMOUSEOVER=\"this.bgColor = '#E8E8E0'\" ONMOUSEOUT=\"this.bgColor = 'white';\"><td align='left'><a href="+ hotelsOMBH[i].hlink +">"+ hotelsOMBH[i].hname + "</a></td>");
			if (hotelsOMBH[i].aaa == "1")
				document.write("<td align='right'><img src='../../../images/aaa.gif'></align></td></tr>");
			else
				document.write("<td></td></tr>");
		}
		break;
		
	}
	}
	else
	{
	switch(number)
	{
		case 1:
		for(i=0;i<hotels.length;i++)
		{
			document.write("<tr  ONMOUSEOVER=\"this.bgColor = '#E8E8E0'\" ONMOUSEOUT=\"this.bgColor = 'white';\"><td align='left'><a href=../../"+ hotels[i].hlink +">"+ hotels[i].hname + "</a></td>");
			if (hotels[i].aaa == "1")
				document.write("<td align='right'><img src='../../../images/aaa.gif'></td></tr>");
			else
				document.write("<td></td></tr>");
		}
		break;
		case 2:
		for(i=0;i<hotelsOnLake.length;i++)
		{
			document.write("<tr ONMOUSEOVER=\"this.bgColor = '#E8E8E0'\" ONMOUSEOUT=\"this.bgColor = 'white';\"><td><a href=../../"+ hotelsOnLake[i].hlink +">"+ hotelsOnLake[i].hname + "</a></td>");
			if (hotelsOnLake[i].aaa == "1")
				document.write("<td><img src='../../../images/aaa.gif'></align></td></tr>");
			else
				document.write("<td></td></tr>");
		}
		break;
		case 3:
				for(i=0;i<hotelsUSA.length;i++)
		{
			document.write("<tr ONMOUSEOVER=\"this.bgColor = '#E8E8E0'\" ONMOUSEOUT=\"this.bgColor = 'white';\"><td><a href=../../"+ hotelsUSA[i].hlink +">"+ hotelsUSA[i].hname + "</a></td>");
			if (hotelsUSA[i].aaa == "1")
				document.write("<td><img src='../../../images/aaa.gif'></align></td></tr>");
			else
				document.write("<td></td></tr>");
		}
		break;
		case 4:
				for(i=0;i<hotelsWest.length;i++)
		{
			document.write("<tr ONMOUSEOVER=\"this.bgColor = '#E8E8E0'\" ONMOUSEOUT=\"this.bgColor = 'white';\"><td><a href=../../"+ hotelsWest[i].hlink +">"+ hotelsWest[i].hname + "</a></td>");
			if (hotelsWest[i].aaa == "1")
				document.write("<td><img src='../../../images/aaa.gif'></align></td></tr>");
			else
				document.write("<td></td></tr>");
		}
		break;
		case 5:
				for(i=0;i<hotelsSouth.length;i++)
		{
			document.write("<tr ONMOUSEOVER=\"this.bgColor = '#E8E8E0'\" ONMOUSEOUT=\"this.bgColor = 'white';\"><td><a href=../../"+ hotelsSouth[i].hlink +">"+ hotelsSouth[i].hname + "</a></td>");
			if (hotelsSouth[i].aaa == "1")
				document.write("<td><img src='../../../images/aaa.gif'></align></td></tr>");
			else
				document.write("<td></td></tr>");
		}
		break;
		case 6:
				for(i=0;i<hotelsOMBH.length;i++)
		{
			document.write("<tr ONMOUSEOVER=\"this.bgColor = '#E8E8E0'\" ONMOUSEOUT=\"this.bgColor = 'white';\"><td><a href=../../"+ hotelsOMBH[i].hlink +">"+ hotelsOMBH[i].hname + "</a></td>");
			if (hotelsOMBH[i].aaa == "1")
				document.write("<td><img src='../../../images/aaa.gif'></align></td></tr>");
			else
				document.write("<td></td></tr>");
		}
		break;
		
	}
	}

}
