var summaryImg = "/log____image.gif?summarylog";
var extLogImg = "/general/graphics/extlog.gif?st=1";

/* appends given parameter to image path.  */
function appendImgPath(extLogKey, summaryKey, value) {
	if(value == null || value== "") value="undefined";

	//make it Sring
	value=""+value;
	if (summaryKey != null) {
		summaryImg += "&" + summaryKey + "=" + escape(value);
	}
	
	if (extLogKey != null)  {
		extLogImg += "&" + extLogKey  + "=" + escape(value);
	}
}

function generateStatistics() {
	appendImgPath("js", null, "true" );
	appendImgPath("pt", null , navigator.platform );
	appendImgPath("co" ,"co", "" + navigator.cookieEnabled );
	appendImgPath("je", "je", "" + navigator.javaEnabled());
	appendImgPath("br", null , navigator.appName + " " + navigator.appVersion );
	appendImgPath("sd" , "sd" , (screen.colorDepth?screen.colorDepth:screen.pixelDepth));


	appendImgPath("res" , null,  screen.width + "x" + screen.height);

	if (document.body && document.body.clientWidth) {
		innerWidth= document.body.clientWidth;
		innerHeight= document.body.clientHeight;
	} else {
		innerWidth= window.innerWidth;
		innerHeight= window.innerHeight;
	}


	appendImgPath("innerDimension/",null, "" + innerWidth +"x" + innerHeight);

	appendImgPath(null , "sw", screen.width);
	appendImgPath(null , "sh", screen.height);
	appendImgPath(null , "ww", innerWidth);
	appendImgPath(null , "wh", innerHeight);

	appendImgPath("la", "la", (navigator.language?navigator.language:navigator.userLanguage));
	appendImgPath("cpu" , null, navigator.cpuClass);
	appendImgPath("od", null,  window.outerWidth + "x" + window.outerHeight);
	appendImgPath("his", null, window.history?window.history.length:0);

	appendImgPath("agent", null, navigator.userAgent);
	var pluginName="";
	var pluginNameOld="";

	for(var i=0; i < navigator.plugins.length; i++) {
		pluginName = navigator.plugins[i].name;

		if (pluginName != pluginNameOld ) {
			appendImgPath("plugins/name/", "p", navigator.plugins[i].name);
		}
		pluginNameOld=navigator.plugins[i].name;
	}

	document.write( "<img width=\"1\" height=\"1\" border=\"0\" src=\"" + summaryImg + "\" />" );
	document.write( "<img width=\"1\" height=\"1\" border=\"0\" src=\"" + extLogImg + "\" />" );
}
