function replaceRegExp(txt) {
	if (txt) {
	    txt = txt.replace("ß", "&szlig;");
	    txt = txt.replace("ü", "&uuml;");
	    txt = txt.replace("ä", "&auml;");
	    txt = txt.replace("ö", "&ouml;");
	    txt = txt.replace("Ü", "&Uuml;");
	    txt = txt.replace("Ö", "&Ouml;");
	    txt = txt.replace("Ä", "&Auml;");
	    txt = txt.replace("é", "&eacute;");
	    txt = txt.replace("É", "&Eacute;");
	    txt = txt.replace("È", "&Egrave;");
	    txt = txt.replace("è", "&egrave;");
	    txt = txt.replace("À", "&Agrave;");
	    txt = txt.replace("Á", "&Aacute;");
	    txt = txt.replace("à", "&agrave;");
	    txt = txt.replace("á", "&aacute;");
	    txt = txt.replace("â", "&acirc;");
	    txt = txt.replace("ç", "&ccedil;");
	    txt = txt.replace("ê", "&ecirc;");
	    txt = txt.replace("½", "&frac12;");
	    txt = txt.replace("Ø", "&Oslash;");
	}
    return txt;
}

function entity2char(txt) {
	if (txt) {
	    txt = txt.replace("&szlig;", "ß");
	    txt = txt.replace("&uuml;", "ü");
	    txt = txt.replace("&auml;", "ä");
	    txt = txt.replace("&ouml;", "ö");
	    txt = txt.replace("&Uuml;", "Ü");
	    txt = txt.replace("&Ouml;", "Ö");
	    txt = txt.replace("&Auml;", "Ä");
	    txt = txt.replace("&eacute;", "é");
	    txt = txt.replace("&Eacute;", "É");
	    txt = txt.replace("&Egrave;", "È");
	    txt = txt.replace("&egrave;", "è");
	    txt = txt.replace("&Agrave;", "À");
	    txt = txt.replace("&Aacute;", "Á");
	    txt = txt.replace("&agrave;", "à");
	    txt = txt.replace("&aacute;", "á");
	    txt = txt.replace("&acirc;", "â");
	    txt = txt.replace("&ccedil;", "ç");
	    txt = txt.replace("&ecirc;", "ê");
	    txt = txt.replace("&frac12;", "½");
	    txt = txt.replace("&Oslash;", "Ø");
	}
    return txt;
}

function char2entityRecommendation(txt) {
	if (txt) {
	    txt = txt.replace("ß", "szlig");
	    txt = txt.replace("ü", "uuml");
	    txt = txt.replace("ä", "auml");
	    txt = txt.replace("ö", "ouml");
	    txt = txt.replace("Ü", "Uuml");
	    txt = txt.replace("Ö", "Ouml");
	    txt = txt.replace("Ä", "Auml");
	    txt = txt.replace("é", "eacute");
	    txt = txt.replace("É", "Eacute");
	    txt = txt.replace("È", "Egrave");
	    txt = txt.replace("è", "egrave");
	    txt = txt.replace("À", "Agrave");
	    txt = txt.replace("Á", "Aacute");
	    txt = txt.replace("à", "agrave");
	    txt = txt.replace("á", "aacute");
	    txt = txt.replace("ç", "ccedil");
	    txt = txt.replace("ê", "ecirc");
	    txt = txt.replace("½", "frac12");
	    txt = txt.replace("Ø", "Oslash");
	}
    return txt;
}

function char2Swiss(txt){
	if(txt){
		txt = txt.replace(/ß/g, "ss");
		txt = txt.replace(/&szlig;/g, "ss");
	}
	return txt;
}
