
function search (key) {
        key=escape(key);
	window.open("http://buscador.terra.com.pe/default.asp?lpv=1&ca=l&loc=searchbox&query="+ key,"buscadorlycos","toolbar=1,location=1,directories=1,menuBar=1,scrollbars=1,resizable=1");
}

document.writeln('<LINK REL="STYLESHEET" TYPE="text/css" HREF="http://www.terra.com.pe/includes/js/estilocabecera.css">');

document.write('<table border="0" cellpadding="0" width="780" height="51" cellspacing="0" background="http://www.terra.com.pe/img/bg_cabecera2_linea.gif">');
document.write('<tr>');
document.write('<td width="14"><img src="http://www.terra.com.pe/img/transp.gif" width="14" height="1" border="0"></td>');
document.write('<td width="93" valign=top>');
document.write('<img src="http://www.terra.com.pe/img/transp.gif" width="1" height="9" border="0"><br>');
/*url_laborum = document.location.pathname;
if(url_laborum.indexOf('laborum') > -1)
{
	document.write('<a href="http://www.terra.com.pe" target = "_blank" ><img src="http://www.terra.com.pe/img/terra.gif" width="93" height="27" border="0" alt=\"Terra.\"></a><br>');
}
else
{*/
	document.write('<a href="http://www.terra.com.pe" target="_top"><img src="http://www.terra.com.pe/img/terra.gif" width="93" height="27" border="0" alt=\"Terra\"></a><br>');
//}		
document.write('</td>');
document.write('<td width="322"><img src="http://www.terra.com.pe/img/transp.gif" width="322" height="1" border="0"></td>');
document.write('<td width="135" valign=top>');
document.write('<form name=\"canales\">');
document.write('<img src="http://www.terra.com.pe/img/transp.gif" width="1" height="14" border="0"><br>');
document.writeln('<select name=\"opcion\" onChange=\"top.location=document.canales.opcion.options[this.form.opcion.selectedIndex].value" class="combocabpe">');
for (i=0; i<arraycanales.length; i+=3) {
	if (arraycanales[i+1] == "") {
		document.write('<option value="">');
	} else {
		document.write('<option value=' + arraycanales[i+1] + '>');
	}
document.write(arraycanales[i]);
}
document.writeln('</select>');
document.write('<script language="JavaScript">');
document.write('<!-- ');
document.write('document.canales.opcion.selectedIndex = 0;');
document.write('//-->');
document.write('</script>');

		

document.write('</td></form><form action=\"javascript:search(document.buscar.Claus.value)\" method=\"POST\" name=\"buscar\">');
document.write('<td width="6"><img src="http://www.terra.com.pe/img/transp.gif" width="6" height="1" border="0"></td>');
document.write('<td width="142" valign=top>');
document.write('<img src="http://www.terra.com.pe/img/transp.gif" width="1" height="14" border="0"><br>');

		if (navigator.appName == "Microsoft Internet Explorer")
		{document.write('<input type=\"text\" name=\"Claus\" class=\"captioncabpe\" value=\"Buscar en Internet\" onfocus=\"if(this.value==\'Buscar en Internet\') {this.value=\'\';}\" onblur=\"if(this.value==\'\') {this.value=\'Buscar en Internet\';}\ " style=\"width: 100%;\">')}
		else
		{document.write('<input type=\"text\" name=\"Claus\" class=\"captioncabpe\" value=\"Buscar en Internet\" onfocus=\"if(this.value==\'Buscar en Internet\') {this.value=\'\';}\" onblur=\"if(this.value==\'\') {this.value=\'Buscar en Internet\';}\" style=\"width: 100%;\">')}

document.write('</td>');
document.write('<td width="5"><img src="http://www.terra.com.pe/img/transp.gif" width="5" height="1" border="0"></td>');
document.write('<td width="35" valign=top>');
document.write('<img src="http://www.terra.com.pe/img/transp.gif" width="1" height="12" border="0"><br>');
document.write('<input type="image" src="http://www.terra.com.pe/img/lupita_int.gif" align="absmiddle" width="35" height="24" border="0"><br>');
document.write('</td></form>');
document.write('<td width="28"><img src="http://www.terra.com.pe/img/transp.gif" width="28" height="1" border="0"></td>');
document.write('</tr>');
document.write('</table>');



/* 
  Copyright 2007 - Certifica.com 
  $Id: certifica.js 1918 2007-06-20 14:06:07Z leus $
*/

//CERTIFICA.COM : CODIGO DE certifica.js

DEFAULT_PIVOT_NAME = 'cert_Pivot';
DEFAULT_REDIRECT_TIME = 3000;
DEFAULT_PERIODIC_REDIRECT_TIME = 60000;
DEFAULT_ORIGIN_COOKIE_NAME = 'cert_Origin';

var cert_CustomCounters = null;
var cert_CustomAttributes = null;
var cert_ReferrerParms = null;
var cert_customSearch = false;

function cert_normalizePath(sPath)
{
    var sProtocol = cert_getProtocol();
    var sRet = 'home/default';
    var regexSlashes = /\/\/+/g;
    var regexInvalid = /[^A-Z0-9_.\/]/gi;
    var aDefaultPages = [
        'index.html', 'index.htm', 'index.asp', 'index.php',
        'default.asp', 'index.cfm'
    ];

    sPath = unescape(sPath);
    if (sPath && sPath.length > 0 &&
        (sProtocol == 'http:' || sProtocol == 'https:')) {
        sPath = sPath.replace(regexInvalid, '');
        // Si es un directorio, se agrega una pagina por defecto
        if (sPath.charAt(sPath.length - 1) == '/') {
            sPath += aDefaultPages[0];
        }
        sPath = sPath.replace(regexSlashes, '/');

        var aParts = sPath.split('/');
        var aElems = new Array();
        for (var i = 0; i < aParts.length; i++) {
            if (aParts[i] && aParts[i] != '') {
                aElems.push(aParts[i]);
            }
        }

        if (aElems.length == 0) {
            aElems.push('home');
            aElems.push('default');
        }

        if (aElems.length == 1) {
            aElems.unshift('home');
        }

        for (var i = 0; i < aDefaultPages.length; i++) {
            if (aElems[aElems.length - 1] == aDefaultPages[i]) {
                aElems[aElems.length - 1] = 'default';
                break;
            }
        }
        sRet = aElems.join('/');
    }
    return sRet;
}

function cert_qVal(sValue) 
{
    var pos = String(document.location).indexOf('?');
    if (pos != -1) {
       var query = String(document.location).substring(pos+1);
       var vars = query.split("&");
       for (var i=0; i < vars.length; i++) {
          var pair = vars[i].split("=");
          if (pair[0] == sValue)
             return pair[1];
       }       
    }
    return null;  
}

