function hideShow(b1, b2) {
	// {{{
	if(!document.getElementById(b1)) {
		alert(b1+ ' nicht vorhanden' );
		return;
	}
	if(!document.getElementById(b2)) {
		alert(b2+ ' nicht vorhanden' );
		return;
	}
	new Effect.Fade(b1, {duration:0.2, queue: 'end'});
	new Effect.Appear(b2, {duration:0.2, queue: 'end'});
	// }}}
}

var lastEditButtonsId = '';
function showEditButtons(id) {
	// {{{
	if(lastEditButtonsId==id) return;
	if(lastEditButtonsId!='') {
		//new Effect.Fade('c3_'+lastEditButtonsId, {duration: 0.2, queue: 'end'});
		document.getElementById('c3_'+lastEditButtonsId).style.display = 'none';
		document.getElementById('c2_'+lastEditButtonsId).style.borderBottom="1px solid white"; 
		lastEditButtonsId = '';
	}
	document.getElementById('c2_'+id).style.borderBottom="1px solid #FFD493";
	//new Effect.Appear('c3_'+id, {duration:0.2, queue: 'end'});
	document.getElementById('c3_'+id).style.display = 'block';
	lastEditButtonsId = id;
	// }}}
}
function addNewFile(id, file, view) {
	// {{{
	document.getElementById('filelist_'+id).value += "|uploads/"+file;
	var f = document.getElementById('filelist_'+id).value.split('|');
	var html = "";
	var img = "";
	for(var i=0;i<f.length;i++) {
		if(f[i]!='') {
			if(view=='single') img = '';
			img += "<img src='"+f[i]+"' width=150><br/>";
		}
	}
	html += img;
	document.getElementById('upload_'+id).innerHTML = html;
	// }}}
}

var otherPointList = new Array();
function goToViewPoint(id,lat,lng,lat_view, lng_view, zoom, points) {
	// {{{
	
	if(otherPointList.length>0) {
		
		for(var i=0;i<otherPointList.length;i++) {
			viewMap.removeOverlay(otherPointList[i]);
		}
		
		otherPointList = new Array();
	}
	
	var p2 = points.split(';');
	for(var i=0;i<p2.length;i++) {
		p3 = p2[i].split('|');
		
		var baseIcon = new GIcon(G_DEFAULT_ICON);
		baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
		baseIcon.iconSize = new GSize(20, 34);
		baseIcon.shadowSize = new GSize(37, 34);
		baseIcon.iconAnchor = new GPoint(9, 34);
		baseIcon.infoWindowAnchor = new GPoint(9, 2);

		
		
		var letter = String.fromCharCode("A".charCodeAt(0) + (i+1));
		var letteredIcon = new GIcon(baseIcon);
		letteredIcon.image = "http://www.google.com/mapfiles/marker" + letter + ".png";

		// Set up our GMarkerOptions object
		markerOptions = { icon:letteredIcon };
		
		
		
		
		var point = new GLatLng(p3[0], p3[1]);
		otherPointList[i] = new GMarker(point, markerOptions);
		viewMap.addOverlay(otherPointList[i]);
	}
	
	GEvent.trigger(marker[id],'click');
	viewMap.setCenter(new GLatLng(lat_view,lng_view),zoom*1);
	
	// }}}
}




