var url = 'analytics.szerver1.eu';var protocol = 'https';var version = '0.3';var WebfinityAnalytics_today = new Date();
var WebfinityAnalytics_zero_date = new Date(0,0,0);
WebfinityAnalytics_today.setTime(WebfinityAnalytics_today.getTime() - WebfinityAnalytics_zero_date.getTime());
var WebfinityAnalytics_cookie_expire_date = new Date(WebfinityAnalytics_today.getTime() + (8 * 7 * 86400000));


var WebfinityAnalytics_sessionName  = 'webfinity_analytics_' + (version * 10000);

if (WebfinityAnalytics_Get_Cookie(WebfinityAnalytics_sessionName)) {
    var WebfinityAnalytics_sessionID = WebfinityAnalytics_Get_Cookie(WebfinityAnalytics_sessionName);
    } else {
    WebfinityAnalytics_sessionID = WebfinityAnalyticsUniquid();
    WebfinityAnalytics_Set_Cookie(WebfinityAnalytics_sessionName, WebfinityAnalytics_sessionID, WebfinityAnalytics_cookie_expire_date);
    }


if (typeof document != 'undefined' && document.characterSet ) WebfinityAnalytics_charSet = document.characterSet;
else WebfinityAnalytics_charSet = 'UNKNOWN';


var userData = 'UNKNOWN';
try {
    userData = getUserData();

    userData.charset = WebfinityAnalytics_charSet;
    userData.sessionID = WebfinityAnalytics_sessionID;
    userData = JSON.stringify(userData);
    userData = userData.replace(/\|/g, ' ');
    }
catch (err) { }


webfinity_analytics_ajax(userData, WebfinityAnalytics_sessionID);




  function webfinity_analytics_base64_encode(data) {
      var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
    var o1, o2, o3, h1, h2, h3, h4, bits, i = 0,
        ac = 0,
        enc = '',
        tmp_arr = [];

    if (!data) {
        return data;
    }

    data = unescape(encodeURIComponent(data));

    do {
                o1 = data.charCodeAt(i++);
        o2 = data.charCodeAt(i++);
        o3 = data.charCodeAt(i++);

        bits = o1 << 16 | o2 << 8 | o3;

        h1 = bits >> 18 & 0x3f;
        h2 = bits >> 12 & 0x3f;
        h3 = bits >> 6 & 0x3f;
        h4 = bits & 0x3f;

                tmp_arr[ac++] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4);
    } while (i < data.length);

    enc = tmp_arr.join('');

    var r = data.length % 3;

    return (r ? enc.slice(0, r - 3) : enc) + '==='.slice(r || 3);
}



  function webfinity_analytics_ajax(data, sessionID) {

      var xmlhttp = new XMLHttpRequest();

      xmlhttp.onload = function () {
          if (xmlhttp.status == 200) {

                                                                  }
          else if (xmlhttp.status == 400) {
                        }
          else {
                        }
      }

      xmlhttp.open("POST", protocol + "://" + url + "/receive_userdata.php?sessionID=" + sessionID, true);
      xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      xmlhttp.send("d=" + webfinity_analytics_base64_encode(data));
} 





  function WebfinityAnalyticsUniquid() {
      function s4() {
          return Math.floor((1 + Math.random()) * 0x10000)
              .toString(16)
              .substring(1);
      }
      return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();
  }




  function WebfinityAnalytics_Get_Cookie(name) {
      var start = document.cookie.indexOf(name+"=");
      var len = start+name.length+1;
      if ((!start) && (name != document.cookie.substring(0,name.length))) return null;
      if (start == -1) return null;
      var end = document.cookie.indexOf(";",len);
      if (end == -1) end = document.cookie.length;
      return unescape(document.cookie.substring(len,end));
  }

  function WebfinityAnalytics_Set_Cookie(name,value,expires,path,domain,secure) {
      var cookieString = name + "=" +escape(value) +
      ( (expires) ? ";expires=" + expires.toGMTString() : "") +
          ( (path) ? ";path=" + path : "") +
          ( (domain) ? ";domain=" + domain : "") +
          ( (secure) ? ";secure" : "");
      document.cookie = cookieString;
  }

  function WebfinityAnalytics_Delete_Cookie(name,path,domain) {
      if (Get_Cookie(name)) document.cookie = name + "=" +
          ( (path) ? ";path=" + path : "") +
          ( (domain) ? ";domain=" + domain : "") +
      ";expires=Thu, 01-Jan-70 00:00:01 GMT";
  }