function cert_getCookie(sName) {
  var dc = document.cookie;
  var prefix = sName + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  } else
    begin += 2;
  var end = document.cookie.indexOf(";", begin);
  if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}

function cert_setCookie(sName, sValue, dtExpires, sPath, sDomain, bSecure) {
  document.cookie = sName + "=" + escape(sValue) +
      ((dtExpires) ? "; expires=" + dtExpires.toGMTString() : "") +
      ((sPath) ? "; path=" + sPath : "") +
      ((sDomain) ? "; domain=" + sDomain : "") +
      ((bSecure) ? "; secure" : "");
}

function cert_getReferrer()
{
   var referrer = document.referrer;
   if (self.cert_getReferrer14) {
      referrer = cert_getReferrer14();
	} else {
/*@cc_on
  @if(@_jscript_version >= 5 )
   try { 
      if ( self != top ) referrer = top.document.referrer;
   } catch(e) {};
  @end
  @*/
  }

  if (referrer) {
	  if (cert_customSearch) {
		var re = new RegExp('(https?:\/\/[^/]*)\/?.*$');
		referrer = referrer.replace(re, '$1/buscInterno');
	  }
	  referrer = cert_appendExtraReferrerParms(referrer);
  }
  return referrer;
}

/* Obtiene el tipo de protocolo del documento actual. */
function cert_getProtocol()
{
    if (window && window.location && window.location.protocol)
        return window.location.protocol;
    return null;
}
 
/* Crea una cookie con el contenido del referrer para evaluarlo
  en el paso final, si es necesario. */
function cert_setOrigin()
{
	var c = cert_getCookie(DEFAULT_ORIGIN_COOKIE_NAME);
	if (!c) {
		var l = cert_getReferrer();
		if (l) {
			var re = new RegExp('https?:\/\/([^\/]+)');
			var m = re.exec(l);
			if (m) {
				var m2 = re.exec(document.location);
				if (m2) {
					if (m[1] != m2[1]) {
						c = m[1];
					}
				}
			}
		}
		if (!c) {
			c = 'directo';
		}
		cert_setCookie(DEFAULT_ORIGIN_COOKIE_NAME, c);
	} 
}

function cert_getFlashVersion()
{
	var flashVersion = -1;
	if (navigator.plugins && navigator.plugins.length) {
		var objFlash = navigator.plugins["Shockwave Flash"];
		if (objFlash) {
			if (objFlash.description) {
				flashDesc = objFlash.description;
				flashVersion = flashDesc.charAt(flashDesc.indexOf('.')-1);
			}
		}

		if (navigator.plugins["Shockwave Flash 2.0"]) {
			flashVersion = 2;
		}
	} else if (navigator.mimeTypes && navigator.mimeTypes.length) {
		x = navigator.mimeTypes['application/x-shockwave-flash'];
		if (x && x.enabledPlugin) {
			flashVersion = 0; // no detectada!
		}
	}

	/*@cc_on
	for(var i = 10; i > 0; i--) {
		try {
			var flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i);
			flashVersion = i;
			break;
		} catch(e){}
	}	
	@*/
	return flashVersion;
}

/* Crea la URL para obtener un pageview de Certifica. */
/* Sólo necesita los parámetros iSiteId y sPath       */
function cert_getURL(iSiteId, sPath, sAppend) 
{
    var size, colors, referrer, url;
    size = colors = referrer = 'otro';
    var o = cert_qVal('url_origen');
    var proto = cert_getProtocol();
    if (proto != 'https:')
        proto = 'http:';
    
    if (o != null && o != '')
       referrer = o;
    else 
       referrer = escape(cert_getReferrer());
    if ( window.screen.width ) size = window.screen.width;
    if ( window.screen.colorDepth ) colors = window.screen.colorDepth;
    else if ( window.screen.pixelDepth ) colors = window.screen.pixelDepth;
	if (sPath == 'url')
		sPath = cert_normalizePath(sPath);
    url = 
       proto + '//hits.e.cl/cert/hit.dll?sitio_id=' + iSiteId + '&path=' + sPath +
       '&referer=' + referrer + '&size=' + size + '&colors=' + colors;
    url += '&java=' + navigator.javaEnabled() + '&flash=' + cert_getFlashVersion();
    if (sAppend)
        url += sAppend;
    return url;    
}

function cert_addExtraReferrerParm(sName, sValue)
{
	if (!cert_ReferrerParms) {
		cert_ReferrerParms = new Object();
	}

	cert_ReferrerParms[sName] = sValue;
}

function cert_appendExtraReferrerParms(sReferrer)
{
	if (cert_ReferrerParms && sReferrer) {
		var sAppend = '';
		for (var n in cert_ReferrerParms) {
			sAppend += n + '=' + cert_ReferrerParms[n] + '&';
		}
		if (sAppend) {
			if (sReferrer.indexOf('?') != -1) {
				sReferrer += '&' + sAppend;
			} else {
				sReferrer += '?' + sAppend;
			}
		}
	}
	return sReferrer;
}

function cert_addCustomAttribute(sType, sValue)
{
	if (!cert_CustomAttributes) {
		cert_CustomAttributes = new Object();
	}

	cert_CustomAttributes[sType] = sValue;
}


function cert_addCustomCounter(sType, iValue)
{
	if (iValue && iValue > 0) {
		if (!cert_CustomCounters) {
			cert_CustomCounters = new Object();
		}

		if (cert_CustomCounters[sType]) {
			cert_CustomCounters[sType] += iValue;
		} else {
			cert_CustomCounters[sType] = iValue;
		}
	}
}


function cert_getCustomTags()
{
	var sRet = '';
	var ct_atrib = '', ct_acum = '';
	if (cert_CustomAttributes) {
		ct_atrib = 'ct_atrib=';
		for (var i in cert_CustomAttributes) {
			ct_atrib += i + ':' + cert_CustomAttributes[i] + ';';
		}
	}

	if (cert_CustomCounters) {
		ct_acum = 'ct_acum=';
		for (var i in cert_CustomCounters) {
			ct_acum += i + ':' + cert_CustomCounters[i] + ';';
		}
	}

	if (ct_atrib || ct_acum) {
		if (ct_atrib) {
			sRet += '&' + ct_atrib;
		}
		if (ct_acum) {
			sRet += '&' + ct_acum;
		}
	}
	return sRet;
}


