function onlyint(givenobject) {
	text=givenobject.value;
	ergebnis="";
	for(i=0;i<text.length;i++){
		check=(text.charCodeAt(i)>=48)&&(text.charCodeAt(i)<=57);
		if (check)
			{ergebnis+=text.charAt(i);}
	}
	givenobject.value=ergebnis;
}

function gaestebuchsubmit(formularobjekt){
	if (formularobjekt.name0.value=="") alert ("Bitte geben Sie einen Namen ein!");
	else {
	if (formularobjekt.wohnort.value=="") alert ("Bitte geben Sie Ihren Wohnort an!");
	else{
	if (formularobjekt.eintrag.value=="") alert ("Bitte schreiben Sie einen Eintrag!");
	else {
		setpost(formularobjekt.name0);
		setpost(formularobjekt.wohnort);
		setpost(formularobjekt.eintrag);
		formularobjekt.submit();
	}}}
}

function setpost(givenobject)
  {
  	temp=givenobject.value;
	temp2 = temp;

	temp=temp.replace("<script","<");
	while (temp2 != temp){
		temp2 = temp;
		temp = temp.replace("<script","<");
	}
	temp = temp.replace("script>",">");
	while (temp2 != temp){
		temp2 = temp;
		temp = temp.replace("script>",">");
	}
	temp = temp.replace("& ","&amp; ");
	while (temp2 != temp){
		temp2 = temp;
		temp = temp.replace("& ","&amp; ");
	}
	temp = temp.replace("€","&euro; ");
	while (temp2 != temp){
		temp2 = temp;
		temp = temp.replace("€","&euro; ");
	}
	temp = temp.replace("ö","&ouml;");
	while (temp2 != temp){
		temp2 = temp;
		temp = temp.replace("ö","&ouml;");
	}
	temp = temp.replace("ä","&auml;");
	while (temp2 != temp){
		temp2 = temp;
		temp = temp.replace("ä","&auml;");
	}
	temp = temp.replace("ü","&uuml;");
	while (temp2 != temp){
		temp2 = temp;
		temp = temp.replace("ü","&uuml;");
	}
	temp = temp.replace("Ä","&Auml;");
	while (temp2 != temp){
		temp2 = temp;
		temp = temp.replace("Ä","&Auml;");
	}
	temp = temp.replace("Ü","&Uuml;");
	while (temp2 != temp){
		temp2 = temp;
		temp = temp.replace("Ü","&Uuml;");
	}
	temp = temp.replace("Ö","&Ouml;");
	while (temp2 != temp){
		temp2 = temp;
		temp = temp.replace("Ö","&Ouml;");
	}
	temp = temp.replace("ß","&szlig;");
	while (temp2 != temp){
		temp2 = temp;
		temp = temp.replace("ß","&szlig;");
	}
	temp = temp.replace("\"","&quot;");
	while (temp2 != temp){
		temp2 = temp;
		temp = temp.replace("\"","&quot;");
	}
	temp = temp.replace("\'","&lsquo;");
	while (temp2 != temp){
		temp2 = temp;
		temp = temp.replace("\'","&lsquo;");
	}
	temp = temp.replace("‘","&lsquo;");
	while (temp2 != temp){
		temp2 = temp;
		temp = temp.replace("‘","&lsquo;");
	}
	temp = temp.replace("\\","/");
	while (temp2 != temp){
		temp2 = temp;
		temp = temp.replace("\\","/");
	}
	temp = temp.replace("<br>","\n");
	while (temp2 != temp){
		temp2 = temp;
		temp = temp.replace("<br>","\n");
	}
	temp = temp.replace("\r","");
	while (temp2 != temp){
		temp2 = temp;
		temp = temp.replace("\r","");
	}
	zeilen=temp2.split("\n");
	temp3="";
	for (i=0;i<zeilen.length;i++){
		if (i==0) temp3+=zeilen[i];
		else temp3+="<br>\n"+zeilen[i];
	}
	givenobject.value=temp3;
  }