atoulme-Antwrap 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,624 @@
1
+ //-- Google Analytics Urchin Module
2
+ //-- Copyright 2007 Google, All Rights Reserved.
3
+
4
+ //-- Urchin On Demand Settings ONLY
5
+ var _uacct=""; // set up the Urchin Account
6
+ var _userv=1; // service mode (0=local,1=remote,2=both)
7
+
8
+ //-- UTM User Settings
9
+ var _ufsc=1; // set client info flag (1=on|0=off)
10
+ var _udn="auto"; // (auto|none|domain) set the domain name for cookies
11
+ var _uhash="on"; // (on|off) unique domain hash for cookies
12
+ var _utimeout="1800"; // set the inactive session timeout in seconds
13
+ var _ugifpath="/__utm.gif"; // set the web path to the __utm.gif file
14
+ var _utsp="|"; // transaction field separator
15
+ var _uflash=1; // set flash version detect option (1=on|0=off)
16
+ var _utitle=1; // set the document title detect option (1=on|0=off)
17
+ var _ulink=0; // enable linker functionality (1=on|0=off)
18
+ var _uanchor=0; // enable use of anchors for campaign (1=on|0=off)
19
+ var _utcp="/"; // the cookie path for tracking
20
+ var _usample=100; // The sampling % of visitors to track (1-100).
21
+
22
+ //-- UTM Campaign Tracking Settings
23
+ var _uctm=1; // set campaign tracking module (1=on|0=off)
24
+ var _ucto="15768000"; // set timeout in seconds (6 month default)
25
+ var _uccn="utm_campaign"; // name
26
+ var _ucmd="utm_medium"; // medium (cpc|cpm|link|email|organic)
27
+ var _ucsr="utm_source"; // source
28
+ var _uctr="utm_term"; // term/keyword
29
+ var _ucct="utm_content"; // content
30
+ var _ucid="utm_id"; // id number
31
+ var _ucno="utm_nooverride"; // don't override
32
+
33
+ //-- Auto/Organic Sources and Keywords
34
+ var _uOsr=new Array();
35
+ var _uOkw=new Array();
36
+ _uOsr[0]="google"; _uOkw[0]="q";
37
+ _uOsr[1]="yahoo"; _uOkw[1]="p";
38
+ _uOsr[2]="msn"; _uOkw[2]="q";
39
+ _uOsr[3]="aol"; _uOkw[3]="query";
40
+ _uOsr[4]="aol"; _uOkw[4]="encquery";
41
+ _uOsr[5]="lycos"; _uOkw[5]="query";
42
+ _uOsr[6]="ask"; _uOkw[6]="q";
43
+ _uOsr[7]="altavista"; _uOkw[7]="q";
44
+ _uOsr[8]="netscape"; _uOkw[8]="s";
45
+ _uOsr[9]="cnn"; _uOkw[9]="query";
46
+ _uOsr[10]="looksmart"; _uOkw[10]="qt";
47
+ _uOsr[11]="about"; _uOkw[11]="terms";
48
+ _uOsr[12]="mamma"; _uOkw[12]="query";
49
+ _uOsr[13]="alltheweb"; _uOkw[13]="q";
50
+ _uOsr[14]="gigablast"; _uOkw[14]="q";
51
+ _uOsr[15]="voila"; _uOkw[15]="rdata";
52
+ _uOsr[16]="virgilio"; _uOkw[16]="qs";
53
+ _uOsr[17]="live"; _uOkw[17]="q";
54
+ _uOsr[18]="baidu"; _uOkw[18]="wd";
55
+ _uOsr[19]="alice"; _uOkw[19]="qs";
56
+ _uOsr[20]="seznam"; _uOkw[20]="w";
57
+ _uOsr[21]="yandex"; _uOkw[21]="text";
58
+ _uOsr[22]="najdi"; _uOkw[22]="q";
59
+ _uOsr[23]="aol"; _uOkw[23]="q";
60
+ _uOsr[24]="club-internet"; _uOkw[24]="q";
61
+ _uOsr[25]="mama"; _uOkw[25]="query";
62
+ _uOsr[26]="seznam"; _uOkw[26]="q";
63
+ _uOsr[27]="search"; _uOkw[27]="q";
64
+
65
+ //-- Auto/Organic Keywords to Ignore
66
+ var _uOno=new Array();
67
+ //_uOno[0]="urchin";
68
+ //_uOno[1]="urchin.com";
69
+ //_uOno[2]="www.urchin.com";
70
+
71
+ //-- Referral domains to Ignore
72
+ var _uRno=new Array();
73
+ //_uRno[0]=".urchin.com";
74
+
75
+ //-- **** Don't modify below this point ***
76
+ var _uff,_udh,_udt,_ubl=0,_udo="",_uu,_ufns=0,_uns=0,_ur="-",_ufno=0,_ust=0,_ubd=document,_udl=_ubd.location,_udlh="",_uwv="1";
77
+ var _ugifpath2="http://www.google-analytics.com/__utm.gif";
78
+ if (_udl.hash) _udlh=_udl.href.substring(_udl.href.indexOf('#'));
79
+ if (_udl.protocol=="https:") _ugifpath2="https://ssl.google-analytics.com/__utm.gif";
80
+ if (!_utcp || _utcp=="") _utcp="/";
81
+ function urchinTracker(page) {
82
+ if (_udl.protocol=="file:") return;
83
+ if (_uff && (!page || page=="")) return;
84
+ var a,b,c,xx,v,z,k,x="",s="",f=0;
85
+ var nx=" expires=Sun, 18 Jan 2038 00:00:00 GMT;";
86
+ var dc=_ubd.cookie;
87
+ _udh=_uDomain();
88
+ if (!_uVG()) return;
89
+ _uu=Math.round(Math.random()*2147483647);
90
+ _udt=new Date();
91
+ _ust=Math.round(_udt.getTime()/1000);
92
+ a=dc.indexOf("__utma="+_udh);
93
+ b=dc.indexOf("__utmb="+_udh);
94
+ c=dc.indexOf("__utmc="+_udh);
95
+ if (_udn && _udn!="") { _udo=" domain="+_udn+";"; }
96
+ if (_utimeout && _utimeout!="") {
97
+ x=new Date(_udt.getTime()+(_utimeout*1000));
98
+ x=" expires="+x.toGMTString()+";";
99
+ }
100
+ if (_ulink) {
101
+ if (_uanchor && _udlh && _udlh!="") s=_udlh+"&";
102
+ s+=_udl.search;
103
+ if(s && s!="" && s.indexOf("__utma=")>=0) {
104
+ if (!(_uIN(a=_uGC(s,"__utma=","&")))) a="-";
105
+ if (!(_uIN(b=_uGC(s,"__utmb=","&")))) b="-";
106
+ if (!(_uIN(c=_uGC(s,"__utmc=","&")))) c="-";
107
+ v=_uGC(s,"__utmv=","&");
108
+ z=_uGC(s,"__utmz=","&");
109
+ k=_uGC(s,"__utmk=","&");
110
+ xx=_uGC(s,"__utmx=","&");
111
+ if ((k*1) != ((_uHash(a+b+c+xx+z+v)*1)+(_udh*1))) {_ubl=1;a="-";b="-";c="-";xx="-";z="-";v="-";}
112
+ if (a!="-" && b!="-" && c!="-") f=1;
113
+ else if(a!="-") f=2;
114
+ }
115
+ }
116
+ if(f==1) {
117
+ _ubd.cookie="__utma="+a+"; path="+_utcp+";"+nx+_udo;
118
+ _ubd.cookie="__utmb="+b+"; path="+_utcp+";"+x+_udo;
119
+ _ubd.cookie="__utmc="+c+"; path="+_utcp+";"+_udo;
120
+ } else if (f==2) {
121
+ a=_uFixA(s,"&",_ust);
122
+ _ubd.cookie="__utma="+a+"; path="+_utcp+";"+nx+_udo;
123
+ _ubd.cookie="__utmb="+_udh+"; path="+_utcp+";"+x+_udo;
124
+ _ubd.cookie="__utmc="+_udh+"; path="+_utcp+";"+_udo;
125
+ _ufns=1;
126
+ } else if (a>=0 && b>=0 && c>=0) {
127
+ _ubd.cookie="__utmb="+_udh+"; path="+_utcp+";"+x+_udo;
128
+ } else {
129
+ if (a>=0) a=_uFixA(_ubd.cookie,";",_ust);
130
+ else a=_udh+"."+_uu+"."+_ust+"."+_ust+"."+_ust+".1";
131
+ _ubd.cookie="__utma="+a+"; path="+_utcp+";"+nx+_udo;
132
+ _ubd.cookie="__utmb="+_udh+"; path="+_utcp+";"+x+_udo;
133
+ _ubd.cookie="__utmc="+_udh+"; path="+_utcp+";"+_udo;
134
+ _ufns=1;
135
+ }
136
+ if (_ulink && xx && xx!="" && xx!="-") {
137
+ xx=_uUES(xx);
138
+ if (xx.indexOf(";")==-1) _ubd.cookie="__utmx="+xx+"; path="+_utcp+";"+nx+_udo;
139
+ }
140
+ if (_ulink && v && v!="" && v!="-") {
141
+ v=_uUES(v);
142
+ if (v.indexOf(";")==-1) _ubd.cookie="__utmv="+v+"; path="+_utcp+";"+nx+_udo;
143
+ }
144
+ _uInfo(page);
145
+ _ufns=0;
146
+ _ufno=0;
147
+ if (!page || page=="") _uff=1;
148
+ }
149
+ function _uInfo(page) {
150
+ var p,s="",dm="",pg=_udl.pathname+_udl.search;
151
+ if (page && page!="") pg=_uES(page,1);
152
+ _ur=_ubd.referrer;
153
+ if (!_ur || _ur=="") { _ur="-"; }
154
+ else {
155
+ dm=_ubd.domain;
156
+ if(_utcp && _utcp!="/") dm+=_utcp;
157
+ p=_ur.indexOf(dm);
158
+ if ((p>=0) && (p<=8)) { _ur="0"; }
159
+ if (_ur.indexOf("[")==0 && _ur.lastIndexOf("]")==(_ur.length-1)) { _ur="-"; }
160
+ }
161
+ s+="&utmn="+_uu;
162
+ if (_ufsc) s+=_uBInfo();
163
+ if (_uctm) s+=_uCInfo();
164
+ if (_utitle && _ubd.title && _ubd.title!="") s+="&utmdt="+_uES(_ubd.title);
165
+ if (_udl.hostname && _udl.hostname!="") s+="&utmhn="+_uES(_udl.hostname);
166
+ s+="&utmr="+_ur;
167
+ s+="&utmp="+pg;
168
+ if ((_userv==0 || _userv==2) && _uSP()) {
169
+ var i=new Image(1,1);
170
+ i.src=_ugifpath+"?"+"utmwv="+_uwv+s;
171
+ i.onload=function() {_uVoid();}
172
+ }
173
+ if ((_userv==1 || _userv==2) && _uSP()) {
174
+ var i2=new Image(1,1);
175
+ i2.src=_ugifpath2+"?"+"utmwv="+_uwv+s+"&utmac="+_uacct+"&utmcc="+_uGCS();
176
+ i2.onload=function() { _uVoid(); }
177
+ }
178
+ return;
179
+ }
180
+ function _uVoid() { return; }
181
+ function _uCInfo() {
182
+ if (!_ucto || _ucto=="") { _ucto="15768000"; }
183
+ if (!_uVG()) return;
184
+ var c="",t="-",t2="-",t3="-",o=0,cs=0,cn=0,i=0,z="-",s="";
185
+ if (_uanchor && _udlh && _udlh!="") s=_udlh+"&";
186
+ s+=_udl.search;
187
+ var x=new Date(_udt.getTime()+(_ucto*1000));
188
+ var dc=_ubd.cookie;
189
+ x=" expires="+x.toGMTString()+";";
190
+ if (_ulink && !_ubl) {
191
+ z=_uUES(_uGC(s,"__utmz=","&"));
192
+ if (z!="-" && z.indexOf(";")==-1) { _ubd.cookie="__utmz="+z+"; path="+_utcp+";"+x+_udo; return ""; }
193
+ }
194
+ z=dc.indexOf("__utmz="+_udh);
195
+ if (z>-1) { z=_uGC(dc,"__utmz="+_udh,";"); }
196
+ else { z="-"; }
197
+ t=_uGC(s,_ucid+"=","&");
198
+ t2=_uGC(s,_ucsr+"=","&");
199
+ t3=_uGC(s,"gclid=","&");
200
+ if ((t!="-" && t!="") || (t2!="-" && t2!="") || (t3!="-" && t3!="")) {
201
+ if (t!="-" && t!="") c+="utmcid="+_uEC(t);
202
+ if (t2!="-" && t2!="") { if (c != "") c+="|"; c+="utmcsr="+_uEC(t2); }
203
+ if (t3!="-" && t3!="") { if (c != "") c+="|"; c+="utmgclid="+_uEC(t3); }
204
+ t=_uGC(s,_uccn+"=","&");
205
+ if (t!="-" && t!="") c+="|utmccn="+_uEC(t);
206
+ else c+="|utmccn=(not+set)";
207
+ t=_uGC(s,_ucmd+"=","&");
208
+ if (t!="-" && t!="") c+="|utmcmd="+_uEC(t);
209
+ else c+="|utmcmd=(not+set)";
210
+ t=_uGC(s,_uctr+"=","&");
211
+ if (t!="-" && t!="") c+="|utmctr="+_uEC(t);
212
+ else { t=_uOrg(1); if (t!="-" && t!="") c+="|utmctr="+_uEC(t); }
213
+ t=_uGC(s,_ucct+"=","&");
214
+ if (t!="-" && t!="") c+="|utmcct="+_uEC(t);
215
+ t=_uGC(s,_ucno+"=","&");
216
+ if (t=="1") o=1;
217
+ if (z!="-" && o==1) return "";
218
+ }
219
+ if (c=="-" || c=="") { c=_uOrg(); if (z!="-" && _ufno==1) return ""; }
220
+ if (c=="-" || c=="") { if (_ufns==1) c=_uRef(); if (z!="-" && _ufno==1) return ""; }
221
+ if (c=="-" || c=="") {
222
+ if (z=="-" && _ufns==1) { c="utmccn=(direct)|utmcsr=(direct)|utmcmd=(none)"; }
223
+ if (c=="-" || c=="") return "";
224
+ }
225
+ if (z!="-") {
226
+ i=z.indexOf(".");
227
+ if (i>-1) i=z.indexOf(".",i+1);
228
+ if (i>-1) i=z.indexOf(".",i+1);
229
+ if (i>-1) i=z.indexOf(".",i+1);
230
+ t=z.substring(i+1,z.length);
231
+ if (t.toLowerCase()==c.toLowerCase()) cs=1;
232
+ t=z.substring(0,i);
233
+ if ((i=t.lastIndexOf(".")) > -1) {
234
+ t=t.substring(i+1,t.length);
235
+ cn=(t*1);
236
+ }
237
+ }
238
+ if (cs==0 || _ufns==1) {
239
+ t=_uGC(dc,"__utma="+_udh,";");
240
+ if ((i=t.lastIndexOf(".")) > 9) {
241
+ _uns=t.substring(i+1,t.length);
242
+ _uns=(_uns*1);
243
+ }
244
+ cn++;
245
+ if (_uns==0) _uns=1;
246
+ _ubd.cookie="__utmz="+_udh+"."+_ust+"."+_uns+"."+cn+"."+c+"; path="+_utcp+"; "+x+_udo;
247
+ }
248
+ if (cs==0 || _ufns==1) return "&utmcn=1";
249
+ else return "&utmcr=1";
250
+ }
251
+ function _uRef() {
252
+ if (_ur=="0" || _ur=="" || _ur=="-") return "";
253
+ var i=0,h,k,n;
254
+ if ((i=_ur.indexOf("://"))<0) return "";
255
+ h=_ur.substring(i+3,_ur.length);
256
+ if (h.indexOf("/") > -1) {
257
+ k=h.substring(h.indexOf("/"),h.length);
258
+ if (k.indexOf("?") > -1) k=k.substring(0,k.indexOf("?"));
259
+ h=h.substring(0,h.indexOf("/"));
260
+ }
261
+ h=h.toLowerCase();
262
+ n=h;
263
+ if ((i=n.indexOf(":")) > -1) n=n.substring(0,i);
264
+ for (var ii=0;ii<_uRno.length;ii++) {
265
+ if ((i=n.indexOf(_uRno[ii].toLowerCase())) > -1 && n.length==(i+_uRno[ii].length)) { _ufno=1; break; }
266
+ }
267
+ if (h.indexOf("www.")==0) h=h.substring(4,h.length);
268
+ return "utmccn=(referral)|utmcsr="+_uEC(h)+"|"+"utmcct="+_uEC(k)+"|utmcmd=referral";
269
+ }
270
+ function _uOrg(t) {
271
+ if (_ur=="0" || _ur=="" || _ur=="-") return "";
272
+ var i=0,h,k;
273
+ if ((i=_ur.indexOf("://")) < 0) return "";
274
+ h=_ur.substring(i+3,_ur.length);
275
+ if (h.indexOf("/") > -1) {
276
+ h=h.substring(0,h.indexOf("/"));
277
+ }
278
+ for (var ii=0;ii<_uOsr.length;ii++) {
279
+ if (h.toLowerCase().indexOf(_uOsr[ii].toLowerCase()) > -1) {
280
+ if ((i=_ur.indexOf("?"+_uOkw[ii]+"=")) > -1 || (i=_ur.indexOf("&"+_uOkw[ii]+"=")) > -1) {
281
+ k=_ur.substring(i+_uOkw[ii].length+2,_ur.length);
282
+ if ((i=k.indexOf("&")) > -1) k=k.substring(0,i);
283
+ for (var yy=0;yy<_uOno.length;yy++) {
284
+ if (_uOno[yy].toLowerCase()==k.toLowerCase()) { _ufno=1; break; }
285
+ }
286
+ if (t) return _uEC(k);
287
+ else return "utmccn=(organic)|utmcsr="+_uEC(_uOsr[ii])+"|"+"utmctr="+_uEC(k)+"|utmcmd=organic";
288
+ }
289
+ }
290
+ }
291
+ return "";
292
+ }
293
+ function _uBInfo() {
294
+ var sr="-",sc="-",ul="-",fl="-",cs="-",je=1;
295
+ var n=navigator;
296
+ if (self.screen) {
297
+ sr=screen.width+"x"+screen.height;
298
+ sc=screen.colorDepth+"-bit";
299
+ } else if (self.java) {
300
+ var j=java.awt.Toolkit.getDefaultToolkit();
301
+ var s=j.getScreenSize();
302
+ sr=s.width+"x"+s.height;
303
+ }
304
+ if (n.language) { ul=n.language.toLowerCase(); }
305
+ else if (n.browserLanguage) { ul=n.browserLanguage.toLowerCase(); }
306
+ je=n.javaEnabled()?1:0;
307
+ if (_uflash) fl=_uFlash();
308
+ if (_ubd.characterSet) cs=_uES(_ubd.characterSet);
309
+ else if (_ubd.charset) cs=_uES(_ubd.charset);
310
+ return "&utmcs="+cs+"&utmsr="+sr+"&utmsc="+sc+"&utmul="+ul+"&utmje="+je+"&utmfl="+fl;
311
+ }
312
+ function __utmSetTrans() {
313
+ var e;
314
+ if (_ubd.getElementById) e=_ubd.getElementById("utmtrans");
315
+ else if (_ubd.utmform && _ubd.utmform.utmtrans) e=_ubd.utmform.utmtrans;
316
+ if (!e) return;
317
+ var l=e.value.split("UTM:");
318
+ var i,i2,c;
319
+ if (_userv==0 || _userv==2) i=new Array();
320
+ if (_userv==1 || _userv==2) { i2=new Array(); c=_uGCS(); }
321
+
322
+ for (var ii=0;ii<l.length;ii++) {
323
+ l[ii]=_uTrim(l[ii]);
324
+ if (l[ii].charAt(0)!='T' && l[ii].charAt(0)!='I') continue;
325
+ var r=Math.round(Math.random()*2147483647);
326
+ if (!_utsp || _utsp=="") _utsp="|";
327
+ var f=l[ii].split(_utsp),s="";
328
+ if (f[0].charAt(0)=='T') {
329
+ s="&utmt=tran"+"&utmn="+r;
330
+ f[1]=_uTrim(f[1]); if(f[1]&&f[1]!="") s+="&utmtid="+_uES(f[1]);
331
+ f[2]=_uTrim(f[2]); if(f[2]&&f[2]!="") s+="&utmtst="+_uES(f[2]);
332
+ f[3]=_uTrim(f[3]); if(f[3]&&f[3]!="") s+="&utmtto="+_uES(f[3]);
333
+ f[4]=_uTrim(f[4]); if(f[4]&&f[4]!="") s+="&utmttx="+_uES(f[4]);
334
+ f[5]=_uTrim(f[5]); if(f[5]&&f[5]!="") s+="&utmtsp="+_uES(f[5]);
335
+ f[6]=_uTrim(f[6]); if(f[6]&&f[6]!="") s+="&utmtci="+_uES(f[6]);
336
+ f[7]=_uTrim(f[7]); if(f[7]&&f[7]!="") s+="&utmtrg="+_uES(f[7]);
337
+ f[8]=_uTrim(f[8]); if(f[8]&&f[8]!="") s+="&utmtco="+_uES(f[8]);
338
+ } else {
339
+ s="&utmt=item"+"&utmn="+r;
340
+ f[1]=_uTrim(f[1]); if(f[1]&&f[1]!="") s+="&utmtid="+_uES(f[1]);
341
+ f[2]=_uTrim(f[2]); if(f[2]&&f[2]!="") s+="&utmipc="+_uES(f[2]);
342
+ f[3]=_uTrim(f[3]); if(f[3]&&f[3]!="") s+="&utmipn="+_uES(f[3]);
343
+ f[4]=_uTrim(f[4]); if(f[4]&&f[4]!="") s+="&utmiva="+_uES(f[4]);
344
+ f[5]=_uTrim(f[5]); if(f[5]&&f[5]!="") s+="&utmipr="+_uES(f[5]);
345
+ f[6]=_uTrim(f[6]); if(f[6]&&f[6]!="") s+="&utmiqt="+_uES(f[6]);
346
+ }
347
+ if ((_userv==0 || _userv==2) && _uSP()) {
348
+ i[ii]=new Image(1,1);
349
+ i[ii].src=_ugifpath+"?"+"utmwv="+_uwv+s;
350
+ i[ii].onload=function() { _uVoid(); }
351
+ }
352
+ if ((_userv==1 || _userv==2) && _uSP()) {
353
+ i2[ii]=new Image(1,1);
354
+ i2[ii].src=_ugifpath2+"?"+"utmwv="+_uwv+s+"&utmac="+_uacct+"&utmcc="+c;
355
+ i2[ii].onload=function() { _uVoid(); }
356
+ }
357
+ }
358
+ return;
359
+ }
360
+ function _uFlash() {
361
+ var f="-",n=navigator;
362
+ if (n.plugins && n.plugins.length) {
363
+ for (var ii=0;ii<n.plugins.length;ii++) {
364
+ if (n.plugins[ii].name.indexOf('Shockwave Flash')!=-1) {
365
+ f=n.plugins[ii].description.split('Shockwave Flash ')[1];
366
+ break;
367
+ }
368
+ }
369
+ } else if (window.ActiveXObject) {
370
+ for (var ii=10;ii>=2;ii--) {
371
+ try {
372
+ var fl=eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash."+ii+"');");
373
+ if (fl) { f=ii + '.0'; break; }
374
+ }
375
+ catch(e) {}
376
+ }
377
+ }
378
+ return f;
379
+ }
380
+ function __utmLinker(l,h) {
381
+ if (!_ulink) return;
382
+ var p,k,a="-",b="-",c="-",x="-",z="-",v="-";
383
+ var dc=_ubd.cookie;
384
+ if (!l || l=="") return;
385
+ var iq = l.indexOf("?");
386
+ var ih = l.indexOf("#");
387
+ if (dc) {
388
+ a=_uES(_uGC(dc,"__utma="+_udh,";"));
389
+ b=_uES(_uGC(dc,"__utmb="+_udh,";"));
390
+ c=_uES(_uGC(dc,"__utmc="+_udh,";"));
391
+ x=_uES(_uGC(dc,"__utmx="+_udh,";"));
392
+ z=_uES(_uGC(dc,"__utmz="+_udh,";"));
393
+ v=_uES(_uGC(dc,"__utmv="+_udh,";"));
394
+ k=(_uHash(a+b+c+x+z+v)*1)+(_udh*1);
395
+ p="__utma="+a+"&__utmb="+b+"&__utmc="+c+"&__utmx="+x+"&__utmz="+z+"&__utmv="+v+"&__utmk="+k;
396
+ }
397
+ if (p) {
398
+ if (h && ih>-1) return;
399
+ if (h) { _udl.href=l+"#"+p; }
400
+ else {
401
+ if (iq==-1 && ih==-1) _udl.href=l+"?"+p;
402
+ else if (ih==-1) _udl.href=l+"&"+p;
403
+ else if (iq==-1) _udl.href=l.substring(0,ih-1)+"?"+p+l.substring(ih);
404
+ else _udl.href=l.substring(0,ih-1)+"&"+p+l.substring(ih);
405
+ }
406
+ } else { _udl.href=l; }
407
+ }
408
+ function __utmLinkPost(f,h) {
409
+ if (!_ulink) return;
410
+ var p,k,a="-",b="-",c="-",x="-",z="-",v="-";
411
+ var dc=_ubd.cookie;
412
+ if (!f || !f.action) return;
413
+ var iq = f.action.indexOf("?");
414
+ var ih = f.action.indexOf("#");
415
+ if (dc) {
416
+ a=_uES(_uGC(dc,"__utma="+_udh,";"));
417
+ b=_uES(_uGC(dc,"__utmb="+_udh,";"));
418
+ c=_uES(_uGC(dc,"__utmc="+_udh,";"));
419
+ x=_uES(_uGC(dc,"__utmx="+_udh,";"));
420
+ z=_uES(_uGC(dc,"__utmz="+_udh,";"));
421
+ v=_uES(_uGC(dc,"__utmv="+_udh,";"));
422
+ k=(_uHash(a+b+c+x+z+v)*1)+(_udh*1);
423
+ p="__utma="+a+"&__utmb="+b+"&__utmc="+c+"&__utmx="+x+"&__utmz="+z+"&__utmv="+v+"&__utmk="+k;
424
+ }
425
+ if (p) {
426
+ if (h && ih>-1) return;
427
+ if (h) { f.action+="#"+p; }
428
+ else {
429
+ if (iq==-1 && ih==-1) f.action+="?"+p;
430
+ else if (ih==-1) f.action+="&"+p;
431
+ else if (iq==-1) f.action=f.action.substring(0,ih-1)+"?"+p+f.action.substring(ih);
432
+ else f.action=f.action.substring(0,ih-1)+"&"+p+f.action.substring(ih);
433
+ }
434
+ }
435
+ return;
436
+ }
437
+ function __utmSetVar(v) {
438
+ if (!v || v=="") return;
439
+ if (!_udo || _udo == "") {
440
+ _udh=_uDomain();
441
+ if (_udn && _udn!="") { _udo=" domain="+_udn+";"; }
442
+ }
443
+ if (!_uVG()) return;
444
+ var r=Math.round(Math.random() * 2147483647);
445
+ _ubd.cookie="__utmv="+_udh+"."+_uES(v)+"; path="+_utcp+"; expires=Sun, 18 Jan 2038 00:00:00 GMT;"+_udo;
446
+ var s="&utmt=var&utmn="+r;
447
+ if ((_userv==0 || _userv==2) && _uSP()) {
448
+ var i=new Image(1,1);
449
+ i.src=_ugifpath+"?"+"utmwv="+_uwv+s;
450
+ i.onload=function() { _uVoid(); }
451
+ }
452
+ if ((_userv==1 || _userv==2) && _uSP()) {
453
+ var i2=new Image(1,1);
454
+ i2.src=_ugifpath2+"?"+"utmwv="+_uwv+s+"&utmac="+_uacct+"&utmcc="+_uGCS();
455
+ i2.onload=function() { _uVoid(); }
456
+ }
457
+ }
458
+ function _uGCS() {
459
+ var t,c="",dc=_ubd.cookie;
460
+ if ((t=_uGC(dc,"__utma="+_udh,";"))!="-") c+=_uES("__utma="+t+";+");
461
+ if ((t=_uGC(dc,"__utmb="+_udh,";"))!="-") c+=_uES("__utmb="+t+";+");
462
+ if ((t=_uGC(dc,"__utmc="+_udh,";"))!="-") c+=_uES("__utmc="+t+";+");
463
+ if ((t=_uGC(dc,"__utmx="+_udh,";"))!="-") c+=_uES("__utmx="+t+";+");
464
+ if ((t=_uGC(dc,"__utmz="+_udh,";"))!="-") c+=_uES("__utmz="+t+";+");
465
+ if ((t=_uGC(dc,"__utmv="+_udh,";"))!="-") c+=_uES("__utmv="+t+";");
466
+ if (c.charAt(c.length-1)=="+") c=c.substring(0,c.length-1);
467
+ return c;
468
+ }
469
+ function _uGC(l,n,s) {
470
+ if (!l || l=="" || !n || n=="" || !s || s=="") return "-";
471
+ var i,i2,i3,c="-";
472
+ i=l.indexOf(n);
473
+ i3=n.indexOf("=")+1;
474
+ if (i > -1) {
475
+ i2=l.indexOf(s,i); if (i2 < 0) { i2=l.length; }
476
+ c=l.substring((i+i3),i2);
477
+ }
478
+ return c;
479
+ }
480
+ function _uDomain() {
481
+ if (!_udn || _udn=="" || _udn=="none") { _udn=""; return 1; }
482
+ if (_udn=="auto") {
483
+ var d=_ubd.domain;
484
+ if (d.substring(0,4)=="www.") {
485
+ d=d.substring(4,d.length);
486
+ }
487
+ _udn=d;
488
+ }
489
+ if (_uhash=="off") return 1;
490
+ return _uHash(_udn);
491
+ }
492
+ function _uHash(d) {
493
+ if (!d || d=="") return 1;
494
+ var h=0,g=0;
495
+ for (var i=d.length-1;i>=0;i--) {
496
+ var c=parseInt(d.charCodeAt(i));
497
+ h=((h << 6) & 0xfffffff) + c + (c << 14);
498
+ if ((g=h & 0xfe00000)!=0) h=(h ^ (g >> 21));
499
+ }
500
+ return h;
501
+ }
502
+ function _uFixA(c,s,t) {
503
+ if (!c || c=="" || !s || s=="" || !t || t=="") return "-";
504
+ var a=_uGC(c,"__utma="+_udh,s);
505
+ var lt=0,i=0;
506
+ if ((i=a.lastIndexOf(".")) > 9) {
507
+ _uns=a.substring(i+1,a.length);
508
+ _uns=(_uns*1)+1;
509
+ a=a.substring(0,i);
510
+ if ((i=a.lastIndexOf(".")) > 7) {
511
+ lt=a.substring(i+1,a.length);
512
+ a=a.substring(0,i);
513
+ }
514
+ if ((i=a.lastIndexOf(".")) > 5) {
515
+ a=a.substring(0,i);
516
+ }
517
+ a+="."+lt+"."+t+"."+_uns;
518
+ }
519
+ return a;
520
+ }
521
+ function _uTrim(s) {
522
+ if (!s || s=="") return "";
523
+ while ((s.charAt(0)==' ') || (s.charAt(0)=='\n') || (s.charAt(0,1)=='\r')) s=s.substring(1,s.length);
524
+ while ((s.charAt(s.length-1)==' ') || (s.charAt(s.length-1)=='\n') || (s.charAt(s.length-1)=='\r')) s=s.substring(0,s.length-1);
525
+ return s;
526
+ }
527
+ function _uEC(s) {
528
+ var n="";
529
+ if (!s || s=="") return "";
530
+ for (var i=0;i<s.length;i++) {if (s.charAt(i)==" ") n+="+"; else n+=s.charAt(i);}
531
+ return n;
532
+ }
533
+ function __utmVisitorCode(f) {
534
+ var r=0,t=0,i=0,i2=0,m=31;
535
+ var a=_uGC(_ubd.cookie,"__utma="+_udh,";");
536
+ if ((i=a.indexOf(".",0))<0) return;
537
+ if ((i2=a.indexOf(".",i+1))>0) r=a.substring(i+1,i2); else return "";
538
+ if ((i=a.indexOf(".",i2+1))>0) t=a.substring(i2+1,i); else return "";
539
+ if (f) {
540
+ return r;
541
+ } else {
542
+ var c=new Array('A','B','C','D','E','F','G','H','J','K','L','M','N','P','R','S','T','U','V','W','X','Y','Z','1','2','3','4','5','6','7','8','9');
543
+ return c[r>>28&m]+c[r>>23&m]+c[r>>18&m]+c[r>>13&m]+"-"+c[r>>8&m]+c[r>>3&m]+c[((r&7)<<2)+(t>>30&3)]+c[t>>25&m]+c[t>>20&m]+"-"+c[t>>15&m]+c[t>>10&m]+c[t>>5&m]+c[t&m];
544
+ }
545
+ }
546
+ function _uIN(n) {
547
+ if (!n) return false;
548
+ for (var i=0;i<n.length;i++) {
549
+ var c=n.charAt(i);
550
+ if ((c<"0" || c>"9") && (c!=".")) return false;
551
+ }
552
+ return true;
553
+ }
554
+ function _uES(s,u) {
555
+ if (typeof(encodeURIComponent) == 'function') {
556
+ if (u) return encodeURI(s);
557
+ else return encodeURIComponent(s);
558
+ } else {
559
+ return escape(s);
560
+ }
561
+ }
562
+ function _uUES(s) {
563
+ if (typeof(decodeURIComponent) == 'function') {
564
+ return decodeURIComponent(s);
565
+ } else {
566
+ return unescape(s);
567
+ }
568
+ }
569
+ function _uVG() {
570
+ if((_udn.indexOf("www.google.") == 0 || _udn.indexOf(".google.") == 0 || _udn.indexOf("google.") == 0) && _utcp=='/') {
571
+ return false;
572
+ }
573
+ return true;
574
+ }
575
+ function _uSP() {
576
+ var s=100;
577
+ if (_usample) s=_usample;
578
+ if(s>=100 || s<=0) return true;
579
+ return ((__utmVisitorCode(1)%10000)<(s*100));
580
+ }
581
+ function urchinPathCopy(p){
582
+ var d=document,nx,tx,sx,i,c,cs,t,h,o;
583
+ cs=new Array("a","b","c","v","x","z");
584
+ h=_uDomain(); if (_udn && _udn!="") o=" domain="+_udn+";";
585
+ nx="Sun, 18 Jan 2038 00:00:00 GMT;";
586
+ tx=new Date(); tx.setTime(tx.getTime()+(_utimeout*1000));
587
+ tx=tx.toGMTString()+";";
588
+ sx=new Date(); sx.setTime(sx.getTime()+(_ucto*1000));
589
+ sx=sx.toGMTString()+";";
590
+ for (i=0;i<6;i++){
591
+ t=" expires=";
592
+ if (i==1) t+=tx; else if (i==2) t=""; else if (i==5) t+=sx; else t+=nx;
593
+ c=_uGC(d.cookie,"__utm"+cs[i]+"="+h,";");
594
+ if (c!="-") d.cookie="__utm"+cs[i]+"="+c+"; path="+p+";"+t+o;
595
+ }
596
+ }
597
+ function _uCO() {
598
+ if (!_utk || _utk=="" || _utk.length<10) return;
599
+ var d='www.google.com';
600
+ if (_utk.charAt(0)=='!') d='analytics.corp.google.com';
601
+ _ubd.cookie="GASO="+_utk+"; path="+_utcp+";"+_udo;
602
+ var sc=document.createElement('script');
603
+ sc.type='text/javascript';
604
+ sc.id="_gasojs";
605
+ sc.src='https://'+d+'/analytics/reporting/overlay_js?gaso='+_utk+'&'+Math.random();
606
+ document.getElementsByTagName('head')[0].appendChild(sc);
607
+ }
608
+ function _uGT() {
609
+ var h=location.hash, a;
610
+ if (h && h!="" && h.indexOf("#gaso=")==0) {
611
+ a=_uGC(h,"gaso=","&");
612
+ } else {
613
+ a=_uGC(_ubd.cookie,"GASO=",";");
614
+ }
615
+ return a;
616
+ }
617
+ var _utk=_uGT();
618
+ if (_utk && _utk!="" && _utk.length>10) {
619
+ if (window.addEventListener) {
620
+ window.addEventListener('load', _uCO, false);
621
+ } else if (window.attachEvent) {
622
+ window.attachEvent('onload', _uCO);
623
+ }
624
+ }
@@ -0,0 +1,31 @@
1
+ # Copyright 2008 Caleb Powell
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ #
8
+ # Unless required by applicable law or agreed to in writing, software
9
+ # distributed under the License is distributed on an "AS IS" BASIS,
10
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ # See the License for the specific language governing permissions and limitations
12
+ # under the License.
13
+ require 'java_adapter'
14
+ module Antwrap
15
+ module ApacheAnt
16
+ DefaultLogger = JavaAdapter.import_class("org.apache.tools.ant.DefaultLogger")
17
+ Main = JavaAdapter.import_class("org.apache.tools.ant.Main")
18
+ Project = JavaAdapter.import_class("org.apache.tools.ant.Project")
19
+ RuntimeConfigurable = JavaAdapter.import_class("org.apache.tools.ant.RuntimeConfigurable")
20
+ Target = JavaAdapter.import_class("org.apache.tools.ant.Target")
21
+ UnknownElement = JavaAdapter.import_class("org.apache.tools.ant.UnknownElement")
22
+ end
23
+
24
+ module JavaLang
25
+ System = JavaAdapter.import_class("java.lang.System")
26
+ end
27
+
28
+ module XmlSax
29
+ AttributeListImpl = JavaAdapter.import_class("org.xml.sax.helpers.AttributeListImpl")
30
+ end
31
+ end