/* PluginDetect v0.2.0 by Eric Gerds */ var PluginDetect={minIEver:5.5,getNum:function(A){if(!A){return null}var m=/[\d][\d\.\_,-]*/.exec(A);return m?m[0].replace(/[\.\_-]/g,","):null},hasMimeType:function(_3){var s,t,z,M=_3.constructor==String?[_3]:_3;for(z=0;z<M.length;z++){s=navigator.mimeTypes[M[z]];if(s&&s.enabledPlugin){t=s.enabledPlugin;if(t.name||t.description){return s}}}return null},findNavPlugin:function(N,_6){var _7=N.constructor==String?N:N.join(".*"),numS=_6===false?"":"\\d";var i,re=new RegExp(_7+".*"+numS+"|"+numS+".*"+_7,"i");var _9=navigator.plugins;for(i=0;i<_9.length;i++){if(re.test(_9[i].description)||re.test(_9[i].name)){return _9[i]}}return null},getAXO:function(_a){var _b,e;try{_b=new ActiveXObject(_a);return _b}catch(e){}return null},num:function(A){return (typeof A!="string"?false:(/\d/).test(A))},compareNums:function(_d,_e){if(!this.num(_d)||!this.num(_e)){return 0}var m1=_d.split(","),m2=_e.split(","),x,p=parseInt;for(x=0;x<Math.min(m1.length,m2.length);x++){if(p(m1[x],10)>p(m2[x],10)){return 1}if(p(m1[x],10)<p(m2[x],10)){return -1}}return 0},formatNum:function(num){if(!this.num(num)){return null}var n=num.replace(/[\.\_]/g,","),i;n=n.split(",").concat(["0","0","0","0"]);return n.slice(0,4).join(",")},initScript:function(){var $=this,IE;$.isIE=(/*@cc_on!@*/false);$.IEver=-1;if($.isIE){var IE=(/msie\s*\d\.{0,1}\d*/i).exec(navigator.userAgent),progid,x;if(IE){$.IEver=parseFloat((/\d.{0,1}\d*/i).exec(IE[0]),10)}progid=["ShockwaveFlash.ShockwaveFlash","Msxml2.XMLHTTP","Microsoft.XMLDOM","Msxml2.DOMDocument","TDCCtl.TDCCtl","Shell.UIHelper","Scripting.Dictionary"];$.ActiveXEnabled=false;for(x=0;x<progid.length;x++){if($.getAXO(progid[x])){$.ActiveXEnabled=true;break}}};if($.ActiveXEnabled&&$.IEver>=$.minIEver){$.head=typeof document.getElementsByTagName!="undefined"?document.getElementsByTagName("head")[0]:null;var T=document.createElement("script");T.setAttribute("type","text/vbscript");var Y=["<!"+"--","function PluginDetect1(c)","on error resume next","PluginDetect1=false","dim head, r","set head=PluginDetect.head","set r=head.firstChild","if TypeName(r)=\"HTMLObjectElement\" then","r.setAttribute \"classid\", c","if not TypeName(r.getAttribute(\"object\")) = \"Nothing\" then","PluginDetect1=true","if r.getAttribute(\"readyState\")<4 then","r.clearAttributes()","head.removeChild(r)","end if","else r.clearAttributes()","head.removeChild(r)","end if","end if","r=\"Nothing\"","head=\"Nothing\"","end function","--"+">"];T.setAttribute("text",Y.join("\n"));if($.head.firstChild){$.head.insertBefore(T,$.head.firstChild)}else{$.head.appendChild(T)}$.vbscript=false;var e;$.head.insertBefore(document.createElement("object"),$.head.firstChild);try{if(PluginDetect1("")===false){$.vbscript=true}}catch(e){}}},init:function(_17){var $=this,IE,p;_17=_17.toLowerCase().replace(/\s/g,"");p=$.plugin=$[_17];if(!p){return -3}if(typeof p.minversion=="undefined"){p.minversion={}}if(typeof p.version=="undefined"){p.version=null}if(typeof p.installed=="undefined"){p.installed=null}$.garbage=false;if($.isIE&&!$.ActiveXEnabled){return -2}return 1},isMinVersion:function(_19,_1a){return -3},getVersion:function(_1e){var $=PluginDetect,i=$.init(_1e);if(i<0){return null}var p=$.plugin;if(p.installed==null){p.getVersion()}$.cleanup();return p.version;return null},cleanup:function(){var $=this;if($.garbage&&typeof window.CollectGarbage!="undefined"){window.CollectGarbage()}},isActiveXObject:function(_22){var $=this,result,s="<object width=\"1\" height=\"1\" "+"style=\"display:none\" "+$.plugin.getCodeBaseVersion(_22)+">"+$.plugin.HTML+"</object>";$.head.insertBefore(document.createElement("object"),$.head.firstChild);$.head.firstChild.outerHTML=s;result=$.vbscript?PluginDetect1($.plugin.classID):$.detect($.plugin.classID);return result},detect:function(_24){var $=this,result;$.head.firstChild.setAttribute("classid",_24);result=$.head.firstChild.getAttribute("object")?true:false;if(!result||$.head.firstChild.getAttribute("readyState")<4){$.head.firstChild.clearAttributes();$.head.removeChild($.head.firstChild);$.garbage=true}return result},search:function(){var _26=[0,0,0,0];var $=this,x,y,A=$.plugin.digits,t=function(x,y){var _2a=(x==0?y:_26[0])+","+(x==1?y:_26[1])+","+(x==2?y:_26[2])+","+(x==3?y:_26[3]);return $.isActiveXObject(_2a)};var _2b,upper,tmp;var _2c=false;for(x=0;x<A.length;x++){upper=A[x]*2;_26[x]=0;for(y=0;y<20;y++){if(upper==1&&x>0&&_2c){break}if(upper-_26[x]>1){tmp=Math.round((upper+_26[x])/2);if(t(x,tmp)){_26[x]=tmp;_2c=true}else{upper=tmp}}else{if(upper-_26[x]==1){upper--;if(!_2c&&t(x,upper)){_2c=true}break}else{if(!_2c&&t(x,upper)){_2c=true}break}}}if(!_2c){return null}}return _26[0]+","+_26[1]+","+_26[2]+","+_26[3]},dummy1:0};PluginDetect.initScript();PluginDetect.quicktime={mimeType:["video/quicktime","application/x-quicktimeplayer","image/x-macpaint","image/x-quicktime"],progID:"QuickTimeCheckObject.QuickTimeCheck.1",progID0:"QuickTime.QuickTime",classID:"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B",minIEver:7,HTML:"<param name=\"src\" value=\"A14999.mov\" /><param name=\"controller\" value=\"false\" />",getCodeBaseVersion:function(v){return "codebase=\"#version="+v+"\""},digits:[16,16,16,0],getVersion:function(){var _2e=null,p,$=PluginDetect;if(!$.isIE){p=$.findNavPlugin(["QuickTime","(Plug-in|Plugin)"]);if(p&&p.name&&$.hasMimeType(this.mimeType)){_2e=$.getNum(p.name)}this.installed=_2e?1:-1}else{var obj;if($.IEver<this.minIEver){obj=$.getAXO(this.progID);if(obj&&obj.QuickTimeVersion){_2e=obj.QuickTimeVersion.toString(16);_2e=_2e.charAt(0)+"."+_2e.charAt(1)+"."+_2e.charAt(2)}}else{_2e=$.search()}this.installed=_2e?1:($.getAXO(this.progID0)?0:-1)}this.version=$.formatNum(_2e)}};PluginDetect.java={mimeType:"application/x-java-applet",classID:"clsid:8AD9C840-044E-11D1-B3E9-00805F499D93",JavaVersions:["1.7.0.15","1.6.0.15","1.5.0.14","1.4.2.13","1.3.1.18"],searchJava:function(M){if(!M){return null}var G,e,x3,x4;var AXO=ActiveXObject;var T=M.split("."),J="JavaPlugin."+T[0]+T[1],v=T[0]+"."+T[1]+".";for(x3=T[2];x3>=0;x3--){for(x4=T[3];x4>=0;x4--){G=x4<10?"0"+x4:x4;try{new AXO(J+x3+"_"+G);return v+x3+"_"+G}catch(e){}}if(J+x3=="JavaPlugin.131"){return null}try{new AXO(J+x3);return v+x3}catch(e){}}return null},minIEver:5.5,HTML:"<param name=\"code\" value=\"A14999.class\" />",getCodeBaseVersion:function(v){var r=this.getDigits(v),$=PluginDetect;if($.compareNums(v,"1,4,1,02")<0){v=r[0]+","+r[1]+","+r[2]+","+r[3]}else{if($.compareNums(v,"1,5,0,02")<0){v=r[0]+","+r[1]+","+r[2]+","+r[3]+"0"}else{v=Math.round((parseFloat(r[0]+"."+r[1],10)-1.5)*10+5)+","+r[2]+","+r[3]+"0"+",0"}}return "codebase=\"#version="+v+"\""},digits:[1,9,32,32],getDigits:function(n){/([\d]+)[,_\.]([\d]+)[,_\.]([\d]+)[,_\.]([\d]+)/.test(n);return [RegExp.$1,RegExp.$2,RegExp.$3,RegExp.$4]},hasRun:false,value:null,queryJavaHandler:function(){var $=PluginDetect.java,j=window.java,e;$.hasRun=true;try{if(typeof j.lang!="undefined"&&typeof j.lang.System!="undefined"){$.value=j.lang.System.getProperty("java.version")+" "}}catch(e){}},queryJava:function(){var $=PluginDetect,t=this,nua=navigator.userAgent,e;if(typeof window.java!="undefined"&&window.navigator.javaEnabled()){if(/gecko/i.test(nua)){if($.hasMimeType("application/x-java-vm")){try{var div=document.createElement("div"),evObj=document.createEvent("HTMLEvents");evObj.initEvent("focus",false,true);div.addEventListener("focus",t.queryJavaHandler,false);div.dispatchEvent(evObj)}catch(e){}if(!t.hasRun){t.queryJavaHandler()}}}else{if(/opera.9\.(0|1)/i.test(nua)&&/mac/i.test(nua)){return null}t.queryJavaHandler()}}return t.value},getVersion:function(){var _3a=null,$=PluginDetect;if(!$.isIE){var p1,p,mt;p=$.findNavPlugin(["Java","Plug-in"]);mt=$.hasMimeType(this.mimeType);if(p){p1=$.getNum(p.description)}if(p1&&mt&&navigator.javaEnabled()){_3a=p1}if(!_3a){p=this.queryJava();if(p){_3a=p}}this.installed=-1;if(_3a){this.installed=1}else{if(mt&&navigator.javaEnabled()){if(/safari/i.test(navigator.userAgent)){this.installed=0;if(/macintosh/i.test(navigator.userAgent)){p=$.findNavPlugin("Java.*\\d.*Plug-in.*Cocoa",false);if(p){p1=$.getNum(p.description);if(p1){_3a=p1;this.installed=1}}}}}}}else{var x,tmp=null;if($.IEver>=this.minIEver){_3a=$.search();this.installed=_3a?1:-1}else{for(x=0;x<this.JavaVersions.length;x++){tmp=this.searchJava(this.JavaVersions[x]);if(tmp){_3a=tmp;break}}this.installed=_3a?1:($.getAXO("JavaPlugin")?0:-1)}}this.version=$.formatNum($.getNum(_3a))}};PluginDetect.devalvr={mimeType:"application/x-devalvrx",progID:"DevalVRXCtrl.DevalVRXCtrl.1",classID:"clsid:5D2CF9D0-113A-476B-986F-288B54571614",minIEver:5.5,HTML:"<param name=\"src\" value=\"A14999.mov\" />",getCodeBaseVersion:function(v){return "codebase=\"#version="+v+"\""},digits:[2,16,16,16],getVersion:function(){var _3e=null,p,$=PluginDetect,o;if(!$.isIE){p=$.findNavPlugin("DevalVR");if(p&&p.name&&$.hasMimeType(this.mimeType)){_3e=p.description.split(" ")[3]}this.installed=_3e?1:-1}else{o=$.getAXO(this.progID);if($.IEver>=this.minIEver){_3e=$.search()}this.installed=_3e?1:(o?0:-1)}this.version=$.formatNum(_3e)}};PluginDetect.flash={mimeType:["application/x-shockwave-flash","application/futuresplash"],progID:"ShockwaveFlash.ShockwaveFlash",classID:"clsid:D27CDB6E-AE6D-11CF-96B8-444553540000",getVersion:function(){var _3f=function(A){if(!A){return null}var m=/[\d][\d\,\.\s]*[rRdD]{0,1}[\d\,]*/.exec(A);return m?m[0].replace(/[rRdD\.]/g,",").replace(/\s/g,""):null};var p,$=PluginDetect,e,i,version=null,AXO=null,majV=null;if(!$.isIE){p=$.findNavPlugin("Flash");if(p&&p.description&&$.hasMimeType(this.mimeType)){version=_3f(p.description)}}else{for(i=15;i>2;i--){AXO=$.getAXO(this.progID+"."+i);if(AXO){majV=i.toString();break}}if(majV=="6"){try{AXO.AllowScriptAccess="always"}catch(e){return "6,0,21,0"}}try{version=_3f(AXO.GetVariable("$version"))}catch(e){}if(!version&&majV){version=majV}}this.installed=version?1:-1;this.version=$.formatNum(version)}};PluginDetect.shockwave={mimeType:"application/x-director",progID:"SWCtl.SWCtl",classID:"clsid:166B1BCA-3F9C-11CF-8075-444553540000",getVersion:function(){var _43=null,s=null,e,p,$=PluginDetect;if(!$.isIE){p=$.findNavPlugin("Shockwave for Director");if(p&&p.description&&$.hasMimeType(this.mimeType)){_43=$.getNum(p.description)}}else{try{s=$.getAXO(this.progID).ShockwaveVersion("")}catch(e){}if(typeof s=="string"&&s.length>0){_43=$.getNum(s)}else{if($.getAXO(this.progID+".8")){_43="8"}else{if($.getAXO(this.progID+".7")){_43="7"}else{if($.getAXO(this.progID+".1")){_43="6"}}}}}this.installed=_43?1:-1;this.version=$.formatNum(_43)}};