/* Crea la URL para un sitio con e-Commerce. */
function cert_getURL_eCommerce(iSiteId, sPath, sAmount)
{
	var sOrigin = null;

	if ((sOrigin = cert_getCookie(DEFAULT_ORIGIN_COOKIE_NAME))) {
		cert_addCustomAttribute('origin', sOrigin);
	}

	if (sAmount) {
		cert_addCustomCounter('money', sAmount);
	}

	var sAppend = cert_getCustomTags();

	return cert_getURL(iSiteId, sPath, sAppend);
}


/* Crea la URL para un sitio con Search Engine interno. */
function cert_getURL_CustomSearch(iSiteId, sPath, sSearchString)
{
	cert_customSearch = true;
	cert_addExtraReferrerParm('q', sSearchString);

	return cert_getURL(iSiteId, sPath);
}

/* Efectua un hit en certifica usando una imagen pivote. */
function cert_registerHit(iSiteId, sPath, sPivotName) 
{
   var sAppend = '&cert_cachebuster=' + (1 + Math.floor (Math.random() * 10000));
   if ( !sPivotName )
      sPivotName = DEFAULT_PIVOT_NAME;
   if ( document.images )
      if ( document.images[sPivotName] )
         document.images[sPivotName].src = cert_getURL(iSiteId, sPath, sAppend);
}

/* Efectúa una redirección marcando la ruta de salida */
function cert_registerHitAndRedirect( sURL, iSiteId, sPath, sPivotName ) 
{
   cert_registerHit( iSiteId, sPath, sPivotName );
   setTimeout( "location.href = '" + sURL + "'", DEFAULT_REDIRECT_TIME );
}

/* Abre una nueva ventana, marcando el hit */
function cert_registerHitAndOpenWindow( sURL, iSiteId, sPath, sPivotName, sName, sFeatures, bReplace )
{
   cert_registerHit( iSiteId, sPath, sPivotName );
   if (!sName)
      sName = 'Downloads';
   if (!sFeatures)
      sFeatures = 'toolbar=no,location=no,directories=no,status=yes,menubar=no, scrollbars=no,resizable=no,width=425,height=510,screenX=20,screenY=20';
   window.open( sURL, 
      sName, 
      sFeatures, 
      bReplace 
   );
   return false;
}

/* Marca el hit y reemplaza/abre una URL en el frame 'sName' */
function cert_registerHitAndReplaceOtherFrame( sURL, sName, iSiteId, sPath, sPivotName ) 
{
   cert_registerHitAndOpenWindow( sURL, iSiteId, sPath, sPivotName, sName, 0, true );
}

/* Marca el hit y reemplaza/abre una URL en el frame 'sName' */
function cert_registerHitAndReplaceThisFrame( sURL, iSiteId, sPath, sPivotName ) 
{
   cert_registerHitAndRedirect( sURL, iSiteId, sPath, sPivotName );
}

/* Marca el hit y baja un archivo */
function cert_registerHitAndDownloadFile( sURL, iSiteId, sPath, sPivotName ) 
{
   cert_registerHitAndRedirect( sURL, iSiteId, sPath, sPivotName );
}

function cert_getAnchor(sUrl)
{
    return '<img src="' + sUrl + '" width="1" height="1" border="0" alt="Certifica.com">';
}

/* Marca un hit en la página actual */
function tagCertifica(iSiteId, sPath) 
{
    document.writeln(cert_getAnchor(cert_getURL(iSiteId, sPath)));
}

/* Marca un hit en la página actual, usando eCommerce */
function tagCertifica_eCommerce(iSiteId, sPath, iAmount) 
{
    document.writeln(cert_getAnchor(cert_getURL_eCommerce(iSiteId, sPath, iAmount)));
}

/* Marca un hit en la página actual, agregando parametros de Search Engines internos */
function tagCertifica_CustomSearch(iSiteId, sPath, sSearchString) 
{
    document.writeln(cert_getAnchor(cert_getURL_CustomSearch(iSiteId, sPath, sSearchString)));
}
/* Marca un registro cada iTime milisegundos.  */
function cert_registerPeriodicHit( iSiteId, sPath, sPivotName, iTime ) 
{
   if ( !sPivotName )
      sPivotName = DEFAULT_PIVOT_NAME;
   if ( !iTime )
      iTime = DEFAULT_PERIODIC_REDIRECT_TIME;

   cert_registerHit( iSiteId, sPath, sPivotName );
   setTimeout( 'cert_registerPeriodicHit( ' + iSiteId + ', "' + sPath + '", "' + sPivotName + '", ' + iTime + ')', iTime );
}

cert_setOrigin();

// FIN certifica.JS

//CERTIFICA.COM : CODIGO DE certifica-js14.js
/* 
  Copyright 2004 - Certifica.com 
  $Id: certifica-js14.js,v 1.4 2004/10/27 20:12:21 leus Exp $
*/
	function cert_getReferrer14(){
	   var referrer = document.referrer;
	   try { 
		  if ( self != top ) 
			 referrer = top.document.referrer;
	   } catch(e) {
		  referrer = document.referrer;
	   }
	   return referrer;
	}

//FIN certifica-js14.js


//CERTIFICA.COM : CABECERA TERRA

/* Se busca una cadena y se elimina */

function cert_depura_ruta(v_ruta_buscada ,v_rutacompleta, v_dato) 
{
	  v_url2=v_dato.toLowerCase();
      v_posicion=v_url2.lastIndexOf(v_ruta_buscada);
      v_dato="/"+v_url2.substring(v_posicion+v_ruta_buscada.length,v_url2.length);
      v_datoback=v_dato;
      v_dato2=v_dato.charAt(v_dato.length-1);
      v_cadena="/";
      v_otracadena="|";
      v_contador2=0;
      while (v_datoback.indexOf(v_cadena) > -1) 
      {  v_dato3=v_datoback.indexOf(v_cadena);
         v_datoback=v_datoback.substring(0,v_dato3)+v_otracadena+v_datoback.substring(v_dato3+1,v_datoback.length);
         v_contador2=v_contador2+1;
       }
       if (v_dato2 == '/')
       { v_dato=v_dato+"home/";
       }
	   return v_dato;

}

/*Se utiliza para hacer consistencia de las secciones y validar ciertas excepciones de nombres
que deben aparecer en los reportes con otros nombres.  También se elimina la palabra SHARED.
Las subsecciones de deportes se envían a la sección DEPORTES
*/

