function GetStats(site,iconsize){
var sUrl = document.location.href;
var docId = requestQueryString(sUrl, "id");
var docName = escape(document.title);

	for(i=0; i < docName.length; i++){
		docName = docName.replace("%E4", "&auml;");
		docName = docName.replace("%E5", "&aring;");
		docName = docName.replace("%F6", "&ouml;");
		
		docName = docName.replace("%C4", "&Auml;");
		docName = docName.replace("%C5", "&Aring;");
		docName = docName.replace("%D6", "&Ouml;");
		
		docName = docName.replace("%20", " ");
		docName = docName.replace("%2C", ",");
		docName = docName.replace("%22", "&quot;");
	}

    // url where the page is submitted to
    // change this to the address the script resides on
	var srv="http://www.indexator.se/";

	var u=srv+"/stats/indexator/info.asp?site="+escape(site);
	
	// where did he come from?
	var r=document.referrer;
	
	//OBS för att ställa in interna länkar
	if (r.substring(0,23) == "http://www.indexator.se" || r.substring(0,19) == "http://indexator.se" || r.substring(0,24) == "http://www.indexator.com" || r.substring(0,16) == "http://localhost"){
		r = "&lt;Internal reference&gt;";
		//alert(r);
	}
	else if(r == "" || r == null){
		r = "&lt;No referrer&gt;";
	}
		
	// where is he now?
	//var d=document.location;
	//var d=docName+' ('+ docId +')';
	var d=docName;
	var did=docId;
	
	// screen size
	var s = screen.width + "x" + screen.height;
	// screen colordepth
	var c=screen.colorDepth
	
	// browser
	var n=navigator.appName + " " + navigator.appVersion + "." + navigator.appMinorVersion
	var operativ 
	
	if (n.match("Windows")){
		if (n.match("Microsoft Pocket Internet Explorer 4.0")){
			operativ = "(Windows Pocket PC)";
		}
		else{
			operativ = "(Windows)";
		}
	}
	else if (n.match("Macintosh")){
		operativ = "(Macintosh)";
	}
	else if (n.match("Unix") ||n.match("UNIX")){
		operativ = "(UNIX)";
	}
	else{
		operativ = "(Unknown)";
	}
	
	//
	if (n.match("MSIE")){
		//Det var IE, vilken version?
		if (n.match("MSIE 7")){
			n= "Internet Explorer 7 " + operativ;
		}
		if (n.match("MSIE 6.0")){
			n= "Internet Explorer 6 " + operativ;
			
		}
		else if (n.match("MSIE 5.5")){
			n= "Internet Explorer 5.5 " + operativ;
		}
		else if (n.match("MSIE 5.0")){
			n= "Internet Explorer 5 " + operativ;
		}
		else if (n.match("MSIE 4")){
			n= "Internet Explorer 4 " + operativ;
		}
		else{
			n= "Unknown Internet Explorer " + operativ;
		}
		
	}
		
	else if (n.match("Netscape")){
		//Det var Mozilla/Netscape, vilken version?
		n="Mozilla/Netscape compatible " + navigator.appVersion;			
	}
	
	else if (n.match("Opera")){
		//Det var Opera, vilken version?
		n="Opera compatible " + navigator.appVersion + " " + operativ;
	}
	else {
		n= "(Unknown browser) " + operativ;
	}	
	
	// cpu class, most likely is x86
	var cpu=navigator.cpuClass;
	// platform
	var p=navigator.platform;
	// random, to prevent the browser from taking a cached image and not do a call to the server
	var rnd=Math.random();

	u+="&d="+escape(d)+"&r="+escape(r)+"&s="+escape(s)+"&did="+escape(did)+"&c="+escape(c)+"&n="+escape(n)+"&cpu="+escape(cpu)+"&p="+escape(p)+"&rnd="+escape(rnd);
	//document.write('<a target=_blank href="'+srv+'stats.asp?site='+escape(site)+'"><img align=absMiddle src="'+u+'" border=0 width='+iconsize+' height='+iconsize+' alt="Statistics"></a>');
	document.write('<img align=absMiddle src="'+u+'" border=0 width='+iconsize+' height='+iconsize+'>');
//document.write(u); 
//document.write(docName);
}
//----------------------------------------------------------------------------
//alert('Funkar hittills..');

