
// TESTSTART

         // ==== toggleLayer adds and removes the layers ====
      function toggleLayer(i) {
        if (layers[i].Visible) {
          layers[i].hide();
        } else {
          if(layers[i].Added) {
            layers[i].show();
          } else {
            map.addOverlay(layers[i]);
            layers[i].Added = true;
          }
        }
        layers[i].Visible = !layers[i].Visible;
      }


// TESTENDE
function LayerControl(opts) {
		this.opts = opts;
	}
	LayerControl.prototype = new GControl();

	LayerControl.prototype.initialize = function(map) {
		var container = document.createElement("div");

		container.style.border = "2px solid black";
		container.style.fontSize = "12px";
		container.style.fontFamily = "Arial, sans-serif";
		container.style.width = "80px";
		container.style.backgroundColor = "#ffffff";
		container.innerHTML = '<center><b>Optionen<\/b><\/center>';
		for (var i = 0; i < this.opts.length; i++) {
			if (layers[i].Visible) {
				var c = 'checked';
			} else {
				var c = '';
			}

			container.innerHTML += '<input type="checkbox" onclick="toggleLayer(' + i + ')" ' + c + ' /> ' + this.opts[i] + '<br>';
		}

		map.getContainer().appendChild(container);

		setTimeout("map.removeControl(LayerControl)", 15);

		return container;
	}
	LayerControl.prototype.getDefaultPosition = function() {
		return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(8, 32));
	}

function waslos() {
alert(this.form.anbieterart.options[this.form.anbieterart.selectedIndex].value);

updateMarkers();
}

