<!--
//
// Copyright (c) Nuno Ferreira
//	Created: 25/11/2002
//	Last modified: 06/02/2003
//
// You're free to use this code, if you:
// - Don't change the source code
// - Maintain the copyright notice
// - Include on your site a notice of this fact
// - Link your site to mine: Nuno Ferreira (www.nuno.net)
// - Send me an e-mail, so I can link my site to your's
//


function log()
  {
  res=screen.width;
  height=screen.height;
  navigator.appName!="Netscape"?color=screen.colorDepth:color=screen.pixelDepth;
  cookieson = "no";
  machine = "";
  NFmachineIN = "";
  NFmachineOUT = "";
  ref = "";
  if ( document.referrer )
    {
    ref = escape(document.referrer);
    }
  if ( document.referer && ref == "" )
    {
    ref = escape(document.referer);
    }
  if ( navigator.cookieEnabled )
    {
//    document.cookie="cookiesok=T; domain=nuno.net; path=/";
    document.cookie="cookiesok=T; path=/";
    a = -1;
    a = document.cookie.indexOf("cookiesok=T");
    if ( a >= 0 )
      {
      cookieson = "yes";
      }
    a = -1;
    a = document.cookie.indexOf("machine=");
    if ( a >= 0 )
      {
      machine = document.cookie.substring(a+8);
      if ( machine.indexOf(";") >= 0 )
        {
        machine = machine.substring(0, machine.indexOf(";"));
        }
      }
    }
  document.write("<script language=\"JavaScript\" ",
    "src=\"/cgi/js_log.pl",
    "?res="+res+"&height="+height+"&color="+color+"",
    "&on="+escape(window.location.toString())+"&from="+ref+"",
    "&script=yes&cookies="+cookieson+"&machine="+machine+"\"></script>");
  if ( NFmachineIN != NFmachineOUT )
    {
    document.cookie="machine="+NFmachineOUT+"; path=/; expires=Fri, 31 Dec 2100 23:59:59 GMT";
    }
  }

path = document.referrer;
haslang = ( path.indexOf("/pt/index.htm") >= 0 || path.indexOf("/en/index.htm") >= 0 );
if ( !haslang )
  {
  log();
  }

//-->