function cert_terra_secciones(v_rutacompleta, v_dato) 
{
 var v_datoback, v_cadena, v_dato3, v_dato2, v_otracadena , v_url2=v_dato;
 var v_contador2 , v_posicion , v_return;
   if (v_rutacompleta.indexOf("/shared/") > 0)
    { v_dato = cert_depura_ruta("/shared/" ,v_rutacompleta, v_url2) 
      v_return = v_dato;
      if ((v_rutacompleta.indexOf("/ligaseuropeas/") > 0) || (v_rutacompleta.indexOf("/tenis/") > 0) || (v_rutacompleta.indexOf("/formula12006/") > 0) || (v_rutacompleta.indexOf("/formula1/") > 0) || (v_rutacompleta.indexOf("/formula12005/") > 0) || (v_rutacompleta.indexOf("/sudamericana2005/") > 0) || (v_rutacompleta.indexOf("/mundialsub202005/") > 0) || (v_rutacompleta.indexOf("/basquet2006/") > 0) || (v_rutacompleta.indexOf("/olimpiadas2000/") > 0) || (v_rutacompleta.indexOf("/copaamerica2004/") > 0) || (v_rutacompleta.indexOf("/libertadores2006/") > 0) || (v_rutacompleta.indexOf("/eurocopa2004/") > 0) || (v_rutacompleta.indexOf("/copaamerica2007/") > 0) || (v_rutacompleta.indexOf("/libertadores2007/") > 0) || (v_rutacompleta.indexOf("/formula12007/") > 0) || (v_rutacompleta.indexOf("/panamericanos2007/") > 0) || (v_rutacompleta.indexOf("/mundialsub20/") > 0) || (v_rutacompleta.indexOf("/mundialsub17/") > 0) || (v_rutacompleta.indexOf("/copasudamericana2007/") > 0) || (v_rutacompleta.indexOf("/futbollatino/") > 0) || (v_rutacompleta.indexOf("/eliminatorias2010/") > 0) || (v_rutacompleta.indexOf("/pekin2008/") > 0) || (v_rutacompleta.indexOf("/mundialdeclubes07/") > 0) || (v_rutacompleta.indexOf("/libertadores2008/") > 0))
      {v_return = "/deportes"+v_dato;
      }
    }
    else if (v_rutacompleta.indexOf("/global/") > 0)
     {v_return = "/noticias"+v_dato;
     }
     else if (v_rutacompleta.indexOf("/thegirl2005/") > 0)
     {v_return = "/thegirl"+v_dato;
     }
     else if (v_rutacompleta.indexOf("/webgames/") > 0)
     {v_return = "/games/juegos_web"+v_dato;
     }
     else if (v_rutacompleta.indexOf("/juegos/") > 0)
     {//v_return = "/games/juegos_clasicos"+v_dato;
	  v_dato=cert_depura_ruta("/webgames/" ,v_rutacompleta, v_url2)
	  v_return = "/juegos_clasicos/cap"+v_dato;
     }
     else if (v_rutacompleta.indexOf("/bienestar/") > 0)
     {
       v_return = "/bienestar_femenino"+v_dato;
     }
	else if (rutacompleta.indexOf("/php/galeria/") > 0)
     { v_dato = cert_depura_ruta("/php/galeria/" ,v_rutacompleta, v_url2) 
       v_return = "/entretenimiento/php-galeria"+v_dato;
     }
	else if (rutacompleta.indexOf("/discovirtual/") > 0)
     { v_dato = cert_depura_ruta("/discovirtual/" ,v_rutacompleta, v_url2) 
       v_return = "/isp/discovirtual"+v_dato;
     }
	else if (rutacompleta.indexOf("/fotolog/") > 0)
     { v_dato = cert_depura_ruta("/fotolog/" ,v_rutacompleta, v_url2) 
       v_return = "/fotolog"+v_dato;
     }
	else if (rutacompleta.indexOf("/album/") > 0)
     { v_dato = cert_depura_ruta("/album/" ,v_rutacompleta, v_url2) 
       v_return = "/album"+v_dato;
     }
	else if (rutacompleta.indexOf("/registro/") > 0)
     { v_dato = cert_depura_ruta("/registro/" ,v_rutacompleta, v_url2) 
       v_return = "/registro"+v_dato;
     }
	else if (rutacompleta.indexOf("/tureportero/") > 0)
     { v_dato = cert_depura_ruta("/tureportero/" ,v_rutacompleta, v_url2) 
       v_return = "/tureportero"+v_dato;
     }
    else if (v_rutacompleta.indexOf("/saludybelleza/") > 0)
     {  v_dato = cert_depura_ruta("/saludybelleza/" ,v_rutacompleta, v_url2) 
		v_return = "/dietas_belleza"+v_dato;
     }
    else if ((v_rutacompleta.indexOf("/ligaseuropeas/") > 0) || (v_rutacompleta.indexOf("/tenis/") > 0) || (v_rutacompleta.indexOf("/formula12006/") > 0) || (v_rutacompleta.indexOf("/formula1/") > 0) || (v_rutacompleta.indexOf("/formula12005/") > 0) || (v_rutacompleta.indexOf("/sudamericana2005/") > 0) || (v_rutacompleta.indexOf("/mundialsub202005/") > 0) || (v_rutacompleta.indexOf("/basquet2006/") > 0) || (v_rutacompleta.indexOf("/olimpiadas2000/") > 0) || (v_rutacompleta.indexOf("/copaamerica2004/") > 0) || (v_rutacompleta.indexOf("/libertadores2006/") > 0) || (v_rutacompleta.indexOf("/eurocopa2004/") > 0) || (v_rutacompleta.indexOf("/copaamerica2007/") > 0) || (v_rutacompleta.indexOf("/libertadores2007/") > 0) || (v_rutacompleta.indexOf("/formula12007/") > 0) || (v_rutacompleta.indexOf("/panamericanos2007/") > 0) || (v_rutacompleta.indexOf("/mundialsub20/") > 0) || (v_rutacompleta.indexOf("/mundialsub17/") > 0) || (v_rutacompleta.indexOf("/copasudamericana2007/") > 0) || (v_rutacompleta.indexOf("/futbollatino/") > 0) || (v_rutacompleta.indexOf("/eliminatorias2010/") > 0) || (v_rutacompleta.indexOf("/pekin2008/") > 0) || (v_rutacompleta.indexOf("/mundialdeclubes07/") > 0) || (v_rutacompleta.indexOf("/libertadores2008/") > 0))
      {v_return = "/deportes"+v_dato;
      } 
    else {
     v_datoback=v_dato;
      v_dato2=v_dato.charAt(v_dato.length-1);
      v_cadena="/";
      v_otracadena="|";
      while (v_datoback.indexOf(v_cadena) > -1) 
      {  v_dato3=v_datoback.indexOf(v_cadena);
         v_datoback=v_datoback.substring(0,v_dato3)+v_otracadena+v_datoback.substring(v_dato3+1,v_datoback.length);     
      }
      if (v_dato2 == '/')
       { v_dato=v_dato+"home/";
       }
    v_return = v_dato;
      }
return v_return;
}


