function eTxt(text)
{
	if ( typeof( text ) != "string" )text = text.toString() ;
	text = text.replace(/\À/g, "&Agrave;") ;
	text = text.replace(/\Á/g, "&Aacute;") ;
	text = text.replace(/\Â/g, "&Acirc;") ;
	text = text.replace(/\Ã/g, "&Atilde;") ;
	text = text.replace(/\Ä/g, "&Auml;") ;
	text = text.replace(/\Å/g, "&Aring;") ;
	
	text = text.replace(/\Æ/g, "&AElig;") ;
	text = text.replace(/\Ç/g, "&Ccedil;") ;
	text = text.replace(/\È/g, "&Egrave;") ;
	text = text.replace(/\É/g, "&Eacute;") ;
	text = text.replace(/\Ê/g, "&Ecirc;") ;
	text = text.replace(/\Ë/g, "&Euml;") ;

	text = text.replace(/\Ì/g, "&Igrave;") ;
	text = text.replace(/\Í/g, "&Iacute;") ;
	text = text.replace(/\Î/g, "&Icirc;") ;
	text = text.replace(/\Ï/g, "&Iuml;") ;
	text = text.replace(/\Ð/g, "&ETH;") ;
	text = text.replace(/\Ñ/g, "&Ntilde;") ;
		
	text = text.replace(/\Ò/g, "&Ograve;") ;
	text = text.replace(/\Ó/g, "&Oacute;") ;
	text = text.replace(/\Ô/g, "&Ocirc;") ;
	text = text.replace(/\Õ/g, "&Otilde;") ;
	text = text.replace(/\Ö/g, "&Ouml;") ;
	text = text.replace(/\Ø/g, "&Oslash;") ;
	
	text = text.replace(/\Ù/g, "&Ugrave;") ;
	text = text.replace(/\Ú/g, "&Uacute;") ;
	text = text.replace(/\Û/g, "&Ucirc;") ;
	text = text.replace(/\Ü/g, "&Uuml;") ;
	text = text.replace(/\Ý/g, "&Yacute;") ;
	text = text.replace(/\Þ/g, "&THORN;") ;
	
	text = text.replace(/\ß/g, "&szlig;") ;
	text = text.replace(/\à/g, "&agrave;") ;
	text = text.replace(/\á/g, "&aacute;") ;
	text = text.replace(/\â/g, "&acirc;") ;
	text = text.replace(/\ã/g, "&atilde;") ;
	text = text.replace(/\ä/g, "&auml;") ;
	text = text.replace(/\å/g, "&aring;") ;
	
	text = text.replace(/\æ/g, "&aelig;") ;
	text = text.replace(/\ç/g, "&ccedil;") ;
	text = text.replace(/\è/g, "&egrave;") ;
	text = text.replace(/\é/g, "&eacute;") ;
	text = text.replace(/\ê/g, "&ecirc;") ;
	text = text.replace(/\ë/g, "&euml;") ;

	text = text.replace(/\ì/g, "&igrave;") ;
	text = text.replace(/\í/g, "&iacute;") ;
	text = text.replace(/\î/g, "&icirc;") ;
	text = text.replace(/\ï/g, "&iuml;") ;
	text = text.replace(/\ð/g, "&eth;") ;
	text = text.replace(/\ñ/g, "&ntilde;") ;
		
	text = text.replace(/\ò/g, "&ograve;") ;
	text = text.replace(/\ó/g, "&oacute;") ;
	text = text.replace(/\ô/g, "&ocirc;") ;
	text = text.replace(/\õ/g, "&otilde;") ;
	text = text.replace(/\ö/g, "&ouml;") ;
	text = text.replace(/\ø/g, "&oslash;") ;
	
	text = text.replace(/\ù/g, "&ugrave;") ;
	text = text.replace(/\ú/g, "&uacute;") ;
	text = text.replace(/\û/g, "&ucirc;") ;
	text = text.replace(/\ü/g, "&uuml;") ;
	text = text.replace(/\ý/g, "&yacute;") ;
	text = text.replace(/\þ/g, "&thorn;") ;
	text = text.replace(/\ÿ/g, "&yuml;") ;


	text = text.replace(/\«/g, "&laquo;") ;
	text = text.replace(/\»/g, "&raquo;") ;
	text = text.replace(/\—/g, "&mdash;") ;
	text = text.replace(/\•/g, "&bull;") ;
	//text = text.replace(/\ /g, "");
	//text = text.replace(/\&nbsp;/g, "&nbsp;");
	//text = text.replace(/\&nbsp;/g, " ");
	return text ;
}


function eTxtCode(f)
{
	for(i=0;i<document.getElementById(f).elements.length;i++){
	if(document.getElementById(f).elements[i].type=="text"){
	document.getElementById(f).elements[i].value=eTxt(document.getElementById(f).elements[i].value);
	}
	}
}

function eTxtCodeAll(f)
{
	alert("----");
	for(i=0;i<document.getElementById(f).elements.length;i++){
	document.getElementById(f).elements[i].value=eTxt(document.getElementById(f).elements[i].value);
	}
}
