

function setCookie(cookieName, cookieValue, expires, path, domain, secure) {
	document.cookie =
		escape(cookieName) + '=' + escape(cookieValue)
		+ (expires ? '; expires=' + expires.toGMTString() : '')
		+ (path ? '; path=' + path : '')
		+ (domain ? '; domain=' + domain : '')
		+ (secure ? '; secure' : '');
};

// waarde uit cookie
function getCookie(cookieName) {
	var cookieValue = '';
	var posName = document.cookie.indexOf(escape(cookieName) + '=');
	if (posName != -1) {
		var posValue = posName + (escape(cookieName) + '=').length;
		var endPos = document.cookie.indexOf(';', posValue);
		if (endPos != -1) cookieValue = unescape(document.cookie.substring(posValue, endPos));
		else cookieValue = unescape(document.cookie.substring(posValue));
	}
	return (cookieValue);
};

visitor = 1;
if (getCookie('visitor') != '1') {
	visitor = 0;
	setCookie('visitor','1');	
}
pagina = escape(document.location.href); 
ref = escape(document.referrer); 
if ((ref == "") || (ref == "undefined")) { ref = "bookmark"; } 
ss = screen.width + "x" + screen.height; 
sc = (navigator.appName.indexOf("Microsoft") > -1) ? screen.colorDepth : screen.pixelDepth; 
src = "./cms/templates/stat/stat.php?pagina=" + pagina + "&ref=" + ref + "&ss=" + ss + "&sc=" + sc + "&visitor=" + visitor;

src = "<img src=\"" + src + "\" width=1 height=1 border=0 align=\"left\">"; 
document.write(src); 