/* This file contains specific nedstat functions */
function sitestat(u)
{
    var d = document; ns_pixelUrl = u + "&ns__t=" + (new 
Date().getTime()); u = ns_pixelUrl + "&ns_c=" + ((d.characterSet) ? d.characterSet : d.defaultCharset) + "&ns_ti=" + escape(d.title) + "&ns_jspageurl=" + escape(d.
URL) + "&ns_referrer=" + escape(d.referrer); (d.images) ? new Image().src = u : d.write('<' + 'p><img src="' + u + '" height="1" width="1" alt="*"/><' + '/p>');
};

/* Begin Sitestat OnClick v1.0 Copyright (c) 2001-2007 Nedstat B.V. All rights reserved.
Modified so that the name parameter should contain the entire url (http://landcode.sitestat.com/klantnaam/sitenaam/s?) */
function ns_onclick(a, url, name, type, winopt)
{
    var ns_l = name; ns_l += '&ns_type=' + type + '&ns_action=view';
    ns_l += '&ns__t=' + (new Date()).getTime(); if (!url) url = a.href;
    var ns_0 = document.referrer; if (ns_0.lastIndexOf('/') == ns_0.length - 1)
        ns_0 = ns_0.substring(ns_0.lastIndexOf('/'), 0);
    if (ns_0.length > 0) ns_l += '&amp;ns_referrer=' + escape(ns_0);
    winopt = winopt || ""; var 
target = (a && a.target && a.target != "") ? (a.target.substring(0, 1) == "_") ? a.target.substring(1) : a.target : "self";
    var ns_i = new Image(); if (target && url)
    {
        if (window[target])
        {
            window.ns_softclick_timer = function(target, url)
            {
                return function()
                {
                    ns_i.onload = ns_i.onerror = function() { return; };
                    window[((window[target]) ? target : "self")].location.href = url;
                } 
            } (target, url);
            window.setTimeout('ns_softclick_timer()', 5000); ns_i.onload = ns_i.onerror = window.ns_softclick_timer;
        } else
        {
            //ITG 128778: added target to the RelatedLinksControl as result for Ahref this needed to be disabled.
            //Buttons also use this function so you cant just use 'return false' to avoid the Href from firing.
            /* window.open(url, target, winopt);*/
        } 
    } ns_i.src = ns_l; return false;
}
