function Mailto(Mailname) {
			
			var neuB = document.createElement("div");
			var neuh2 = document.createElement("h2");
			neuB.appendChild(neuh2);
			var neuimg = document.createElement("img");
			neuimg.src="fileadmin/library/ausgabe_png.php?type=postit&name=Notiz für "+Mailname;
			neuimg.alt="Notiz an "+Mailname;
			neuh2.appendChild(neuimg);
			//var neuh2Text = document.createTextNode("Mail an"+name);
			//neuB.appendChild(neuh2Text);
			
			var neuform = document.createElement("form");
			neuform.method = "post";
			neuform.name = "Mail";
			neuform.onsubmit = new Function("return CheckMailto()");
			neuform.action = "index.php?id=32"
			
			var neuinput1 = document.createElement("input");
			neuinput1.type = "hidden";
			neuinput1.name = "an";
			neuinput1.value = Mailname;
			neuform.appendChild(neuinput1);
			
			var neuinput1 = document.createElement("input");
			neuinput1.type = "hidden";
			neuinput1.name = "redirect";
			neuinput1.value = window.location.href;
			neuform.appendChild(neuinput1);
			
			var neuText1 = document.createTextNode("Von ");
			neuform.appendChild(neuText1);
			
			var neubr1 = document.createElement("br");
			neuform.appendChild(neubr1);
			
			var neuinput2 = document.createElement("input");
			neuinput2.type = "text";
			neuinput2.value = "Name";
			neuinput2.name = "von_name";
			neuinput2.onclick = new Function("this.select()");
			neuinput2.size = "20";
			neuform.appendChild(neuinput2);
			
			var neuinput2 = document.createElement("input");
			neuinput2.type = "text";
			neuinput2.value = "E-Mail";
			neuinput2.onclick = new Function("this.select()");
			neuinput2.name = "von_mail";
			neuinput2.size = "36";
			neuform.appendChild(neuinput2);
			
			var neubr1 = document.createElement("br");
			neuform.appendChild(neubr1);
			
			var neuText1 = document.createTextNode("Betreff ");
			neuform.appendChild(neuText1);
			
			var neubr1 = document.createElement("br");
			neuform.appendChild(neubr1);
			
			var neuinput2 = document.createElement("input");
			neuinput2.type = "text";
			neuinput2.name = "betreff";
			neuinput2.size = "59";
			neuform.appendChild(neuinput2);
			
			var neubr1 = document.createElement("br");
			neuform.appendChild(neubr1);
			
			var neuinput2 = document.createElement("textarea");
			neuinput2.name = "inhalt";
			neuinput2.rows = "7";
			neuinput2.cols = "60";
			neuform.appendChild(neuinput2);
			
			var neubr1 = document.createElement("br");
			neuform.appendChild(neubr1);
			
			var neuinput2 = document.createElement("input");
			neuinput2.value = "senden";
			neuinput2.type = "submit";
			neuform.appendChild(neuinput2);
			
			var neudiv = document.createElement("div");
			neudiv.className = "exit";
			
			var neua = document.createElement("a");
			neua.href="javascript:void(0)";
			neua.id
			neua.onclick = new Function("document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'");
			//neua.onclick="document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'";
			var neuimg = document.createElement("img");
			neuimg.alt = "exit";
			neuimg.src = "fileadmin/icons/exit.png";
			neua.appendChild(neuimg);
			neudiv.appendChild(neua);
			neuB.appendChild(neudiv);
			
			neuB.appendChild(neuform);
			neuB.id = "light";
			neuB.className = "white_content";
			document.getElementById("mitte").insertBefore(neuB, document.getElementById("inhalt_m"));
			
			var neuB = document.createElement("div");
			var neuBText = document.createTextNode(" hallo");
			neuB.appendChild(neuBText);
			neuB.id = "fade";
			neuB.className = "black_overlay";
			document.getElementById("mitte").insertBefore(neuB, document.getElementById("inhalt_m"));
			
			
			
			document.getElementById('light').style.display='block';
			document.getElementById('fade').style.display='block';

}

function CheckMailto() {
	if ((document.Mail.von_name.value == "") | (document.Mail.von_name.value == "Name")) {
		alert("Bitte gebe deinen Namen an!");
		document.Mail.von_name.focus();
		return false;
  }
	if (document.Mail.inhalt.value == "" ) {
		alert("Du hast leider vergessen deine Notiz einzutragen.");
		document.Mail.inhalt.focus();
		return false;
  }  

}

