//Copyright (c) 2003 PAULGRANT.ON.CA Inc.
//http://paulgrant.on.ca

function GetPlace(iPlaceId, bReturn)
{
	var i		= 0;
	var oPlace	= null;

	for(i = 0; i < this.aPlaces.length; i++)
	{
		oPlace = this.aPlaces[ i ];
		if(!oPlace)
			break;

		if(oPlace.iPlaceId == iPlaceId)
		{
			if(!bReturn)
				document.write(oPlace.sPlaceName);
			else
				return oPlace.sPlaceName;
			break;
		}
	}
	return "";
}

function ShowPlaces(iDefault, bAll)
{
	var i		= 0;
	var oPlace	= null;

	document.writeln("<SELECT NAME='selPlace' CLASS='fontInput'>");

	if(bAll)
		document.writeln("<OPTION VALUE='0' " + ((0 == iDefault) ? " SELECTED " : "") + ">All");

	for(i = 0; i < this.aPlaces.length; i++)
	{
		oPlace = this.aPlaces[ i ];
		if(!oPlace)
			break;

		document.writeln("<OPTION VALUE='" + oPlace.iPlaceId + "' " + (((oPlace.iPlaceId > 0) && (oPlace.iPlaceId == iDefault)) ? " SELECTED " : "") + ">" + oPlace.sPlaceName);
	}

	document.writeln("</SELECT>");
}

function PlaceClass(a,b)
{
	this.iPlaceId	= ((a) ? a : 0);
	this.sPlaceName	= ((b) ? b : "");

	return this;
}

function AddLocation(a,b)
{
	this.aPlaces[ this.aPlaces.length ] = new PlaceClass(a,b);
}

function WorldClass()
{
	this.aPlaces	= new Array();

	this.AL			= AddLocation;
	this.ShowPlaces	= ShowPlaces;
	this.GetPlace	= GetPlace;

	return this;
}

var oWorld = new WorldClass("oWorld");

with(oWorld)
{
AL(1, 'Internet');

AL(0, '*** US States ***');

AL(101, 'Alabama');
AL(102, 'Alaska');
AL(103, 'Arizona');
AL(104, 'Arkansas');
AL(105, 'California');
AL(106, 'Colorado');
AL(107, 'Connecticut');
AL(108, 'Delaware');
AL(109, 'Florida');
AL(110, 'Georgia');

AL(111, 'Hawaii');
AL(112, 'Idaho');
AL(113, 'Illinois');
AL(114, 'Indiana');
AL(115, 'Iowa');
AL(116, 'Kansas');
AL(117, 'Kentucky');
AL(118, 'Louisiana');
AL(119, 'Maine');
AL(120, 'Maryland');

AL(121, 'Massachusetts');
AL(122, 'Michigan');
AL(123, 'Minnesota');
AL(124, 'Mississippi');
AL(125, 'Missouri');
AL(126, 'Montana');
AL(127, 'Nebraska');
AL(128, 'Nevada');
AL(129, 'New Hampshire');
AL(130, 'New Jersey');

AL(131, 'New Mexico');
AL(132, 'New York');
AL(133, 'North Carolina');
AL(134, 'North Dakota');
AL(135, 'Ohio');
AL(136, 'Oklahoma');
AL(137, 'Oregon');
AL(138, 'Pennsylvania');
AL(139, 'Rhode Island');
AL(140, 'South Carolina');

AL(151, 'South Dakota');
AL(141, 'Tennessee');
AL(142, 'Texas');
AL(143, 'Utah');
AL(144, 'Vermont');
AL(145, 'Virginia');
AL(146, 'Washington');
AL(147, 'West Virginia');
AL(148, 'Wisconsin');
AL(150, 'Wyoming');

AL(0, '*** Canada ***');

AL(201, 'Alberta');
AL(202, 'British Columbia');
AL(203, 'Manitoba');
AL(204, 'New Brunswick');
AL(205, 'Newfoundland');
AL(206, 'Northwest Territories');
AL(207, 'Nova Scotia');
AL(208, 'Nunavut');
AL(209, 'Ontario');
AL(210, 'Prince Edward Island');
AL(211, 'Quebec');
AL(212, 'Saskatchewan');
AL(213, 'Yukon');

AL(0, '*** World Wide ***');

AL(301, 'Australia');
AL(302, 'Belgium');
AL(303, 'Brazil');
AL(304, 'Chile');
AL(305, 'China');
AL(306, 'Denmark');
AL(307, 'England');
AL(308, 'France');
AL(309, 'Germany');
AL(310, 'Greece');
AL(311, 'Hong Kong');
AL(312, 'Hungary');
AL(313, 'Ireland');
AL(314, 'Italy');
AL(315, 'Japan');
AL(316, 'Malaysia');
AL(317, 'Mexico');
AL(318, 'New Zealand');
AL(319, 'Netherlands');
AL(320, 'Philippines');
AL(321, 'Poland');
AL(322, 'Scotland');
AL(323, 'Singapore');
AL(324, 'Spain');
AL(325, 'Sweden');
AL(326, 'Taiwan');
}

//End.

