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

var latValue = 44.7631;
var longValue = -85.620598;
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='#Walt and Susan's Old Barn Antiques'>Walt and Susan's Old Barn Antiques</a>";
  				infoText = "2513 Nelson Road - Traverse City 49686&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
  				myLL.setLatLng(44.86159,-85.53151);
  				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 = 10;
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:
  	/*Antique Emporium*/
  				myLL.setLatLng(44.7565,-85.5555);
  				break;

			case 1:
  	/*Bay West Antiques*/
  				myLL.setLatLng(44.765923,-85.625265);
  				break;

			case 2:
  	/*Cherry Acres Antiques*/
  				myLL.setLatLng(44.86809,-85.53854);
  				break;

			case 3:
  	/*Don Butkovich Antiques&Appraisals*/
  				myLL.setLatLng(44.81737,-85.56881);
  				break;

			case 4:
  	/*Dorothy Jean*/
  				myLL.setLatLng(44.764062,-85.622757);
  				break;

			case 5:
  	/*Ella's Vintage Clothing & Collectibles*/
  				myLL.setLatLng(44.764081,-85.620814);
  				break;

			case 6:
  	/*Rickman's Antique Furniture Showroom*/
  				myLL.setLatLng(44.75575,-85.59789);
  				break;

			case 7:
  	/*Rolling Hills Antiques*/
  				myLL.setLatLng(44.76649,-85.67645);
  				break;

			case 8:
  	/*The Furniture Masters*/
  				myLL.setLatLng(44.732888,-85.605598);
  				break;

			case 9:
  	/*Union Antiques*/
  				myLL.setLatLng(44.76297,-85.62383);
  				break;

			case 10:
  	/*Wilson Antiques*/
  				myLL.setLatLng(44.763781,-85.623845);
  				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");
}

