function audio(opcion, id, style, url, texto){
	var texto = corrector(texto);
	var r = "";
	switch(opcion){
		case "0":
		r = r + "<a href='#' onclick=\"javascript:audio('1','" + id + "','" + style + "','" + url + "','" + texto + "');\">"
		r = r + "<span style='" + style + "'><IMG hspace='0' src='http://www.alemana.cl//supraintra/resources_prod/alemana/v03/images/IMGNEWS45727.gif' align='absMiddle' border='0'>&nbsp;" + texto + "<EMBED src='" + url + "' hidden='true' type='audio/x-ms-wma' loop='false' autostart='false'></span>";
		r = r + "</a>";
		break;

		case "1":
		r = r + "<a href='#' onclick=\"javascript:audio('0','" + id + "','" + style + "','" + url + "','" + texto + "');\">"
		r = r + "<span style='" + style + "'><IMG hspace='0' src='http://www.alemana.cl//supraintra/resources_prod/alemana/v03/images/IMGNEWS45727.gif' align='absMiddle' border='0'>&nbsp;" + "Detener" + "<EMBED src='" + url + "' hidden='true' type='audio/x-ms-wma' loop='false' autostart='true'></span>";
		r = r + "</a>";
		break;
	}
	document.getElementById(id).innerHTML = r;
}