//CERTIFICA.COM : CABECERA TERRA

/* Definición de variables*/
dominio=document.domain;
url=document.location.pathname;
rutacompleta=document.location.href;
dato=url;
nuevo_id=false;

/* Definición de variables para pruebas */
//dominio="diccionario.terra.com.pe";
//url="/cgi-bin/b.pl";
//rutacompleta="http://diccionario.terra.com.pe/cgi-bin/b.pl";
//dato=url;
//document.writeln("<b>Dominio Utilizado:</b>      "+dominio+"<br>");
//document.writeln("<b>Pathname:</b>      "+url+"<br>");
//document.writeln("<b>Ruta completa o href: </b>"+rutacompleta+"<br>");



//Se valida si la página está cargada en uno de los 3 dominios principales
if (dominio=="terra.com.pe" || dominio=="www.terra.com.pe" || dominio=="www.pe.terra.com" || dominio=="contenidos.terra.com.pe" )
 { //Validación de secciones tomando en cuenta las excepciones (ej:bienestar,saludybelleza y se elimina el SHARED
  vcertifica_path = cert_terra_secciones(rutacompleta, url);
  if(vcertifica_path.indexOf("webgames") > 0||vcertifica_path.indexOf("juegos") > 0)
	{
		vcertifica_sitio=25992;	
		nuevo_id = true;		
	}
	else
	{
		vcertifica_sitio=18873;
	}	
 }
else //Se valida si la página está en algún subdominio de TERRA y se carga el tráfico a una ruta, pudiendo redirigirlo a otra cuenta Metric
	{ 
	datoback=dato;
	dato2=dato.charAt(dato.length-1);
	cadena="/";
	otracadena="|";
	contador=0;
	contador2=0;
	while (datoback.indexOf(cadena) > -1) 
		{  dato3=datoback.indexOf(cadena);
		   datoback=datoback.substring(0,dato3)+otracadena+datoback.substring(dato3+1,datoback.length);
		   contador2=contador2+1;
		}
	if (dato2 == '/')
		{ dato=dato+"home/";
		}

	if (rutacompleta.indexOf("clientes.terra.com.pe") > 0)	
	{   vcertifica_path="/otras_secciones/clientes.terra"+dato;
		vcertifica_sitio=18873;
	}    
	else if (rutacompleta.indexOf("antivirusonline.terra.com.pe") > 0)
	{	vcertifica_path="/isp/antivirusonline"+dato;
		vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("filtro.terra.com.pe") > 0)
	{	  vcertifica_path="/isp/filtro"+dato;
	      vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("discovirtual.terra.com.pe") > 0)
	{	  vcertifica_path="/isp/discovirtual"+dato;
	      vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("pe.invertia.com") > 0)
	{	  vcertifica_path="/invertia"+dato;
	      vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("yamanejo.terra.com.pe") > 0)
	{	vcertifica_path="/yamanejo"+dato;
	    vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("seguridad.terra.com.pe") > 0)
	{	vcertifica_path="/seguridad"+dato;
	    vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("atraeme.terra.com.pe") > 0)
	{	vcertifica_path="/atraeme"+dato;
	    vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("diccionario.terra.com.pe") > 0)
	{	vcertifica_path="/diccionario"+dato;
	    vcertifica_sitio=18873;
		//LUEGO SE ACTUALIZAN CON EL NUEVO TAG CERTIFICA
	}
	else if (rutacompleta.indexOf("fotolog.terra.com.pe") > 0)
	{	vcertifica_path="/fotolog"+dato;
	    vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("miramifoto.terra.com.pe") > 0)
	{	vcertifica_path="/miramifoto"+dato;
	    vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("postulante.terra.com.pe") > 0)
	{	vcertifica_path="/postulante"+dato;
	    vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("antivirus.terra.com.pe") > 0)
	{	vcertifica_path="/antivirus"+dato;
	    vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("conectadisney.terra.com.pe") > 0)
	{	vcertifica_path="/conectadisney"+dato;
	    vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("extranet.terra.com.pe") > 0)
	{	vcertifica_path="/extranet"+dato;
	    vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("www.rumbo.com.pe") > 0)
	{	vcertifica_path="/rumbo"+dato;
	    vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("buscador.terra.com.pe") > 0)
	{	vcertifica_path="/buscador"+dato;
	    vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("tiempo.terra.com.pe") > 0)
	{	vcertifica_path="/tiempo"+dato;
	    vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("secure.iquiero.com.com.pe") > 0)
	{	vcertifica_path="/iquiero"+dato;
	    vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("comprasenusa.pe.terra.com.com.pe") > 0)
	{	vcertifica_path="/compras_en_usa"+dato;
	    vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("correoweb.terra.com.pe") > 0)
	{	vcertifica_path="/correo_web"+dato;
	    vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("portadamail.terra.com.pe") > 0)
	{	vcertifica_path="/correo_web/terramail"+dato;
		vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("correo.terra.com.pe") > 0)
	{	vcertifica_path="/correo_gratuito"+dato;
	    vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("sms.terra.com.pe") > 0)
	{	vcertifica_path="/sms"+dato;
	    vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("postales.pe.terra.com.com.pe") > 0)
	{	vcertifica_path="/postales"+dato;
	    vcertifica_sitio=18873;
	}
	else if ((rutacompleta.indexOf("cine.terra.com.pe") > 0) || (rutacompleta.indexOf("cartelera.com.pe") > 0) || (rutacompleta.indexOf("cineperu.com.pe") > 0) || (rutacompleta.indexOf("cines.com.pe") > 0) || (rutacompleta.indexOf("cine.com.pe ") > 0) )
	{ vcertifica_path="/cine"+dato;
	    vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("habla.chat-pe.terra.com.pe") > 0)
	{	vcertifica_path="/chat"+dato;
	    vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("habla02.chat-pe.terra.com.pe") > 0)
	{	vcertifica_path="/chat"+dato;
	    vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("terra.pe.laborum.com") > 0)
	{	vcertifica_path="/empleo"+dato;
	    vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("data.terra.com.pe") > 0)
	{	vcertifica_path=dato;
	    vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("habla03.chat-pe.terra.com.pe") > 0)
	{	vcertifica_path="/chat"+dato;
	     vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("habla01.chat-pe.terra.com.pe") > 0)
	{	vcertifica_path="/chat"+dato;
	     vcertifica_sitio=18873;
	 }
	else if (rutacompleta.indexOf("download.terra.com.pe") > 0)
	{	vcertifica_path="/download"+dato;
	     vcertifica_sitio=18873;
    }
	else if (rutacompleta.indexOf("terra-latinoamerica.softonic.com#pe") > 0)
	{	vcertifica_path="/download"+dato;
	     vcertifica_sitio=18873;
	 }
	else if (rutacompleta.indexOf("t-controla.terra.com.pe") > 0)
	{	vcertifica_path="/t_controla"+dato;
	     vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("t-responde.terra.com.pe") > 0)
	{	vcertifica_path="/t_responde"+dato;
	     vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("radio1160.terra.com.pe") > 0)
	{	vcertifica_path="/radio1160"+dato;
	     vcertifica_sitio=18873;
	 }
	else if (rutacompleta.indexOf("correoweb.bonus.com.pe") > 0)
	{	vcertifica_path="/correobonus"+dato;
	     vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("inmuebles.terra.com.pe") > 0)
	{	vcertifica_path="/inmuebles"+dato;
	     vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("almasgemelas.terra.com.pe") > 0)
	{	vcertifica_path="/almasgemelas"+dato;
	     vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("datamovil.terra.com.pe") > 0)
	{	vcertifica_path="/datamovil"+dato;
	     vcertifica_sitio=18873;
	 }
	else if (rutacompleta.indexOf("premiumcablenet.terra.com.pe") > 0)
	{	vcertifica_path="/premiumcablenet"+dato;
	     vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("blog.terra.com.pe") > 0)
	{	vcertifica_path="/blog.terra"+dato;
	     vcertifica_sitio=18873;
	 }
	else if (rutacompleta.indexOf("tusvideos.terra.com.pe") > 0)
	{	vcertifica_path="/tusvideos"+dato;
	     vcertifica_sitio=18873;
    }
	else if (rutacompleta.indexOf("gaia.terra.com.pe") > 0)
	{	 vcertifica_path="/gaia"+dato;
	     vcertifica_sitio=18873;
	}
	else if (rutacompleta.indexOf("correo-gratis.terra.com.pe") > 0)
	{	 vcertifica_path="/correo_gratis"+dato;
	     vcertifica_sitio=18873;
		 //LUEGO SE ACTUALIZA CON EL NUEVO TAG
	}
	else   //Se envía el tráfico a "Otras Secciones" tomando el dominio y la ruta depurada.
	{	vcertifica_path="/otras_secciones/"+dominio+dato;
	    vcertifica_sitio=18873;		 
	}
}


