function hotelinfo (hname, hlink)
{
	this.hname = hname;
	this.hlink = hlink;
}

hotels = new Array();
hotels[0] = new  hotelinfo("A-1 Motel","lundys/a1/index.html");
hotels[1] = new  hotelinfo("Advantage Inn","lundys/advantageinn/index.html");
hotels[2] = new  hotelinfo("Best Inn","lundys/bestinn/index.html");
hotels[3] = new  hotelinfo("Willow Motel","lundys/awillow/index.html");
hotels[4] = new  hotelinfo("Blue Moon Motel","lundys/bluemoon/index.html");
hotels[5] = new  hotelinfo("Caravan Motel","lundys/caravan/index.html");
hotels[6] = new  hotelinfo("Carriage Motor Inn","lundys/Carriage/index.html");
hotels[7] = new  hotelinfo("Comfort Inn","lundys/comfortinn/index.html");
hotels[8] = new  hotelinfo("Falcon Inn","lundys/falcon/index.html");
hotels[9] = new  hotelinfo("Falls Manor","lundys/fallsmanor/index.html");
hotels[10] = new  hotelinfo("Howard Johnson Express Inn","lundys/hojo_lundys/index.html");
hotels[11] = new  hotelinfo("Knights Inn","lundys/knightsinn/index.html");
hotels[12] = new  hotelinfo("Niagara Inn Motel","lundys/niagarainn/index.html");
hotels[13] = new  hotelinfo("Seneca Motol","lundys/seneca/index.html");
hotels[14] = new  hotelinfo("Villager Premier Candlelight Motel","lundys/Candlelight/index.html");
hotels[15] = new  hotelinfo("Voyageur Inn Motel","lundys/voyager/index.html");
hotels[16] = new  hotelinfo("Alpine Motel","lundys/alphine/index.html");
hotels[17] = new  hotelinfo("Arkona Motel","lundys/arkona/index.html");
hotels[18] = new  hotelinfo("Aston Villa Motel","lundys/astonvilla/index.html");
hotels[19] = new  hotelinfo("Bonanza Motel","lundys/bonanza/index.html");
hotels[20] = new  hotelinfo("Candlelight Motor Inn","lundys/Candlelight/index.html");
hotels[21] = new  hotelinfo("Dutch Inn","lundys/DutchInn/index.html");
hotels[22] = new  hotelinfo("Flamingo Motor Inn","lundys/Flamingo/index.html");
hotels[23] = new  hotelinfo("Fontaine Bleu Motel","lundys/fontaine/index.html");
hotels[24] = new  hotelinfo("Kingsway Motel","lundys/kingsway/index.html");
hotels[25] = new  hotelinfo("Maple Haven Motel","lundys/mapleheaven/index.html");
hotels[26] = new  hotelinfo("Overnight Inn","lundys/Overnight/index.html");
hotels[27] = new  hotelinfo("Rodeway Inn & Suites","lundys/RodewayInn/index.html");
hotels[28] = new  hotelinfo("Terrace Motel Court","lundys/terrace/index.html");
hotels[29] = new  hotelinfo("Space Motel","lundys/space/index.html");
hotels[30] = new  hotelinfo("Star Inn","lundys/star/index.html");
hotels[31] = new  hotelinfo("Three Diamond Inn","lundys/3diamond/index.html");
hotels[32] = new  hotelinfo("Thrift Lodge Caravan Motel","lundys/caravan/index.html");
hotels[33] = new  hotelinfo("Tropicana Inn Motel","lundys/tropicana/index.html");
hotels[34] = new  hotelinfo("Villager Lodge","lundys/villager/index.html");

 

hotelsOnLake= new Array();
hotelsOnLake[0] = new  hotelinfo("Camppark Resorts Camping","lundys/camppark/index.html");
hotelsOnLake[1] = new  hotelinfo("KOA Kampground","lundys/koa/index.html");
hotelsOnLake[2] = new  hotelinfo("Scotts Tent/Trailer Park","lundys/scotts/index.html");
 

