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_qVal_wallaby(sValue) 
{
var pos = String(document.location).indexOf('|');
if (pos != -1)
	{
	var query = String(document.location).substring(pos+1);
	query = query.replace('doc=','');
	}
return query;  
}
function certifica(iSiteId, sPath) 
{
    var size, colors, referrer, url, url_wallaby;
    size = colors = referrer = 'otro';
    var o = cert_qVal('url_origen');
	var doc = cert_qVal_wallaby('doc');
    if (o != null && o != '')
       referrer = o;
    else 
       referrer = escape(document.referrer);
    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;
    url = 'http://hits.e.cl/cert/hit.dll?sitio_id='+iSiteId+'&path='+sPath+'&referer='+referrer+'&size='+size+'&colors='+colors;
    url += '&java=' + navigator.javaEnabled();
    document.writeln( '<img src="' + url + '" width="1" height="1" border="0" alt="Certifica.com">' );
}