function parseDiacritice(id){
	var x = document.getElementById(id).value;
//	alert(x.indexOf(String.fromCharCode(8211)));
	x = x.replace(new RegExp(String.fromCharCode(351),"g"),"&#351;");
	x = x.replace(new RegExp(String.fromCharCode(350),"g"),"&#350;");
	x = x.replace(new RegExp(String.fromCharCode(355),"g"),"&#355;");
	x = x.replace(new RegExp(String.fromCharCode(354),"g"),"&#354;");
	x = x.replace(new RegExp(String.fromCharCode(259),"g"),"&#259;");
	x = x.replace(new RegExp(String.fromCharCode(258),"g"),"&#258;");
	x = x.replace(new RegExp(String.fromCharCode(238),"g"),"&icirc;");
	x = x.replace(new RegExp(String.fromCharCode(206),"g"),"&Icirc;");
	x = x.replace(new RegExp(String.fromCharCode(226),"g"),"&acirc;");
	x = x.replace(new RegExp(String.fromCharCode(194),"g"),"&Acirc;");
	x = x.replace(new RegExp(String.fromCharCode(160),"g"), "&#160;");
	x = x.replace(new RegExp(String.fromCharCode(227),"g"), "&#227;");
	// ndash	
	x = x.replace(new RegExp(String.fromCharCode(150),"g"), "&#150;");
	x = x.replace(new RegExp(String.fromCharCode(8211),"g"), "&#150;");
	// mdash
	x = x.replace(new RegExp(String.fromCharCode(151),"g"), "&#151;");
	x = x.replace(new RegExp(String.fromCharCode(8212),"g"), "&#151;");
	// bdquo
	x = x.replace(new RegExp(String.fromCharCode(132),"g"), "&#132;");
	x = x.replace(new RegExp(String.fromCharCode(8222),"g"), "&#132;");
	// bullet
	x = x.replace(new RegExp(String.fromCharCode(149),"g"), "&#149;");
	x = x.replace(new RegExp(String.fromCharCode(8226),"g"), "&#149;");
	// ldquo
	x = x.replace(new RegExp(String.fromCharCode(147),"g"), "&#147;");
	x = x.replace(new RegExp(String.fromCharCode(8220),"g"), "&#147;");
	// rdquo
	x = x.replace(new RegExp(String.fromCharCode(148),"g"), "&#148;");
	x = x.replace(new RegExp(String.fromCharCode(8221),"g"), "&#148;");
	// lsquo
	x = x.replace(new RegExp(String.fromCharCode(145),"g"), "&#145;");
	x = x.replace(new RegExp(String.fromCharCode(8216),"g"), "&#145;");
	// rsquo
	x = x.replace(new RegExp(String.fromCharCode(146),"g"), "&#146;");
	x = x.replace(new RegExp(String.fromCharCode(8217),"g"), "&#146;");
	// apostrof single quot
	x = x.replace(new RegExp(String.fromCharCode(39),"g"), "&#39;");
	// Sfarsit de linie 
	var k = 0;
	while (k >=0) {	 
	   k = x.indexOf("\n");
	   if (k >= 0)
	   	x = x.substring(0,k-1)+"<br>"+x.substring(k+1); 
	}
	
	document.getElementById(id).value = x;
}