

function SearchForm()
{
	this.centerLat = 0;
	
	this.areas = new Object();
	this.areas.typ = false;
	
	this.init = function()
	{

	}
	
	this.switchArea = function(area)
	{
		if(this.areas['area'] == true)
		{
			$('searchFormArea-'+area).style.display = "none";
			this.areas['area'] = false;
		}
		else
		{
			$('searchFormArea-'+area).style.display = "block";
			this.areas['area'] = true;
		}
	}
	
	this.switchSubRegions = function(mode)
	{
		if(mode == 'list')
		{
			$('searchFormSubRegions-List').style.display = "block";
			$('searchFormSubRegions-Checkboxes').style.display = "none";
		}
		if(mode == 'checkboxes')
		{
			$('searchFormSubRegions-List').style.display = "none";
			$('searchFormSubRegions-Checkboxes').style.display = "block";
		}
	}
	
	this.changeSubRegionDropdown = function(regionId, value)
	{
		if(value=="x")
		{
			new Ajax.Updater("region-List", "/suche/ajax.regionlist.php?regionId="+regionId, {
		        method: "get",
		    });
		}
	}
	
	this.highlightMarker = function(marker, color)
	{

	}
	
	this.changeRegion = function(regionId)
	{
		new Ajax.Updater("region-List", "/suche/ajax.regiondropdown.php?regionId="+regionId, {
	        method: "get",
	    });
	}
}
