/* 
Function to be used from many pages to include the 
correct image to point to SiteStat, additions with 
sitestat4.0 code (5-6-2002) 
*/ 
function sitestat(ns_l) { 
        ns_l += "&ns__t="+new Date().getTime(); 
        ns_pixelUrl=ns_l; 
        if (document.images) { 
                ns_1 = new Image(); 
                ns_1.src = ns_l; 
        } else { 
//                document.write("<img src="+ns_l+" width=1 height=1>"); 
        } 
} 
function createSiteStatLink(code) 
{ 
        var d = document; 
        var strURL; 
        if (d.location.protocol == "http:") 
        { 
                strURL = "http://nl.sitestat.com/unive/unive"; 
        } 
        if (d.location.protocol == "https:") 
        { 
                strURL = "https://nl.sitestat.com/unive/unive"; 
        } 
        if (code == "") 
        { 
                code = d.location.pathname; 
        } 
        code = convertSSCode(code); 
        strURL += ("/s?" + code); 
        sitestat(strURL); 
        
} 
function convertSSCode (instr) { 
        var strWork = new String(); 
        var iLoc; 
        strWork = instr; 
        var intIndexSlash; 
        var intIndexDots; 
        intIndexSlash = strWork.indexOf ('/'); 
        while (intIndexSlash > -1) { 
                strWork = strWork.substr (0, intIndexSlash) + '.' + strWork.substr (intIndexSlash + 1); 
                intIndexSlash = strWork.indexOf ('/'); 
        } 
        if (strWork.indexOf ('sally') == -1) { 
          strWork = 'Sally.' + strWork; 
        } 
        // Strip double dots 
        intIndexDots = strWork.indexOf ('..'); 
        while (intIndexDots > -1) { 
                strWork = strWork.substr (0, intIndexDots) + '.' + strWork.substr (intIndexDots + 2); 
                intIndexDots = strWork.indexOf ('..'); 
        } 
        strWork = strWork.toLowerCase() 
        return strWork; 
}

