var paySites = new MQA.ShapeCollection();
var freeSites = new MQA.ShapeCollection();

var latValue = 42.972;
var longValue = -86.05;
function initMap() {
	//  TODO: NEED TO FILL IN 'COUNTY' COORDINATES
	myMap = new MQA.TileMap(document.getElementById('mapWindow'),7,new MQA.LatLng(latValue,longValue),"map");
	myMap.addControl(new MQA.LargeZoomControl());
	initFreeSites();
	initPaySites();
	myMap.addShapeCollection(freeSites);
	myMap.addShapeCollection(paySites);
}

var paySiteCount = 6;
function initPaySites() {
	for(var intX = 0; intX <= paySiteCount; intX ++) {
		var myIcon = new MQA.Icon("http://www.mi-antiques.com/images/payStore.gif",18,18);
		var myAltIcon = new MQA.Icon("http://www.mi-antiques.com/images/payStore.gif",18,18);
		var strText = '';
		var infoText = '';
		var myLL = new MQA.LatLng(0,0);
		switch (intX) {
			case 0:
  				strText = "<a href='#Antiques, Etc.'>Antiques, Etc.</a>";
  				infoText = "383 Central Ave - Holland 49423&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
  				myLL.setLatLng(42.78313,-86.10716);
  				break;

			case 1:
  				strText = "<a href='#Harvest Antiques & Collectibles'>Harvest Antiques & Collectibles</a>";
  				infoText = "12330 James St. - Holland 49424&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
  				myLL.setLatLng(42.81208,-86.085795);
  				break;

			case 2:
  				strText = "<a href='#S & P Small Treasures'>S & P Small Treasures</a>";
  				infoText = "P.O. Box 2241 - Holland 49422&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
  				myLL.setLatLng(42.7902,-86.099);
  				break;

			case 3:
  				strText = "<a href='#Washington Square Antiques At Nob Hill'>Washington Square Antiques At Nob Hill</a>";
  				infoText = "4585 60th St. - Holland 49423&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
  				myLL.setLatLng(42.753042,-86.136614);
  				break;

			case 4:
  				strText = "<a href='#Depot Antiques'>Depot Antiques</a>";
  				infoText = "14599 Cleveland (M-104) - Spring Lake 49456&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
  				myLL.setLatLng(43.073952,-86.149927);
  				break;

			case 5:
  				strText = "<a href='#Spring Lake Antique Mall'>Spring Lake Antique Mall</a>";
  				infoText = "801 W Savidge St. (M-104) - Spring Lake 49456&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
  				myLL.setLatLng(43.0767,-86.20684);
  				break;

			case 6:
  				strText = "<a href='#Lake Shore Antiques'>Lake Shore Antiques</a>";
  				infoText = " 10300 West Olive Road (US-31) - West Olive 49460&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
  				myLL.setLatLng(42.954745,-86.169203);
  				break;
		}
		var myPOI = new MQA.Poi(myLL);
		myPOI.setValue('icon', myIcon);
		myPOI.setValue('altIcon', myAltIcon);
		myPOI.setValue('labelText', strText + " - Antique Stores");
		myPOI.setValue('infoTitleHTML', strText);
		myPOI.setValue('infoContentHTML', infoText);
		myPOI.setValue('labelVisible', false);
		paySites.add(myPOI);
	}
	paySites.setName("Antiques Stores");
}

var feeSiteCount = 9;
function initFreeSites() {
	for(var intX = 0; intX <= feeSiteCount; intX ++) {
		var myIcon = new MQA.Icon("http://www.mi-antiques.com/images/fspoint.gif",10,10);
		var myAltIcon = new MQA.Icon("http://www.mi-antiques.com/images/fspoint.gif",10,10);
		var strText = '';
		var myLL = new MQA.LatLng(0,0);
		switch (intX) {
			case 0:
  	/*The Re-Find Shoppe*/
  				myLL.setLatLng(43.059891,-85.933362);
  				break;

			case 1:
  	/*Lemongrass Home LLC*/
  				myLL.setLatLng(43.06103,-86.224611);
  				break;

			case 2:
  	/*Parsley, Rosemary, Sage & Thyme*/
  				myLL.setLatLng(43.06206,-86.22274);
  				break;

			case 3:
  	/*West Michigan Antique Mall*/
  				myLL.setLatLng(43.010038,-86.204788);
  				break;

			case 4:
  	/*Boonstra Coin & Stamp*/
  				myLL.setLatLng(42.80611,-86.10268);
  				break;

			case 5:
  	/*Cottage Corner*/
  				myLL.setLatLng(42.791,-86.109);
  				break;

			case 6:
  	/*Holland Coin & Jewelry*/
  				myLL.setLatLng(42.812044,-86.08979);
  				break;

			case 7:
  	/*Macatawa Bait Company*/
  				myLL.setLatLng(42.7668,-86.1095);
  				break;

			case 8:
  	/*The Wooden Shoe Antique Mall*/
  				myLL.setLatLng(42.781861,-86.080587);
  				break;

			case 9:
  	/*Maple Valley Antiques*/
  				myLL.setLatLng(43.01424,-85.89225);
  				break;
		}
		var myPOI = new MQA.Poi(myLL);
		myPOI.setValue('icon', myIcon);
		myPOI.setValue('altIcon', myAltIcon);
		myPOI.setValue('altStateFlag', false);
		myPOI.setValue('labelText', '');
		myPOI.setValue('infoTitleHTML', strText);
		myPOI.setValue('infoContentHTML', '');
		myPOI.setValue('labelVisible', false);
		myPOI.setValue('rolloverEnabled', false);
		freeSites.add(myPOI);
	}
	freeSites.setName("Antiqes Stores");
}

