var page  = "http://afr.com" + loc;

if ((document.location.href != "http://172.16.45.35/cgi-bin/gx.cgi"+loc) &&
    (document.location.href != "http://afr.com"+loc) &&
    (document.location.href != "http://www.australianfinancialreview.com.au"+loc) &&
    (document.location.href != "http://www.financialreview.com.au"+loc) &&
    (document.location.href != "http://afr.com"+loc+"?from=ticker&site=afr") &&
    (document.location.href != "http://172.16.45.81"+loc) &&
    (document.location.href != "http://172.16.45.84"+loc) &&
    (document.location.href != "http://203.26.51.49"+loc) &&
    (document.location.href != "http://stage.afr.com"+loc) &&
    (document.location.href != "http://203.26.51.54"+loc) &&
    (document.location.href != "http://web1.afr.com"+loc) &&
    (document.location.href != "http://web2.afr.com"+loc) &&
    (document.location.href != "http://web3.afr.com"+loc) &&
    (document.location.href != "http://web4.afr.com"+loc) &&
    (document.location.href != "http://flame.web.fairfax.com.au"+loc) &&
    (document.location.href != "http://afr.web.fairfax.com.au" + loc)) {

    var nVer  = navigator.appVersion;
    var nAgt  = navigator.userAgent;
    var fVer  = parseFloat(nVer);
    var host  = "";
    var ip    = ""; 
    var osn   = "";

    if ((verOffset=nAgt.indexOf("MSIE")) != -1) {
        fVer = parseFloat(nAgt.substring(verOffset+5,nAgt.length));
    }

    if (navigator.javaEnabled() && (navigator.appName != "Microsoft Internet Explorer")) {
        addr    = java.net.InetAddress.getLocalHost();
    	host    = addr.getHostName(); 
        ip      = addr.getHostAddress();
    } else {
        host = top.location.hostname;
        ip   = addr;
    }

    if (navigator.appVersion.indexOf("95") != -1)             osn = "Win95";
    if (navigator.appVersion.indexOf("98") != -1)             osn = "Win98";
    if (navigator.appVersion.indexOf("NT") != -1)             osn = "WinNT";
    if (navigator.appVersion.indexOf("Windows NT 5.0") != -1) osn = "Win2000";
    if (navigator.appVersion.indexOf("Windows NT 5.1") != -1) osn = "WinXP";
    if (navigator.appVersion.indexOf("16") !=-1)              osn = "Win3.1";
    if (navigator.appVersion.indexOf("Mac") != -1)            osn = "MacOS";
    if (navigator.appVersion.indexOf("X11") != -1)            osn = "UNIX";
    if (navigator.appVersion.indexOf("Linux") != -1)          osn = "Linux";

    var newLocation = "";
    newLocation = "http://afr.com/cgi-bin/update.pl?";
    newLocation += "hl="  + history.length;
    newLocation += "&b="  + navigator.appName;
    newLocation += "&bv=" + fVer;
    newLocation += "&os=" + osn;
    newLocation += "&p="  + navigator.platform;
    newLocation += "&lu=" + document.location;
    newLocation += "&ru=" + document.referrer;
    newLocation += "&hn=" + host;
    newLocation += "&ip=" + ip;
    newLocation += "&sw=" + window.screen.width;
    newLocation += "&sh=" + window.screen.height;
    newLocation += "&pg=" + page;
 
    window.location = newLocation;
    
} 