// parametry skryptu (deklaracja zapobiega występowaniu błędów w przypadku
// braku zdeklarowanych parametrów)

var licznik;        // jeżeli ustawione - skrypt będzie zwracał liczbę odwiedzin
                    // 1 - licznik tekstowy
                    // nazwa pliku - licznik graficzny

var page;           // nazwa strony (można ustawić w skrypcie)

var digits;         // liczba cyfr wyświetlana w liczniku

var page     = (page) ? page : document.location.pathname;
var str2     = location.search;
var str      = str2.replace(/&/g, '_amp;');
var page_all = page + str;
var u_c      = navigator.appName != "Netscape" ? screen.colorDepth : screen.pixelDepth;
var r2       = document.referrer;
var r        = r2.replace(/&/g, '_amp;');
var temp_a   = document.URL.split('/');
var domena   = temp_a[2].replace("www.","");
var u_a      = navigator.userAgent;
var s        = screen.width + "x" + screen.height;
var b_n      = (navigator.userAgent.indexOf('Opera') > -1) ? 'Opera' : navigator.appName;
var b_v      = navigator.appVersion.substring(0,1);
var today    = new Date();
var expiry   = new Date(today.getTime() + 365 * 24 * 60 * 60 * 1000 * 5);
var v_id     = '';