nuevo_tag = false;
terra_info_service = "PubPE";
terra_info_channel = "";
terra_stats_idCrtfc = "";
terra_info_channeldetail = "";
terra_info_type = "";
terra_info_id = "";

if(vcertifica_path.indexOf("diccionario")>-1)
{
	nuevo_tag = true; 
	terra_info_channel = "pe.productosyservicios.diccionario";
	terra_stats_idCrtfc = "26031";
	terra_info_type = "cap";
	terra_info_id = dato; //Dado que es el dominio diccionario.terra.com.pe entonces se usa "dato" directamente
}

if(vcertifica_path.indexOf("comidaperu")>-1)
{
	nuevo_tag = true;
	terra_info_channel = "pe.vidayestilo.gourmet";
	terra_stats_idCrtfc = "26011";
	terra_info_type = "cap";
	terra_info_id = dato.replace("\/comidaperu\/",""); //Dado que es el dominio data.terra.com.pe entonces se usa "dato" directamente
	terra_info_id = terra_info_id.replace("home\/","home"); //incluye el home 
	
	if(terra_info_id.indexOf("home")>-1)
		terra_info_channeldetail = "portada";
	if(terra_info_id.indexOf("recetas")>-1)
		terra_info_channeldetail = "las_recetas_del_chef";
	if(terra_info_id.indexOf("zonab")>-1)
		terra_info_channeldetail = "zona_bar";
	if(terra_info_id.indexOf("conabu")>-1)
		terra_info_channeldetail = "consejos_de_la_abuela";
	if(terra_info_id.indexOf("gdia")>-1)
		terra_info_channeldetail = "cocina_al_dia";
	if(terra_info_id.indexOf("calorias")>-1)
		terra_info_channeldetail = "ponte_en_forma";
	if(terra_info_id.indexOf("cheff")>-1)
		terra_info_channeldetail = "herramientas_del_chef";
	if(terra_info_id.indexOf("zonag")>-1)
		terra_info_channeldetail = "zona_gourmet";
	if(terra_info_id.indexOf("comest")>-1)
		terra_info_channeldetail = "comiendo_con_estilo";
	if(terra_info_id.indexOf("qcomo")>-1)
		terra_info_channeldetail = "que_estoy_comiendo";
	if(terra_info_id.indexOf("escuelas")>-1)
		terra_info_channeldetail = "escuelas_de_gastronomia";
}


if(vcertifica_path.indexOf("empleo")>-1)
{
	nuevo_tag = true;
	terra_info_channel = "pe.vidayestilo.empleos";
	terra_stats_idCrtfc = "26015";
	terra_info_type = "cap";
	terra_info_id = dato; //Dado que es el dominio terra.pe.laborum.com entonces se usa "dato" directamente
	//No aplica "home"
}

if(vcertifica_path.indexOf("extranet")>-1)
{
	nuevo_tag = true;
	terra_info_channel = "pe.productosyservicios.extranet";
	terra_stats_idCrtfc = "26024";
	terra_info_type = "cap";
	//terra_info_id = dato.replace("\/extranet\/",""); //Dado que es el dominio extranet.terra.com.pe se usa dato
	terra_info_id = dato; //Dado que es el dominio extranet.terra.com.pe se usa dato
	terra_info_id = terra_info_id.replace("home\/","home"); //incluye el home 
}

if(vcertifica_path.indexOf("secure.iquiero.com")>-1)
{
	nuevo_tag = true;
	terra_info_channel = "pe.productosyservicios.compras";
	terra_info_channeldetail = "secure.iquiero.com";
	terra_stats_idCrtfc = "26032";
	terra_info_type = "cap";
	terra_info_id = dato.replace("\/terra\/",""); //Dado que es el dominio secure.iquiero.com se usa dato
	terra_info_id = terra_info_id.replace("home\/","home"); //incluye el home 
}

if(vcertifica_path.indexOf("tiempo")>-1)
{
	nuevo_tag = true;
	terra_info_channel = "pe.noticias.clima";
	terra_stats_idCrtfc = "25961";
	terra_info_type = "cap";
	terra_info_id = dato; //Dado que es el dominio secure.iquiero.com se usa dato
	terra_info_id = terra_info_id.replace("home\/","home"); //incluye el home 
	
	if(terra_info_id.indexOf("home")>-1)
		document.write('<img src="http://hits.e.cl/cert/hit.dll?sitio_id=25961&amp;path=/cap/home&amp;referer=&amp;size=1024&amp;colors=32&amp;java=true&amp;flash=9" alt="Certifica.com" border="0" width="1" height="1">');
}