function getKnapp(link, knappNamn, idet){
var site = "site";
var sUrl = document.location.href;
var docId = escape(idet); //requestQueryString(sUrl, "id");
var docName = knappNamn; //escape(document.title);
//http://www.karelma.com/internet/javascriptkod.html

	for(i=0; i < docName.length; i++){
		docName = docName.replace("%E4", "&auml;");
		docName = docName.replace("%E5", "&aring;");
		docName = docName.replace("%F6", "&ouml;");

		docName = docName.replace("%C4", "&Auml;");
		docName = docName.replace("%C5", "&Aring;");
		docName = docName.replace("%D6", "&Ouml;");

		docName = docName.replace("%20", " ");
		docName = docName.replace("%2C", ",");
		docName = docName.replace("%22", "&quot;");
	}

    // url where the page is submitted to
    // change this to the address the script resides on
	var srv="http://www.indexator.se/";

	var u=srv+"/stats/indexator/knappinfo.asp?site="+escape(site);
	
	// where did he come from?
	var r=document.referrer;
	
	//OBS för att ställa in interna länkar
	//if (r.substring(0,28) == "http://www.komatsuforest.com" || r.substring(0,16) == "http://localhost"){
	if (r.substring(0,23) == "http://www.indexator.se" || r.substring(0,19) == "http://indexator.se" || r.substring(0,24) == "http://www.indexator.com" || r.substring(0,16) == "http://localhost"){
		r = "&lt;Internal reference&gt;";
		//alert(r);
	}
	else if(r == "" || r == null){
		r = "&lt;No referrer&gt;";
	}
		
	// where is he now?
	//var d=document.location;
	//var d=docName+' ('+ docId +')';
	var d=docName;
	var did=docId;
	
	// screen size
	var s = screen.width + "x" + screen.height;
	// screen colordepth
	var c=screen.colorDepth
	
	// browser
	var n=navigator.appName + " " + navigator.appVersion + "." + navigator.appMinorVersion
	var operativ 
	
	if (n.match("Windows")){
		if (n.match("Microsoft Pocket Internet Explorer 4.0")){
			operativ = "(Windows Pocket PC)";
		}
		else{
			operativ = "(Windows)";
		}
	}
	else if (n.match("Macintosh")){
		operativ = "(Macintosh)";
	}
	else if (n.match("Unix") ||n.match("UNIX")){
		operativ = "(UNIX)";
	}
	else{
		operativ = "(Unknown)";
	}
	
	//
	if (n.match("MSIE")){
		//Det var IE, vilken version?
		if (n.match("MSIE 7")){
			n= "Internet Explorer 7 " + operativ;
		}
		if (n.match("MSIE 6.0")){
			n= "Internet Explorer 6 " + operativ;
			
		}
		else if (n.match("MSIE 5.5")){
			n= "Internet Explorer 5.5 " + operativ;
		}
		else if (n.match("MSIE 5.0")){
			n= "Internet Explorer 5 " + operativ;
		}
		else if (n.match("MSIE 4")){
			n= "Internet Explorer 4 " + operativ;
		}
		else{
			n= "Unknown Internet Explorer " + operativ;
		}
		
	}
		
	else if (n.match("Netscape")){
		//Det var Mozilla/Netscape, vilken version?
		n="Mozilla/Netscape compatible " + navigator.appVersion;			
	}
	
	else if (n.match("Opera")){
		//Det var Opera, vilken version?
		n="Opera compatible " + navigator.appVersion + " " + operativ;
	}
	else {
		n= "(Unknown browser) " + operativ;
	}	
	
	// cpu class, most likely is x86
	var cpu=navigator.cpuClass;
	// platform
	var p=navigator.platform;
	// random, to prevent the browser from taking a cached image and not do a call to the server
	var rnd=Math.random();

	u+="&d="+escape(d)+"&r="+escape(r)+"&did="+did+"&s="+escape(s)+"&c="+escape(c)+"&n="+escape(n)+"&cpu="+escape(cpu)+"&p="+escape(p)+"&rnd="+escape(rnd);
	
	//För bild - 
	
	document.write('<img align=absMiddle src="'+u+'" border=0 width=0 height=0 alt="Statistics">');
	
	//Nytt fönster
	setTimeout(window.open(link),2000)
	window.history.go(-1);
	
}


