function display(what){
	var doc = document.getElementById(what);
	if(doc.style.display == "none"){
		doc.style.display = "inline";
	}
	else if(doc.style.display == "block" || doc.style.display == "inline"){
		doc.style.display = "none";
	}
	else if(doc.style.display == ""){
		doc.style.display = "inline";
	}
}

function merkzettelLink(what,neonblueid){
	if(document.getElementById(what).firstChild.nodeValue == "Objekt merken" || document.getElementById(what).firstChild.nodeValue == "Note it"){
		if(document.getElementById(what).firstChild.nodeValue == "Objekt merken"){
			$j("a#" + what).html("gemerkt");
		}else{
			$j("a#" + what).html("noted");
		}
		$j.ajax({
			type: "GET", 
			url: "notebook-teaser.php",
			data: "opt=add&neonblueid=" + neonblueid, 
			success: function(msg){
				$j('#leafletTeaser').html(msg);
			}
		});
		return true;
	}
	if (document.getElementById(what).firstChild.nodeValue == "gemerkt" || document.getElementById(what).firstChild.nodeValue == "Noted"){
		if (document.getElementById(what).firstChild.nodeValue == "gemerkt"){
			$j("a#" + what).html("Objekt merken");
		}else{
			$j("a#" + what).html("note it");
		}
		$j.ajax({
			type: "GET", 
			url: "notebook-teaser.php",
			data: "opt=del&neonblueid=" + neonblueid, 
			success: function(msg){
				$j('#leafletTeaser').html(msg);
			}
		});
		return true;
	}
}

function merkzettel(what,neonblueid,notiz) {
	if (document.getElementById(what).src.substr(document.getElementById(what).src.length-11, 11) == "merken1.jpg") {
	//if (document.getElementById(what).firstChild.nodeValue == "dieses Objekt merken") {
		document.getElementById(what).src = document.getElementById(what).src.replace("merken1.jpg","merken2.jpg");
		//$j("a#" + what).html("gemerkt");
		$j.ajax({
			type: "GET", 
			url: "notebook-teaser.php",
			data: "opt=add&neonblueid=" + neonblueid + "&note=" + notiz, 
			success: function(msg){
				$j('#leafletTeaser').html(msg);
			}
		});
		return true;
	}
	if (document.getElementById(what).src.substr(document.getElementById(what).src.length-11, 11) == "merken2.jpg") {
	//if (document.getElementById(what).firstChild.nodeValue == "gemerkt") {
		document.getElementById(what).src = document.getElementById(what).src.replace("merken2.jpg","merken1.jpg");
		//$j("a#" + what).html("dieses Objekt merken");
		$j.ajax({
			type: "GET", 
			url: "notebook-teaser.php",
			data: "opt=del&neonblueid=" + neonblueid + "&note=" + notiz, 
			success: function(msg){
				$j('#leafletTeaser').html(msg);
			}
		});
		return true;
	}
	if (document.getElementById(what).firstChild.nodeValue == "Objekt merken") {
		$j("a#" + what).html("gemerkt");
		$j.ajax({
			type: "GET", 
			url: "notebook-teaser.php",
			data: "opt=add&neonblueid=" + neonblueid + "&note=" + notiz, 
			success: function(msg){
				$j('#leafletTeaser').html(msg);
			}
		});
		return true;
	}
	if (document.getElementById(what).firstChild.nodeValue == "gemerkt") {
		$j("a#" + what).html("Objekt merken");
		$j.ajax({
			type: "GET", 
			url: "notebook-teaser.php",
			data: "opt=del&neonblueid=" + neonblueid + "&note=" + notiz, 
			success: function(msg){
				$j('#leafletTeaser').html(msg);
			}
		});
		return true;
	}
	return false;
}

function merkzettel2(neonblueid) {
	$j.ajax({
		type: "GET", 
		url: "notebook-teaser.php",
		data: "opt=del&neonblueid=" + neonblueid, 
		success: function(msg){
			$j('#leafletTeaser').html(msg);
		}
	});
	setTimeout("location.reload(true)",500);
}

