/* SimpleStats 6 functions.

Usage:

<script language="javascript" src="/js-local/sst6.js"></script>
<script language="javascript">
<!--
sst6('id_sitio','id_path');
//-->
</script>

Cambios
-------------------
v6.1    cvi 2006/08/23    Soporte para Duplicar Portadas

*/

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.replace(/[^0-9a-z\_\-]/g, '');

  //alert("'" + id_sitio + "'  '" + id_path + "'");

  Browser_NS2Ch_a = 0;
  if (navigator.appName == "Netscape" && navigator.appVersion.charAt(0) == "2")  Browser_NS2Ch_a = 1;
  if (Browser_NS2Ch_a == 0) {
    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 + "\">");
  };
};

function sst6_dupport(id_sitio) {

  var url_port = (document.URL).toLowerCase();
  //alert(url_port);
  var pieces = url_port.split("/");
  var portada = pieces[pieces.length-1];
  //alert(portada);
  portada = portada.slice(0, portada.length-5);
  if(portada=="tipo_saludyeduc") { portada='salud'; }
  sst6(id_sitio,';portadas;' + portada);
};