//----------------------------------------------------------------------------
function getPdfKnapp(knappNamn, idet){
var site = "site";
var sUrl = document.location.href;
var docId = escape(idet); //requestQueryString(sUrl, "id");
var docName = knappNamn; //escape(document.title);
//http://www.karelma.com/internet/javascriptkod.html

	for(i=0; i < docName.length; i++){
		docName = docName.replace("%E4", "&auml;");
		docName = docName.replace("%E5", "&aring;");
		docName = docName.replace("%F6", "&ouml;");

		docName = docName.replace("%C4", "&Auml;");
		docName = docName.replace("%C5", "&Aring;");
		docName = docName.replace("%D6", "&Ouml;");

		docName = docName.replace("%20", " ");
		docName = docName.replace("%2C", ",");
		docName = docName.replace("%22", "&quot;");
	}

    // url where the page is submitted to
    // change this to the address the script resides on
	var srv="http://www.indexator.se/";

	var u=srv+"/stats/indexator/knappinfo.asp?site="+escape(site);
	
	// where did he come from?
	var r=document.referrer;
	
	//OBS för att ställa in interna länkar
	//if (r.substring(0,28) == "http://www.komatsuforest.com" || r.substring(0,16) == "http://localhost"){
	if (r.substring(0,23) == "http://www.indexator.se" || r.substring(0,19) == "http://indexator.se" || r.substring(0,24) == "http://www.indexator.com" || r.substring(0,16) == "http://localhost"){
		r = "&lt;Internal reference&gt;";
		//alert(r);
	}
	else if(r == "" || r == null){
		r = "&lt;No referrer&gt;";
	}
		
	// where is he now?
	//var d=document.location;
	//var d=docName+' ('+ docId +')';
	var d=docName;
	var did=docId;
	
	// screen size
	var s = screen.width + "x" + screen.height;
	// screen colordepth
	var c=screen.colorDepth
	
	// browser
	var n=navigator.appName + " " + navigator.appVersion + "." + navigator.appMinorVersion
	var operativ 
	
	if (n.match("Windows")){
		if (n.match("Microsoft Pocket Internet Explorer 4.0")){
			operativ = "(Windows Pocket PC)";
		}
		else{
			operativ = "(Windows)";
		}
	}
	else if (n.match("Macintosh")){
		operativ = "(Macintosh)";
	}
	else if (n.match("Unix") ||n.match("UNIX")){
		operativ = "(UNIX)";
	}
	else{
		operativ = "(Unknown)";
	}
	
	//
	if (n.match("MSIE")){
		//Det var IE, vilken version?
		if (n.match("MSIE 7")){
			n= "Internet Explorer 7 " + operativ;
		}
		if (n.match("MSIE 6.0")){
			n= "Internet Explorer 6 " + operativ;
			
		}
		else if (n.match("MSIE 5.5")){
			n= "Internet Explorer 5.5 " + operativ;
		}
		else if (n.match("MSIE 5.0")){
			n= "Internet Explorer 5 " + operativ;
		}
		else if (n.match("MSIE 4")){
			n= "Internet Explorer 4 " + operativ;
		}
		else{
			n= "Unknown Internet Explorer " + operativ;
		}
		
	}
		
	else if (n.match("Netscape")){
		//Det var Mozilla/Netscape, vilken version?
		n="Mozilla/Netscape compatible " + navigator.appVersion;			
	}
	
	else if (n.match("Opera")){
		//Det var Opera, vilken version?
		n="Opera compatible " + navigator.appVersion + " " + operativ;
	}
	else {
		n= "(Unknown browser) " + operativ;
	}	
	
	// cpu class, most likely is x86
	var cpu=navigator.cpuClass;
	// platform
	var p=navigator.platform;
	// random, to prevent the browser from taking a cached image and not do a call to the server
	var rnd=Math.random();

	u+="&d="+escape(d)+"&r="+escape(r)+"&did="+did+"&s="+escape(s)+"&c="+escape(c)+"&n="+escape(n)+"&cpu="+escape(cpu)+"&p="+escape(p)+"&rnd="+escape(rnd);
	
	//För bild - 
	
	document.write('<img align=absMiddle src="'+u+'" border=0 width=0 height=0 alt="Statistics">');
	
	//Nytt fönster
	//setTimeout(window.open(link),2000)
	window.history.go(-1);
	
}
//----------------------------------------------------------------------------
// Övriga funktioner

