function FlashMap(lcId, bEnablePolygonSelect, proxy)
{
	this.lcId = lcId;
	this.bEnablePolygonSelect = bEnablePolygonSelect;
	this.proxy = proxy;
}

FlashMap.prototype.readViewStateTags = function()
{
	this.movie = document.getElementsByName(this.lcId)[0];
	this.hiddenXMin = document.getElementsByName("hiddenxmin_" + this.lcId)[0];
	this.hiddenXMax = document.getElementsByName("hiddenxmax_" + this.lcId)[0];
	this.hiddenYMin = document.getElementsByName("hiddenymin_" + this.lcId)[0];
	this.hiddenYMax = document.getElementsByName("hiddenymax_" + this.lcId)[0];
	this.hiddenZoomLevel = document.getElementsByName("hiddenzoomlevel_" + this.lcId)[0];
	this.hiddenOverView = document.getElementsByName("hiddenoverview_" + this.lcId)[0];
	if ( this.bEnablePolygonSelect )
	{
		this.hiddenSelectedPoly = document.getElementsByName("hiddenselectedpoly_" + this.lcId)[0];
	}
}

FlashMap.prototype.writeViewStateTags = function(xmin, xmax, ymin, ymax, zoom, overview, selPoly)
{
	document.write("<input type=hidden name=hidden_" + this.lcId + " value=1>");
	document.write("<input type=hidden name=hiddenxmin_" + this.lcId + " value='"+xmin+"'>");
	document.write("<input type=hidden name=hiddenxmax_" + this.lcId + " value='"+xmax+"'>");
	document.write("<input type=hidden name=hiddenymin_" + this.lcId + " value='"+ymin+"'>");
	document.write("<input type=hidden name=hiddenymax_" + this.lcId + " value='"+ymax+"'>");
	document.write("<input type=hidden name=hiddenoverview_" + this.lcId + " value='"+overview+"'>");
	document.write("<input type=hidden name=hiddenzoomlevel_" + this.lcId + " value='"+zoom+"'>");
	if ( this.bEnablePolygonSelect )
	{
		document.write("<input type=hidden name=hiddenselectedpoly_" + this.lcId + " value='"+selPoly+"'>");
	}
}