if(vcertifica_path.indexOf("postales.pe.terra.com")>-1)
{
	nuevo_tag = true;
	terra_info_channel = "pe.entretenimiento.postales";
	terra_stats_idCrtfc = "26006";
	terra_info_type = "cap";
	terra_info_id = dato; 
	terra_info_id = terra_info_id.replace("home\/","home"); //incluye el home 
}
	
//otros especiales de deportes
if(vcertifica_path.indexOf("deportes")>-1&&nuevo_tag==false&&nuevo_id==false)
{
	nuevo_tag = true; 
	terra_info_channel = "pe.deportes.deportes";
	terra_info_channeldetail = "otros_especiales";		
	terra_stats_idCrtfc = "24021";	
	
	if(vcertifica_path.indexOf("galeria")>-1) 	
		terra_info_type = "gal";
	else if(vcertifica_path.indexOf("interna")>-1||vcertifica_path.indexOf("ultimas")>-1)
		terra_info_type = "not";
	else  
		terra_info_type = "cap";
	
	terra_info_id = vcertifica_path.replace("\/deportes\/",""); //no se usa "dato.replace("\/salud\/","")" porque el vcertifica_path ya tiene el "shared" depurado
	terra_info_id = terra_info_id.replace("home\/","home"); //se incluye el home 
	terra_info_id = terra_info_id.replace("index.htm","home"); // tambien el index en caso el menu lo haga accesible
}
	
if(vcertifica_path.indexOf("dietas_belleza")>-1)
{
	nuevo_tag = true;
	terra_info_channel = "pe.vidayestilo.salud";
	terra_info_channeldetail = "dietas_belleza/articulo";
	terra_stats_idCrtfc = "24030";
	terra_info_type = "not";
	terra_info_id = dato.substring(dato.lastIndexOf("/")+1,dato.length);	//CASO ESPECIAL, SOLO ARTICULOS
}

//otros especiales de noticias, se hace similar a deportes aunque quizàs no apliauqe ya que no hay especiales de noticias regionales
if(vcertifica_path.indexOf("noticias")>-1&&nuevo_tag==false)
{
	nuevo_tag = true; 
	terra_info_channel = "pe.noticias.peru";
	terra_info_channeldetail = "otros_especiales";		
	terra_stats_idCrtfc = "25957";	
	
	if(vcertifica_path.indexOf("galeria")>-1) 	
		terra_info_type = "gal";
	else if(vcertifica_path.indexOf("interna")>-1||vcertifica_path.indexOf("ultimas")>-1||vcertifica_path.indexOf("articulo")>-1)
		terra_info_type = "not";
	else  
		terra_info_type = "cap";
	
	terra_info_id = vcertifica_path.replace("\/noticias\/",""); //no se usa "dato.replace("\/salud\/","")" porque el vcertifica_path ya tiene el "shared" depurado
	terra_info_id = terra_info_id.replace("home\/","home"); //se incluye el home 
	terra_info_id = terra_info_id.replace("index.htm","home"); // tambien el index en caso el menu lo haga accesible
}

//otros especiales de entretenimiento, se hace similar a deportes aunque quizàs no apliauqe ya que no hay especiales de entretenimiento regionales
if(vcertifica_path.indexOf("entretenimiento")>-1&&nuevo_tag==false)
{
	nuevo_tag = true; 
	terra_info_channel = "pe.entretenimiento.entretenimiento";
	terra_info_channeldetail = "otros_especiales";		
	terra_stats_idCrtfc = "24022";	
	
	if(vcertifica_path.indexOf("galeria")>-1) 	
		terra_info_type = "gal";
	else if(vcertifica_path.indexOf("interna")>-1||vcertifica_path.indexOf("ultimas")>-1||vcertifica_path.indexOf("articulo")>-1)
		terra_info_type = "not";
	else  
		terra_info_type = "cap";
	
	terra_info_id = vcertifica_path.replace("\/entretenimiento\/",""); //no se usa "dato.replace("\/salud\/","")" porque el vcertifica_path ya tiene el "shared" depurado
	terra_info_id = terra_info_id.replace("home\/","home"); //se incluye el home 
	terra_info_id = terra_info_id.replace("index.htm","home"); // tambien el index en caso el menu lo haga accesible
}


if(vcertifica_path.indexOf("cabinas")>-1)
{
	nuevo_tag = true;
	terra_info_channel = "pe.noticias.noticias";		
	terra_stats_idCrtfc = "25956";
	terra_info_type = "cap";		 

	detail_extra1 = "";	
	detail_extra2 = "";	
	if(vcertifica_path.indexOf("tecsup")>-1)
	{	
		detail_extra1 = "tecsup";
		detail_extra2 = "/tecsup";
	}
	if(vcertifica_path.indexOf("_ant")>-1)
	{	
		detail_extra1 = "_ant";
		detail_extra2 = "/_ant";
	}
	if(vcertifica_path.indexOf("_backup")>-1)
	{	
		detail_extra1 = "_backup";
		detail_extra2 = "/_backup";
	}
	
	if(vcertifica_path.indexOf("cabinastrujillo")>-1)
	{	
		terra_info_channeldetail = "cabinas/trujillo" + detail_extra2;
		terra_info_id = vcertifica_path.replace("\/cabinastrujillo" + detail_extra1 + "\/","");	
	}
	else if(vcertifica_path.indexOf("cabinaslima")>-1)
	{	
		terra_info_channeldetail = "cabinas/lima" + detail_extra2;
		terra_info_id = vcertifica_path.replace("\/cabinaslima" + detail_extra1 + "\/","");	
	}	
	else if(vcertifica_path.indexOf("cabinashuancayo")>-1)
	{	
		terra_info_channeldetail = "cabinas/huancayo" + detail_extra2;
		terra_info_id = vcertifica_path.replace("\/cabinashuancayo" + detail_extra1 + "\/","");	
	}	
	else if(vcertifica_path.indexOf("cabinaspiura")>-1)
	{	
		terra_info_channeldetail = "cabinas/piura" + detail_extra2;
		terra_info_id = vcertifica_path.replace("\/cabinaspiura" + detail_extra1 + "\/","");		
	}	
	else if(vcertifica_path.indexOf("cabinasaqp")>-1)
	{	
		terra_info_channeldetail = "cabinas/aqp" + detail_extra2;
		terra_info_id = vcertifica_path.replace("\/cabinasaqp" + detail_extra1 + "\/","");	
	}	
	else if(vcertifica_path.indexOf("cabinaschiclayo")>-1)
	{	
		terra_info_channeldetail = "cabinas/chiclayo" + detail_extra2;
		terra_info_id = vcertifica_path.replace("\/cabinaschiclayo" + detail_extra1 + "\/","");	
	}	
	else if(vcertifica_path.indexOf("cabinascusco")>-1)
	{	
		terra_info_channeldetail = "cabinas/cusco" + detail_extra2;
		terra_info_id = vcertifica_path.replace("\/cabinascusco" + detail_extra1 + "\/","");	
	}		
	else if(vcertifica_path.indexOf("cabinasmoquegua")>-1)
	{	
		terra_info_channeldetail = "cabinas/moquegua" + detail_extra2;
		terra_info_id = vcertifica_path.replace("\/cabinasmoquegua" + detail_extra1 + "\/","");		
	}		
	else 
	{
		terra_info_channeldetail = "cabinas";
		terra_info_id = vcertifica_path;	
	}	
	  
}

