

//
// MapControls Class
// (Fungo's map conrols)
//
var MapControlList = Class.create
({
	initialize: function(id, map, source, multi)
	{
		this.id = id;
		this.map = map;
		this.controls = Array();
		this.source= source;
		this.multi = multi; // Multi selector true / false
	},
	
	
	SelectControl: function(id, value)
	{
		if(this.multi == false)
		{
			if(this.controls['id'])
				$(this.controls['id']).style.color = "black";
			
			this.controls['id'] = id;
			this.controls['value'] = value;
			
			// visual decoration
			$(this.id).style.color = "black";
			$(id).style.color = "red";
			//document.getElementById().style.col
			
		}


		this.map.dataXML =  this.source + this.GetString();
		this.map.LoadPoints();
	},
	
	//
	//	get parameters string of selection
	//
	GetString: function(){
		if (this.multi == false) {
			return "?" + this.id + "=" + this.controls['value'];
		}
	}
});

