var browser, version, thestring, place;
var i_flash,a_flash,v_flash,i_shock,v_shock
var sis
var fv = verCaps("{D27CDB6E-AE6D-11CF-96B8-444553540000}");
///////////////////////////////////////////////////////////////////////////
var file = 'http://www.fattoriasemifonte.it/stat2/contatore2.asp';
///////////////////////////////////////////////////////////////////////////
var detect = navigator.userAgent.toLowerCase();
var controlsis = navigator.userAgent.toLowerCase();
//----------------------------------------------------------------------------------- b = browser
function checkIt(string) {
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}
if (checkIt('konqueror')) {
	browser = "Konqueror";
}
else if (checkIt('k-meleon')) {
	browser = "K-Meleon";
	var rv = detect.match(/k-meleon ([\w.]+)/);
	if (rv) {
		rv = rv[0];
		version = rv.substr(3);
	}
}
else if (checkIt('safari')) browser = "safari";
else if (checkIt('omniweb')) browser = "omniweb";
else if (checkIt('opera')) browser = "opera";
else if (checkIt('webtv')) browser = "webtv";
else if (checkIt('icab')) browser = "icab"
else if (checkIt('msie')) browser = "internet explorer";
else if (checkIt('netscape')) browser = "netscape";
else if (!checkIt('compatible')) {
	if (typeof(navigator.product) != "undefined") { //Mozilla
		browser = "mozilla"
		checkIt('rv')
		version = detect.substr(place + thestring.length,3);
	}else{ // netscape 4.74
		browser = "netscape"
		version = "4.7"
	}
}
else browser = "*";
if (!version) {
	version = detect.substr(place + thestring.length,3);
	if(version=="/6."){
		version = 6
	}
}
var b = "";
if (browser)
	b += browser;
	b = b.toLowerCase();
if (version)
	b += " " + version;
	b = b.toLowerCase();
if (!b)
b = "*"
//----------------------------------------------------------------------------------- sis = sistema
function checkSis(string) {
	place = controlsis.indexOf(string) + 1;
	thestring = string;
	return place;
}
if (checkSis('98')) sis = "windows 98";
if (checkSis('95')) sis = "windows 95";
if (checkSis('win 9x')) sis = "windows me";
if (checkSis('nt')) sis = "windows nt";
if (checkSis('nt 5')) sis = "windows 2000";
if (checkSis('nt 5.1')) sis = "windows xp";
if (checkSis('linux')) sis = "linux";
if (checkSis('mac')) sis = "mac";
if (checkSis('2000')) sis = "windows 2000";
if (!sis)
sis = "*" 
//-----------------------------detect flashplayer
function verCaps(id) {
if (typeof(caps) != "undefined" && typeof(caps.id) != "undefined" && typeof(caps.getComponentVersion) != "undefined")
	return caps.getComponentVersion(id, "ComponentID");
else
	return false;
}
<!--per netscape e altri -->
if (fv) 
	a_flash = fv;
	if (navigator.plugins) {
		for (var i=0; i < navigator.plugins.length; i++) {
			if (navigator.plugins[i].name.toLowerCase().indexOf("shockwave flash") >= 0) {
				i_flash = true;
				v_flash = navigator.plugins[i].description.substring(navigator.plugins[i].description.toLowerCase().lastIndexOf("flash ") + 6, navigator.plugins[i].description.length);
				v_flash= v_flash.slice(0,1)
			}
			if (navigator.plugins[i].name.indexOf("Shockwave for Director") >= 0) {
				i_shock = true;
				v_shock = navigator.plugins[i].description.substring(navigator.plugins[i].description.toLowerCase().lastIndexOf("version ") + 8, navigator.plugins[i].description.length);
				v_shock= v_shock.slice(0,3)
			}
		}
	}
//document.write('</SCR' + 'IPT\> \n');
<!--per explorer -->
document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
document.write('on error resume next \n');
document.write('set f = CreateObject("ShockwaveFlash.ShockwaveFlash") \n');
document.write('if IsObject(f) then \n');
document.write('	i_flash = true \n');
document.write('	v_flash = hex(f.FlashVersion()) \n');
document.write('	v_flash=left(v_flash,1) \n');
document.write('end if \n');
document.write('set s = CreateObject("SWCtl.SWCtl") \n');
document.write('if IsObject(s) then \n');
document.write('	i_shock = true \n');
document.write('	v_shock = s.ShockwaveVersion("") \n');
document.write('	v_shock=left(v_shock,3) \n');
document.write('end if \n');
// -->
document.write('</SCR' + 'IPT\> \n');
//document.write('<SCR' + 'IPT LANGUAGE=JavaScript\> \n');
//----------------------------------------------------------------------------------- RACCOLTA DATI ---------------------------------
//----------------------------------------------------------------------------------- l = lingua
l = navigator.browserLanguage
if (!l){ //ns 4.74
l = navigator.language
}
l = l.slice(0,2)
if (!l)
l = "*"
//----------------------------------------------------------------------------------- ref = referrer
ref ='' + escape(document.referrer);
if (!ref)
ref = "*"
//----------------------------------------------------------------------------------- u = pagina
u ='' + escape(document.URL);
//----------------------------------------------------------------------------------- ris = risoluzione
w = screen.width;
h = screen.height; 
ris= w+"x"+h
if (!ris)
ris = "*"
//----------------------------------------------------------------------------------- c = colori
v = navigator.appName; 
if (v != 'Netscape') {
	c = screen.colorDepth;
} else {
	c = screen.pixelDepth;
}
if (!c)
c = "*"
//----------------------------------------------------------------------------------- plugin
if (!v_shock)
v_shock = "*"
if (!v_flash)
v_flash = "*"
//----------------------------------------------------------------------------------- tempo di permanenza
var d = new Date();
var o = d.getHours()
if (!o)
o = "*"

//----------------------------------------------------------------------------------- INVIO DATI ---------------------------------
info='ris=' + ris + '&c=' + c + '&b=' + b + '&o='+ o + '&u='+ u + '&v_flash=' + v_flash + '&v_shock=' + v_shock + '&sis=' + sis + '&l=' + l + '&ref=' + ref;
document.write('<img src="' + file + '?'+info+ '" width=0 height=0 border=0>');
//---------------------per debug-----------------------------
//newWindow = window.open('http://192.168.1.2/s/stat2/debugStat.asp'+'?'+info, 'popup','height=300,width=600', 'top=10,left=10');
//newWindow.focus();
//-----------------------------------------------------------