PageSourceSearch

https://mytreo.net/seller/accept/j.js

js mytreo.net collected 2026-09-25 00:20:30 UTC 10,593 bytes, 250 lines download raw bytes

1var _____WB$wombat$assign$function_____=function(name){return (globalThis._wb_wombat && globalThis._wb_wombat.local_init && globalThis._wb_wombat.local_init(name))||globalThis[name];};if(!globalThis.__WB_pmw){globalThis.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
2let window = _____WB$wombat$assign$function_____("window");
3let self = _____WB$wombat$assign$function_____("self");
4let document = _____WB$wombat$assign$function_____("document");
5let location = _____WB$wombat$assign$function_____("location");
6let top = _____WB$wombat$assign$function_____("top");
7let parent = _____WB$wombat$assign$function_____("parent");
8let frames = _____WB$wombat$assign$function_____("frames");
9let opener = _____WB$wombat$assign$function_____("opener");
10<!-- /* <[CDATA[ */
11
12// preload images
13function preloadImgs() {
14  var imgs = ['../../../seller/accept/images/sc.gif','../../../seller/accept/images/gl.gif','../../../seller/accept/images/x.gif','../../../seller/accept/images/gcb.gif','../../../seller/accept/images/ht.gif','../../../seller/accept/images/st.gif'];
15  for (var i = 0; i < imgs.length; i++) {
16    var img = new Image();
17    img.src = imgs[i];
18  }
19}
20
21// get position of mark (http://blog.firetree.net/2005/07/04/javascript-find-position/)
22function findXPos(o) {
23  var n = 0;
24  if (o.offsetParent) {
25    while (1) {
26      n += o.offsetLeft;
27      if (!o.offsetParent) { break; }
28      o = o.offsetParent;
29    }
30  } else if (o.x) {
31    n += o.x;
32  }
33  return n;
34}
35
36function findYPos(o) {
37  var n = 0;
38  if (o.offsetParent) {
39    while (1) {
40      n += o.offsetTop;
41      if (!o.offsetParent) { break; }
42      o = o.offsetParent;
43    }
44  } else if (o.y) {
45    n += o.y;
46  }
47  return n;
48}
49
50function is_mac() {
51  var agt = navigator.userAgent.toLowerCase();
52  return (agt.indexOf("mac") != -1);
53}
54
55// position hidden div depending on position on screen
56function setPos(n) {
57  var h = document.getElementById('h'+n);
58  var i = document.getElementById('i'+n);
59  var m = document.getElementById('m'+n);
60  var d = document.documentElement;
61  var b = document.body;
62  
63  // position of the mark on the screen (top right corner)
64  var x = findXPos(m);
65  var y = findYPos(m);
66  
67  // width and height of the body (code taken from dw_viewport.js from http://www.dyn-web.com/)
68  var ww = 0;
69  if (window.innerWidth) { ww = window.innerWidth - 18; }
70  else if (d && d.clientWidth) { ww = d.clientWidth; }
71  else if (b && b.clientWidth) { ww = b.clientWidth; }
72  
73  var wh = 0;
74  if (window.innerHeight) { wh = window.innerHeight - 18; }
75  else if (d && d.clientHeight) { wh = d.clientHeight; }
76  else if (b && b.clientHeight) { wh = b.clientHeight; }
77  
78  // scroll x and y of the window (code taken from dw_viewport.js from http://www.dyn-web.com/)
79  var sx = 0;
80  if (typeof window.pageXOffset == "number") { sx = window.pageXOffset; }
81  else if (d && d.scrollLeft) { sx = d.scrollLeft; }
82  else if (b && b.scrollLeft) { sx = b.scrollLeft; }
83  else if (window.scrollX) { sx = window.scrollX; }
84
85  var sy = 0;    
86  if (typeof window.pageYOffset == "number") { sy = window.pageYOffset; }
87  else if (d && d.scrollTop) { sy = d.scrollTop; }
88  else if (b && b.scrollTop) { sy = b.scrollTop; }
89  else if (window.scrollY) { sy = window.scrollY; }
90  
91  // width and height (including border) of hidden window
92  var hw = 326;
93  var hh = 144;
94  
95  // width and height of the mark
96  var mw = i.width;
97  var mh = i.height;
98  
99  if (ww - (x - sx + mw) < (x - sx)) {
100    h.style.left = (-hw-3) + 'px';
101  } else {
102    h.style.left = mw + 1 + 'px';
103  }
104  
105  if (wh - (y - sy) < (y - sy + mh)) {
106    if (n==1 || n==2) {
107      h.style.top = (-hh + mh + 3) + 'px';
108      if (is_mac()) { h.style.top = (-hh + mh + 10) + 'px'; }
109    } else {
110      h.style.top = (-mh + 4) + 'px';
111      if (is_mac()) { h.style.top = (-mh + 11) + 'px'; }
112    }
113  } else {
114    if (n == 1) {
115      h.style.top = 9 + 'px';
116    } else if (n == 2) {
117      h.style.top = 7 + 'px';
118    } else {
119      h.style.top = 0 + 'px';
120    }
121  }
122}
123
124// browser detection
125function detectBrowser() {
126  // browser detection from http://www.webreference.com/tools/browser/javascript.html  
127  // convert all characters to lowercase to simplify testing
128  var agt = navigator.userAgent.toLowerCase();
129  var appVer = navigator.appVersion.toLowerCase();
130  
131  var is_minor = parseFloat(appVer);
132  var is_major = parseInt(is_minor,10);
133  
134  var is_opera = (agt.indexOf("opera") != -1);
135  var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
136  var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
137  var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
138  var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
139  var is_opera6 = (agt.indexOf("opera 6") != -1 || agt.indexOf("opera/6") != -1);
140  var is_opera7 = (agt.indexOf("opera 7") != -1 || agt.indexOf("opera/7") != -1);
141  var is_opera5up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4);
142  var is_opera6up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4 && !is_opera5);
143  var is_opera7up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4 && !is_opera5 && !is_opera6);
144  
145  // IE
146  var is_mac = agt.indexOf("mac")!=-1;
147  var iePos  = appVer.indexOf('msie');
148  if (iePos !=-1) {
149    if (is_mac) {
150      iePos = agt.indexOf('msie');
151      is_minor = parseFloat(agt.substring(iePos+5,agt.indexOf(';',iePos)));
152    } else {
153      is_minor = parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos)));
154    }
155     is_major = parseInt(is_minor,10);
156  }
157  
158  var is_safari = ((agt.indexOf('safari')!=-1)&&(agt.indexOf('mac')!=-1))?true:false;  
159  var is_camino = (((agt.indexOf('camino')!=-1)||(agt.indexOf('chimera')!=-1))&&(agt.indexOf('mac')!=-1))?true:false;  
160  var is_gecko = ((!is_safari)&&(navigator.product)&&(navigator.product.toLowerCase()=="gecko"))?true:false;
161  
162  var is_fx = ((agt.indexOf('mozilla/5')!=-1) && (agt.indexOf('spoofer')==-1) &&
163        (agt.indexOf('compatible')==-1) && (agt.indexOf('opera')==-1) &&
164        (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1) &&
165        (is_gecko) && ((navigator.vendor=="Firefox")||(agt.indexOf('firefox')!=-1)));
166        
167  var is_moz = ((agt.indexOf('mozilla/5')!=-1) && (agt.indexOf('spoofer')==-1) &&
168        (agt.indexOf('compatible')==-1) && (agt.indexOf('opera')==-1) &&
169        (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1) &&
170        (is_gecko) && (!is_fx) && ((navigator.vendor==="")||(navigator.vendor=="Mozilla")||(navigator.vendor=="Debian")));
171  
172  if ((is_moz)||(is_fx)) {
173    var is_moz_ver = (navigator.vendorSub)?navigator.vendorSub:0;
174    if(is_fx&&!is_moz_ver) {
175      is_moz_ver = agt.indexOf('firefox/');
176      is_moz_ver = agt.substring(is_moz_ver+8);
177      is_moz_ver = parseFloat(is_moz_ver);
178    }
179    if(!(is_moz_ver)) {
180      is_moz_ver = agt.indexOf('rv:');
181      is_moz_ver = agt.substring(is_moz_ver+3);
182      var is_paren = is_moz_ver.indexOf(')');
183      is_moz_ver = is_moz_ver.substring(0,is_paren);
184    }
185    is_minor = is_moz_ver;
186    is_major = parseInt(is_moz_ver,10);
187  }
188  
189  var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) &&
190        (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) &&
191        (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1) &&
192        (!is_safari) && (!is_camino) && (!(is_moz)) && (!is_fx));
193  
194  if ((navigator.vendor)&&((navigator.vendor=="Netscape6")||(navigator.vendor=="Netscape"))&&(is_nav)) {
195     is_major = parseInt(navigator.vendorSub,10); 
196     is_minor = parseFloat(navigator.vendorSub);
197  }
198  
199  var is_ie = ((iePos!=-1) && (!is_opera) && (!is_safari));
200  
201  var is_nav7up = (is_nav && is_minor >= 7);
202  var is_moz1up = (is_moz && is_minor >= 1);
203  var is_ie5up = (is_ie && is_minor >= 5);
204  var is_ie6up = (is_ie && is_minor >= 6);
205  var is_win = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
206  
207  return ((is_win && is_ie5up) || is_fx || is_nav7up || is_moz1up || is_camino || is_safari || is_opera7up);
208  
209}
210
211// show/hide hidden div
212function showHide(n) {
213  setPos(n);
214  var h = document.getElementById('h'+n);
215  h.style.display = (h.style.display == "none") ? "block" : "none";  
216}
217
218function showMark(n) {
219  if (detectBrowser()) {
220    document.images.onload=preloadImgs();
221    switch (n) {
222      case 1:
223        document.write('<div id="google_amark_b" style="width:92px; height:88px;"><div id="m'+n+'" class="m"><a href="javascript:showHide('+n+')"><img src="../../../seller/accept/images/st.gif" width="92" height="88" id="i'+n+'" alt="Google Checkout Acceptance Mark" />');
224        break;
225      case 2:
226        document.write('<div id="google_amark_b" style="width:182px; height:44px;"><div id="m'+n+'" class="m"><a href="javascript:showHide('+n+')"><img src="../../../seller/accept/images/ht.gif" width="182" height="44" id="i'+n+'" alt="Google Checkout Acceptance Mark" />');
227        break;
228      default:
229        document.write('<div id="google_amark_b" style="width:72px; height:73px;"><div id="m'+n+'" class="m"><a href="javascript:showHide('+n+')"><img src="../../../seller/accept/images/sc.gif" width="72" height="73" id="i'+n+'" alt="Google Checkout Acceptance Mark" />');
230        break;
231    }
232    document.write('</a></div><div id="h'+n+'" class="h" style="display:none;"><div id="t"><img src="../../../seller/accept/images/gl.gif"  width="154" height="28" id="l" alt="Google Checkout logo" /><div id="x"><a href="javascript:showHide('+n+')"><img src="../../../seller/accept/images/x.gif" width="16" height="16" alt="" /></a></div></div><div id="c"><p>Google Checkout is a fast, secure way to buy from stores across the web.</p><p class="p">When it\'s time to buy, look for the <img src="../../../seller/accept/images/gcb.gif" width="104" height="19" alt="Google Checkout button image" /> button.</p><p>Use it once and stop creating new accounts every time you buy. <a href="https://checkout.google.com/buyer/tour.html" target="_blank">Learn more</a></p></div></div></div>');
233  } else {
234    switch (n) {
235      case 1:
236        document.write('<img src="../../../seller/accept/images/st.gif" width="92" height="88" alt="Google Checkout Acceptance Mark" />');
237        break;
238      case 2:
239        document.write('<img src="../../../seller/accept/images/ht.gif" width="182" height="44" alt="Google Checkout Acceptance Mark" />');
240        break;
241      default:
242        document.write('<img src="../../../seller/accept/images/sc.gif" width="72" height="73" alt="Google Checkout Acceptance Mark" />');
243        break;
244    }
245  }
246}
247
248/* ]]> */ //-->
249
250}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.