/* SimpleStats 6 functions.
Usage:
<script language="javascript" src="/js-local/sst6.js"></script>
<script language="javascript">
<!--
sst6('id_sitio','id_path');
//-->
</script>
*/

// 2006/10/25 - CVI: Soporte para Certifica
// 2006/12/29 - CVI: Cambios en el manejo de los simbolos
var cert_num = 20602;

/* ---------------------------------- */
function sst6(id_sitio,id_path) {
  id_path = id_path.toLowerCase();
  id_path = id_path.replace(/á/g, 'a');
  id_path = id_path.replace(/é/g, 'e');
  id_path = id_path.replace(/í/g, 'i');
  id_path = id_path.replace(/ó/g, 'o');
  id_path = id_path.replace(/ú/g, 'u');
  id_path = id_path.replace(/ñ/g, 'n');
  id_path = id_path.replace(/ü/g, 'u');
  id_path = id_path.replace(/[^0-9a-z;\/\-]+/g, '_');
  id_path = id_path.replace(/;/g, '/');
  id_sitio = id_sitio.toLowerCase();
  id_sitio = id_sitio.replace(/[^0-9a-z;\/\-]+/g, '_');

  sst6_url_source="http://simplestats.altavoz.net/sst6.sst?s="+id_sitio+"&p="+id_path;
  document.writeln("<img height=\"1\"width=\"1\" src=\"" + sst6_url_source +"\">");
  tagCertifica(cert_num, "/" + id_sitio + id_path);
};