function corrector(texto){
	for(var i=0;i<texto.length;i++){
		switch (texto.charAt(i)){
			case "\"":
			texto = texto.replace("\"","&quot;");
			break;
			
			case "&":
			texto = texto.replace("&","&amp;");
			break;

			case "<":
			texto = texto.replace("<","&lt;");
			break;

			case ">":
			texto = texto.replace(">","&gt;");
			break;

			case " ":
			texto = texto.replace(" ","&nbsp;");
			break;

			case "¡":
			texto = texto.replace("¡","&iexcl;");
			break;

			case "¢":
			texto = texto.replace("¢","&cent;");
			break;

			case "£":
			texto = texto.replace("£","&pound;");
			break;

			case "¤":
			texto = texto.replace("¤","&curren;");
			break;

			case "¥":
			texto = texto.replace("¥","&yen;");
			break;

			case "¦":
			texto = texto.replace("¦","&brvbar;");
			break;

			case "§":
			texto = texto.replace("§","&sect;");
			break;

			case "¨":
			texto = texto.replace("¨","&uml;");
			break;

			case "©":
			texto = texto.replace("©","&copy;");
			break;

			case "ª":
			texto = texto.replace("ª","&ordf;");
			break;

			case "«":
			texto = texto.replace("«","&laquo;");
			break;

			case "¬":
			texto = texto.replace("¬","&not;");
			break;

			case "®":
			texto = texto.replace("®","&reg;");
			break;

			case "¯":
			texto = texto.replace("¯","&macr;");
			break;

			case "°":
			texto = texto.replace("°","&deg;");
			break;

			case "±":
			texto = texto.replace("±","&plusmn;");
			break;

			case "²":
			texto = texto.replace("²","&sup2;");
			break;

			case "³":
			texto = texto.replace("³","&sup3;");
			break;

			case "´":
			texto = texto.replace("´","&acute;");
			break;

			case "µ":
			texto = texto.replace("µ","&micro;");
			break;

			case "¶":
			texto = texto.replace("¶","&para;");
			break;

			case "·":
			texto = texto.replace("·","&middot;");
			break;

			case "¸":
			texto = texto.replace("¸","&cedil;");
			break;

			case "¹":
			texto = texto.replace("¹","&sup1;");
			break;

			case "º":
			texto = texto.replace("º","&ordm;");
			break;

			case "»":
			texto = texto.replace("»","&raquo;");
			break;

			case "¼":
			texto = texto.replace("¼","&frac14;");
			break;

			case "½":
			texto = texto.replace("½","&frac12;");
			break;

			case "¾":
			texto = texto.replace("¾","&frac34;");
			break;

			case "¿":
			texto = texto.replace("¿","&iquest;");
			break;

			case "À":
			texto = texto.replace("À","&Agrave;");
			break;

			case "Á":
			texto = texto.replace("Á","&Aacute;");
			break;

			case "Â":
			texto = texto.replace("Â","&Acirc;");
			break;

			case "Ã":
			texto = texto.replace("Ã","&Atilde;");
			break;

			case "Ä":
			texto = texto.replace("Ä","&Auml;");
			break;

			case "Å":
			texto = texto.replace("Å","&Aring;");
			break;

			case "Æ":
			texto = texto.replace("Æ","&AElig;");
			break;

			case "Ç":
			texto = texto.replace("Ç","&Ccedil;");
			break;

			case "È":
			texto = texto.replace("È","&Egrave;");
			break;

			case "É":
			texto = texto.replace("É","&Eacute;");
			break;

			case "Ê":
			texto = texto.replace("Ê","&Ecirc;");
			break;

			case "Ë":
			texto = texto.replace("Ë","&Euml;");
			break;

			case "Ì":
			texto = texto.replace("Ì","&Igrave;");
			break;

			case "Í":
			texto = texto.replace("Í","&Iacute;");
			break;

			case "Î":
			texto = texto.replace("Î","&Icirc;");
			break;

			case "Ï":
			texto = texto.replace("Ï","&Iuml;");
			break;

			case "Ð":
			texto = texto.replace("Ð","&ETH;");
			break;

			case "Ñ":
			texto = texto.replace("Ñ","&Ntilde;");
			break;

			case "Ò":
			texto = texto.replace("Ò","&Ograve;");
			break;

			case "Ó":
			texto = texto.replace("Ó","&Oacute;");
			break;

			case "Ô":
			texto = texto.replace("Ô","&Ocirc;");
			break;

			case "Õ":
			texto = texto.replace("Õ","&Otilde;");
			break;

			case "Ö":
			texto = texto.replace("Ö","&Ouml;");
			break;

			case "×":
			texto = texto.replace("×","&times;");
			break;

			case "Ø":
			texto = texto.replace("Ø","&Oslash;");
			break;

			case "Ù":
			texto = texto.replace("Ù","&Ugrave;");
			break;

			case "Ú":
			texto = texto.replace("Ú","&Uacute;");
			break;

			case "Û":
			texto = texto.replace("Û","&Ucirc;");
			break;

			case "Ü":
			texto = texto.replace("Ü","&Uuml;");
			break;

			case "Ý":
			texto = texto.replace("Ý","&Yacute;");
			break;

			case "Þ":
			texto = texto.replace("Þ","&THORN;");
			break;

			case "ß":
			texto = texto.replace("ß","&szlig;");
			break;

			case "à":
			texto = texto.replace("à","&agrave;");
			break;

			case "á":
			texto = texto.replace("á","&aacute;");
			break;

			case "â":
			texto = texto.replace("â","&acirc;");
			break;

			case "ã":
			texto = texto.replace("ã","&atilde;");
			break;

			case "ä":
			texto = texto.replace("ä","&auml;");
			break;

			case "å":
			texto = texto.replace("å","&aring;");
			break;

			case "æ":
			texto = texto.replace("æ","&aelig;");
			break;

			case "ç":
			texto = texto.replace("ç","&ccedil;");
			break;

			case "è":
			texto = texto.replace("è","&egrave;");
			break;

			case "é":
			texto = texto.replace("é","&eacute;");
			break;

			case "ê":
			texto = texto.replace("ê","&ecirc;");
			break;

			case "ë":
			texto = texto.replace("ë","&euml;");
			break;

			case "ì":
			texto = texto.replace("ì","&igrave;");
			break;

			case "í":
			texto = texto.replace("í","&iacute;");
			break;

			case "î":
			texto = texto.replace("î","&icirc;");
			break;

			case "ï":
			texto = texto.replace("ï","&iuml;");
			break;

			case "ð":
			texto = texto.replace("ð","&eth;");
			break;

			case "ñ":
			texto = texto.replace("ñ","&ntilde;");
			break;

			case "ò":
			texto = texto.replace("ò","&ograve;");
			break;

			case "ó":
			texto = texto.replace("ó","&oacute;");
			break;

			case "ô":
			texto = texto.replace("ô","&ocirc;");
			break;

			case "õ":
			texto = texto.replace("õ","&otilde;");
			break;

			case "ö":
			texto = texto.replace("ö","&ouml;");
			break;

			case "÷":
			texto = texto.replace("÷","&divide;");
			break;

			case "ø":
			texto = texto.replace("ø","&oslash;");
			break;

			case "ù":
			texto = texto.replace("ù","&ugrave;");
			break;

			case "ú":
			texto = texto.replace("ú","&uacute;");
			break;

			case "û":
			texto = texto.replace("û","&ucirc;");
			break;

			case "ü":
			texto = texto.replace("ü","&uuml;");
			break;

			case "ý":
			texto = texto.replace("ý","&yacute;");
			break;

			case "þ":
			texto = texto.replace("þ","&thorn;");
			break;

			case "ÿ":
			texto = texto.replace("ÿ","&yuml;");
			break;

			case "Œ":
			texto = texto.replace("Œ","&OElig;");
			break;

			case "œ":
			texto = texto.replace("œ","&oelig;");
			break;

			case "Š":
			texto = texto.replace("Š","&Scaron;");
			break;

			case "š":
			texto = texto.replace("š","&scaron;");
			break;

			case "Ÿ":
			texto = texto.replace("Ÿ","&Yuml;");
			break;

			case "ˆ":
			texto = texto.replace("ˆ","&circ;");
			break;

			case "˜":
			texto = texto.replace("˜","&tilde;");
			break;

			case "–":
			texto = texto.replace("–","&ndash;");
			break;

			case "—":
			texto = texto.replace("—","&mdash;");
			break;

			case "‘":
			texto = texto.replace("‘","&lsquo;");
			break;

			case "’":
			texto = texto.replace("’","&rsquo;");
			break;

			case "‚":
			texto = texto.replace("‚","&sbquo;");
			break;

			case "“":
			texto = texto.replace("“","&ldquo;");
			break;

			case "”":
			texto = texto.replace("”","&rdquo;");
			break;

			case "„":
			texto = texto.replace("„","&bdquo;");
			break;

			case "†":
			texto = texto.replace("†","&dagger;");
			break;

			case "‡":
			texto = texto.replace("‡","&Dagger;");
			break;

			case "‰":
			texto = texto.replace("‰","&permil;");
			break;

			case "‹":
			texto = texto.replace("‹","&lsaquo;");
			break;

			case "›":
			texto = texto.replace("›","&rsaquo;");
			break;

			case "€":
			texto = texto.replace("€","&euro;");
			break;

			case "•":
			texto = texto.replace("•","&bull;");
			break;
	
			default:
			break;
		}
	}
	return texto;
}