// odczytanie ciasteczka z id pierwszej wizyty
if (GetCookie('itamar_stat_v_id') != null) {
    v_id = GetCookie('itamar_stat_v_id');
} else  {
   // użytkownik nie zostawił ciacha - znaczy żę jest nowy
   // przechwytujemy jego zestaw pluginów i zapisujemy w bazie
   
   var pnames = new Array;

   if (PluginDetect.getVersion('java')) {
   pnames[pnames.length] = 'java';
   }
   if (PluginDetect.getVersion('flash')) {
      pnames[pnames.length] = 'flash';
   }
   if (PluginDetect.getVersion('shockwave')) {
      pnames[pnames.length] = 'shockwave';
   }
   if (PluginDetect.getVersion('quicktime')) {
      pnames[pnames.length] = 'qtvr';
   }
   if (PluginDetect.getVersion('devalvr')) {
      pnames[pnames.length] = 'deval';
   }
   pnames = pnames.join(',');
   document.write("<scr" + "ipt language=JavaScript type=text/javascript src=\"plugins.php?" + pnames + "\"></scri" + "pt>");
}

// cookies.js
// Pochodzi z kodu Billa Dortcha spod adresu http://www.hidaho.com/cookies/cookie.txt

function getCookieVal (offset) {
    var endstr = document.cookie.indexOf (";", offset);
    if (endstr == -1) { endstr = document.cookie.length; }
        return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {
    var arg = name + "=";
    var alen = arg.length;
    var clen = document.cookie.length;
    var i = 0;
    while (i < clen) {
        var j = i + alen;
        if (document.cookie.substring(i, j) == arg) {
            return getCookieVal (j);
        }
        i = document.cookie.indexOf(" ", i) + 1;
        if (i == 0) break;
    }
    return null;
}

function DeleteCookie (name,path,domain) {
    if (GetCookie(name)) {
        document.cookie = name + "=" +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        "; expires=Thu, 01-Jan-70 00:00:01 GMT";
    }
}

function SetCookie (name,value,expires,path,domain,secure) {
  document.cookie = name + "=" + escape (value) +
    ((expires) ? "; expires=" + expires.toGMTString() : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "");
}




sh = "stat.php?u_c=" + u_c + "&s=" + s + "&u_a=" + u_a + "&r=" + r + "&b_n=" + b_n + "&b_v=" + b_v + "&p=" + page + "&pall=" + page_all + "&domena=" + domena + "&licznik=" + licznik + "&digits=" + digits + '&v_id=' + v_id;
document.write("<script language=JavaScript type=text/javascript src=\"" + sh + "\"></script>");