hotelsUSA= new Array();
hotelsUSA[0] = new  hotelinfo("Ameri-Cana Resort","lundys/americana/index.html");
hotelsUSA[1] = new  hotelinfo("Best Western Cairn Croft Hotel","lundys/bestwestcairn/index.html");
hotelsUSA[2] = new  hotelinfo("Bonaventure Travelodge","lundys/Travelodge/index.html");
hotelsUSA[3] = new  hotelinfo("Comfort Inn Lundy's Lane","lundys/comfortinn/index.html");
hotelsUSA[4] = new  hotelinfo("Days Inn Lundy's Lane","lundys/daysinn/index.html");
hotelsUSA[5] = new  hotelinfo("Ramada Coral Resort Hotel","lundys/ramadacoral/index.html");
hotelsUSA[6] = new  hotelinfo("Ramada Suites Hotel ","lundys/ramadasuites/index.html");


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);	
	
	if(index == 1)
	{
	switch(number)
	{
		case 1:
		document.write("<tr><td><table cellpadding='2' cellspacing='5' border='0' width='100%'>");
		for(i=0;i<hotels.length;i++)
		{
			document.write("<font size='8'><tr><td><a href="+ hotels[i].hlink +"><font color='#ffffff'>"+hotels[i].hname + "</font></td></tr></font>");
		}
		document.write("</td></tr></table>");
		break;
		case 2:
				for(i=0;i<hotelsOnLake.length;i++)
		{
			document.write("<tr><td><a href="+ hotelsOnLake[i].hlink +"><font color='#ffffff'>"+ hotelsOnLake[i].hname + "</font></td></tr>");
		}
		break;
		case 3:
				for(i=0;i<hotelsUSA.length;i++)
		{
			document.write("<tr><td><a href="+ hotelsUSA[i].hlink +"><font color='#ffffff'>"+ hotelsUSA[i].hname + "</font></td></tr>");
		}
		break;
		case 4:
				for(i=0;i<hotelsWest.length;i++)
		{
			document.write("<tr><td><a href="+ hotelsWest[i].hlink +"><font color='#ffffff'>"+ hotelsWest[i].hname + "</font></td></tr>");
		}
		break;
		case 5:
				for(i=0;i<hotelsSouth.length;i++)
		{
			document.write("<tr><td><a href="+ hotelsSouth[i].hlink +"><font color='#ffffff'>"+ hotelsSouth[i].hname + "</font></td></tr>");
		}
		break;
		case 6:
				for(i=0;i<hotelsOMBH.length;i++)
		{
			document.write("<tr><td><a href="+ hotelsOMBH[i].hlink +"><font color='#ffffff'>"+ hotelsOMBH[i].hname + "</font></td></tr>");
		}
		break;
		
	}
	}
	else
	{
	switch(number)
	{
		case 1:
		for(i=0;i<hotels.length;i++)
		{
			document.write("<tr><td><a href=../../"+ hotels[i].hlink +"><font color='#ffffff'>"+ hotels[i].hname + "</font></td></tr>");
		}
		break;
		case 2:
				for(i=0;i<hotelsOnLake.length;i++)
		{
			document.write("<tr><td><a href=../../"+ hotelsOnLake[i].hlink +"><font color='#ffffff'>"+ hotelsOnLake[i].hname + "</font></td></tr>");
		}
		break;
		case 3:
				for(i=0;i<hotelsUSA.length;i++)
		{
			document.write("<tr><td><a href=../../"+ hotelsUSA[i].hlink +"><font color='#ffffff'>"+ hotelsUSA[i].hname + "</font></td></tr>");
		}
		break;
		case 4:
				for(i=0;i<hotelsWest.length;i++)
		{
			document.write("<tr><td><a href=../../"+ hotelsWest[i].hlink +"><font color='#ffffff'>"+ hotelsWest[i].hname + "</font></td></tr>");
		}
		break;
		case 5:
				for(i=0;i<hotelsSouth.length;i++)
		{
			document.write("<tr><td><a href=../../"+ hotelsSouth[i].hlink +"><font color='#ffffff'>"+ hotelsSouth[i].hname + "</font></td></tr>");
		}
		break;
		case 6:
				for(i=0;i<hotelsOMBH.length;i++)
		{
			document.write("<tr><td><a href=../../"+ hotelsOMBH[i].hlink +"><font color='#ffffff'>"+ hotelsOMBH[i].hname + "</font></td></tr>");
		}
		break;
		
	}
	}

}