/* CLASS userData */
/* -------------- */
function getUserData() {



var userData = {};

   userData.GetLanguage = function() {
	   if (navigator.userLanguage != undefined) {
	   return(navigator.userLanguage);
	   } else if (navigator.language != undefined) {
	   return(navigator.language);
	   } else {
	   return("-undefined-");
	   }
	}

   userData.VersionMinor = function() {
   var versMajor = parseInt(navigator.appVersion,10);
   var appVers = navigator.appVersion;
   var pos, versMinor = 0;
   if ((pos = appVers.indexOf ("MSIE")) > -1) {
	    versMinor = parseFloat(appVers.substr (pos+5));
   } else {
	    versMinor = parseFloat(appVers);
   }
   return (versMinor);
}
   
   userData.ScreenWidth = function() {
   if (window.screen) {
		return(screen.width);
   } else {
        return(0);
   }
}
   
   userData.ScreenHeight = function() {
   if (window.screen) {
		return(screen.height);
   } else {
		return(0);
   }
}

userData.codeName         =  navigator.appCodeName;
userData.appName          =  navigator.appName;
userData.appVersion       =  navigator.appVersion;
userData.lng              =  userData.GetLanguage();
userData.browserLanguage  =  navigator.browserLanguage;
userData.systemLanguage   =  navigator.systemLanguage;
userData.userLanguage     =  navigator.userLanguage;
userData.appPlatform      =  navigator.platform;
userData.userAgent        =  navigator.userAgent;
userData.javaEnabled      =  navigator.javaEnabled();
userData.versionMajor     =  parseInt(navigator.appVersion,10);
userData.versionMinor     =  userData.VersionMinor();
userData.screenWidth      =  userData.ScreenWidth();
userData.screenHeight     =  userData.ScreenHeight();
userData.cookieEnabled    =  navigator.cookieEnabled;
userData.cpuClass         =  navigator.cpuClass;
userData.oscpu            =  navigator.oscpu;
userData.product          =  navigator.product;
userData.productSub       =  navigator.productSub;
userData.onLine           =  navigator.onLine;
userData.buildID          =  navigator.buildID;
userData.geolocation      =  navigator.geolocation;
userData.battery          =  navigator.battery;
userData.compatMode       =  navigator.compatMode;
userData.innerWidth       =  window.innerWidth;
userData.innerHeight      =  window.innerHeight;
userData.windowName      =  window.name;
userData.cookieEnabled      =  window.cookieEnabled;
userData.language      =  window.language;
userData.onLine      =  window.navigator.onLine;
userData.outerHeight      =  window.outerHeight;
userData.outerWidth      =  window.outerWidth;
userData.pageXOffset      =  window.pageXOffset;
userData.pageYOffset      =  window.pageYOffset;
userData.availHeight      =  window.screen.availHeight;
userData.availWidth      =  window.screen.availWidth;
userData.colorDepth      =  window.screen.colorDepth;
userData.height      =  window.screen.height;
userData.width      =  window.screen.width;
userData.pixelDepth      =  window.screen.pixelDepth;
userData.screenLeft      =  window.screenLeft;
userData.screenTop      =  window.screenTop;
userData.screenX      =  window.screenX;
userData.screenY      =  window.screenY;


userData.plugins          =  []; 
var numPlugins = navigator.plugins.length;
for (i = 0; i < numPlugins; i++) {
	var plugin = navigator.plugins[i];
		userData.plugins[i] = [];
	userData.plugins[i][1] = plugin.name;  
	userData.plugins[i][2] = plugin.description;
	userData.plugins[i][3] = plugin.filename;
	temp = [];
	for (j = 0; j < plugin.length; j++) {
		temp[j] = [];
		temp[j] = plugin[j].type;
		temp[j] = temp[j] + ":::" + plugin[j].description;
		temp[j] = temp[j] + ":::" + plugin[j].suffixes;

	}
	userData.plugins[i][4] = temp;
}

var d = new Date();
userData.Date          =  Date(); 
userData.getTime       =  d.getTime();
userData.getTimezoneOffset = d.getTimezoneOffset();
userData.numberMIN_VALUE  = Number.MIN_VALUE;
userData.numberMAX_VALUE  = Number.MAX_VALUE;
userData.numberPOSITIVE_INFINITY = Number.POSITIVE_INFINITY;

if (document.URL != undefined) userData.URL = document.URL;
else document.URL = '-undefined-'

return userData;
}

   
   
   