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

var latValue = 43.351398;
var longValue = -84.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 = 0;
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='#The Antique Warehouse'>The Antique Warehouse</a>";
  				infoText = "1122 Tittabawassee Road - Saginaw 48604&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
  				myLL.setLatLng(43.47959,-83.93812);
  				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 = 7;
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:
  	/*Around the Farm Antiques*/
  				myLL.setLatLng(43.251958,-83.735445);
  				break;

			case 1:
  	/*Bloomin' Treasures  Antique Mall*/
  				myLL.setLatLng(43.25333,-83.735488);
  				break;

			case 2:
  	/*Antiques & Art*/
  				myLL.setLatLng(43.19903,-84.11036);
  				break;

			case 3:
  	/*Chesaning Antiques & Specialty Shops*/
  				myLL.setLatLng(43.187241,-84.149999);
  				break;

			case 4:
  	/*Adomaitis Antiques and Theatrics*/
  				myLL.setLatLng(43.417018,-83.963608);
  				break;

			case 5:
  	/*Brasseur Electric Trains*/
  				myLL.setLatLng(43.41715,-83.96379);
  				break;

			case 6:
  	/*Coin Lounge*/
  				myLL.setLatLng(43.41454,-84.0148);
  				break;

			case 7:
  	/*The Little House*/
  				myLL.setLatLng(43.417043,-83.963642);
  				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");
}