if(vcertifica_path.indexOf("religion")>-1) 
{
	nuevo_tag = true;
	terra_info_channel = "pe.vidayestilo.religion";
	terra_info_channeldetail = "religion";
	terra_stats_idCrtfc = "26007";	
	terra_info_type = "cap";
	terra_info_id = vcertifica_path.replace("\/religion",""); 
	terra_info_id = terra_info_id.replace("home\/","home"); //incluye el home 
}

if(vcertifica_path.indexOf("casaycolor")>-1) 
{
	nuevo_tag = true;
	terra_info_channel = "pe.vidayestilo.casaycolor";
	terra_info_channeldetail = "casaycolor";
	terra_stats_idCrtfc = "26007";	
	terra_info_type = "cap";
	terra_info_id = vcertifica_path.replace("\/casaycolor",""); 
	//terra_info_id = terra_info_id.replace("home\/","home"); 
	//el home tiene su propio tag
}

if(vcertifica_path.indexOf("navidad")>-1) 
{
	nuevo_tag = true;
	terra_info_channel = "pe.vidayestilo.vidayestilo";
	terra_info_channeldetail = "";
	terra_stats_idCrtfc = "26007";	
	terra_info_type = "esp";
	terra_info_id = vcertifica_path; 
	terra_info_id = terra_info_id.replace("home\/","home"); //incluye el home 
}

if(vcertifica_path.indexOf("chistes")>-1) 
{
	nuevo_tag = true;
	terra_info_channel = "pe.entretenimiento.entretenimiento";
	terra_info_channeldetail = "chistes";
	terra_stats_idCrtfc = "24022";	
	terra_info_type = "cap";
	terra_info_id = vcertifica_path.replace("\/chistes",""); 
	terra_info_id = terra_info_id.replace("home\/","home"); //incluye el home 
}

if(vcertifica_path.indexOf("saludinfantil")>-1) 
{
	nuevo_tag = true;
	terra_info_channel = "pe.vidayestilo.salud";
	terra_info_channeldetail = "";
	terra_stats_idCrtfc = "24030";	
	terra_info_type = "cap";
	terra_info_id = vcertifica_path.replace("\/salud",""); 
	terra_info_id = terra_info_id.replace("home\/","home"); //incluye el home 
}

if(vcertifica_path.indexOf("atraeme")>-1) 
{
	nuevo_tag = true;
	terra_info_channel = "pe.vidayestilo.almasgemelas";
	terra_info_channeldetail = "atraeme";
	terra_stats_idCrtfc = "26014";	
	terra_info_type = "cap";
	terra_info_id = vcertifica_path.replace("\/atraeme",""); 
	terra_info_id = terra_info_id.replace("home\/","home"); //incluye el home 
}

if(vcertifica_path.indexOf("fotolog")>-1) 
{
	nuevo_tag = true;
	terra_info_channel = "pe.comunidad.fotolog";
	terra_info_channeldetail = "";
	terra_stats_idCrtfc = "24034";	
	terra_info_type = "srv";
	terra_info_id = vcertifica_path.replace("\/fotolog",""); 
	terra_info_id = terra_info_id.replace("home\/","home"); //incluye el home 
	terra_info_id = terra_info_id.replace("otras_secciones\/",""); //incluye el home 	
}

if(vcertifica_path.indexOf("correo_gratis")>-1) 
{
	nuevo_tag = true;
	terra_info_channel = "pe.comunidad.email";
	terra_info_channeldetail = "";
	terra_stats_idCrtfc = "26018";	
	terra_info_type = "adm";
	terra_info_id = vcertifica_path.replace("\/correo_gratis","\/registro_correo_gratis"); 
	terra_info_id = terra_info_id.replace("home\/","home"); //incluye el home 	
}

if(vcertifica_path.indexOf("humormoreno")>-1) 
{
	nuevo_tag = true;
	terra_info_channel = "pe.entretenimiento.entretenimiento"; 
	terra_info_channeldetail = "humormoreno";
	terra_stats_idCrtfc = "24022";
	terra_info_type = "cap";
	terra_info_id = vcertifica_path.replace("\/humormoreno",""); 
	terra_info_id = terra_info_id.replace("home\/","home"); //incluye el home 	
}

if(nuevo_tag)
{
	document.write('\n<script language="JavaScript" type="text/javascript">\n');
	document.write('<!-- \n');
	document.write('var terra_info_service = "' + terra_info_service + '";\n');
	document.write('var terra_info_channel = "' + terra_info_channel + '";\n');
	document.write('var terra_stats_idCrtfc = ' + terra_stats_idCrtfc + ';\n');
	document.write('var terra_info_channeldetail = "' + terra_info_channeldetail + '";\n');
	document.write('var terra_info_type = "' + terra_info_type + '";\n');
	document.write('var terra_info_id = "' + terra_info_id + '";\n');

	document.write('//-->\n');
	document.write('</script>\n');

	document.write('<script type="text/javascript" charset="iso-8859-1" language="javascript" src="http://rtsmoc.terra.com.mx/js/metrics_begin.js"></script>\n');
	document.write('<script type="text/javascript" charset="iso-8859-1" language="javascript" src="http://rtsmoc.terra.com.mx/js/metrics_end.js"></script>\n');

}
else
{

document.writeln("<div id='certifica' style='position:absolute; width:0; height:0; z-index:6; top: 0; left: 0; visibility: hidden'>");
	tagCertifica( vcertifica_sitio, vcertifica_path );
document.writeln("</div>");

}
/* Para pruebas
document.writeln("<br><br>");
document.writeln("<b>Sitio id Obtenido:</b>      "+vcertifica_sitio);
document.writeln("<br>");
document.writeln("<b>Ruta Obtenida:</b>      "+vcertifica_path);
*/
//SITIO_ID DE TERRA : 18873