function bookmark() {
	if (navigator.appName != "Microsoft Internet Explorer") { window.sidebar.addPanel('Dügün.net Anbieter', location.href, ''); }
	else { window.external.addFavorite(location.href, 'Dügün.net Anbieter') }
}

function change(name,id,max) {
  for (var i = 1; i <= max; i++) {
    if(document.getElementById(name+i)) document.getElementById(name+i).style.display = 'none';
  }
  if(document.getElementById(name+id)) document.getElementById(name+id).style.display = 'block';
}



var map = null;
var geocoder = null;

function showAddress(address) {
	if (geocoder) {
		geocoder.getLatLng(
		  address,
		  function(point) {
			if (!point) {
			  alert(address + " not found");
			} else {
			  map.setCenter(point, 14);
			  var marker = new GMarker(point);
			  map.addOverlay(marker);
			  marker.openInfoWindowHtml(address);
			}
		  }
		);
	}
}


function initialize() {
	if (GBrowserIsCompatible()) {
		map = new GMap2(document.getElementById("anfahrt"));
		map.setCenter(new GLatLng(37.4419, -122.1419), 14);
		geocoder = new GClientGeocoder();
		//showAddress('hamburg');
	}
}

function uploadfield() {
    var input = document.createElement('input');
    var br = document.createElement('br');
    input.setAttribute('type', 'file');
    input.setAttribute('name', 'files[]');
    document.getElementById('uploadbox').appendChild(input);
    document.getElementById('uploadbox').appendChild(br);
}

function textinsert(id, text) {
	document.getElementById(id).value = document.getElementById(id).value + text;
}
