1//1.3.0.5 2var bmLoc = 'www.bmmetrix.com'; 3var bmImg = new Image(); 4//custom -- 5var bmAdwords = new Array (''); 6var bmExclude = new Array (''); 7var bmExpires = 60; 8//-- custom 9 10function getBMqs(furl, dotl, refurl, bmac, bmcc, enc, sec, target) { 11 var loc = window.location.href; 12 var prot = window.location.protocol; 13 14//custom -- 15 for (var i=0;i<bmAdwords.length;i++) { 16 var val = getQueryVariable(bmAdwords[i]); 17 if (val) { 18 var skip = false; 19 for (var j=0;j<bmExclude.length;j++) { 20 if (val == bmExclude[j]) { 21 skip = true; 22 } 23 } 24 if (!skip) { 25 var cookie = 'bm_' + bmAdwords[i] + '=' + val; 26 var now = new Date(); 27 var exp = new Date(); 28 exp.setTime(now.getTime() + 3600000*24*bmExpires); 29 document.cookie = cookie + "; expires=" + exp.toGMTString() + "; path=/"; 30 } 31 } 32 } 33 34 var ary = document.cookie.split('; '); 35 for (var i=0;i<ary.length;i++) { 36 if(ary[i].indexOf('bm_') != -1) { 37 sec.push(ary[i]); 38 } 39 } 40//-- custom 41 42 if (furl.indexOf('R>') == 0) { 43 furl = furl.substring(2); 44 loc = furl; 45 } 46 47 if (loc.indexOf('#') != -1) 48 loc = loc.substring(0,loc.indexOf('#')); 49 if (loc.length > 256) 50 loc = loc.substring(0,253) + '...'; 51 if (sec.length > 0) { 52 if(loc.indexOf('?') != -1) 53 loc += '&' + sec.join('&'); 54 else 55 loc += '?' + sec.join('&'); 56 } 57 58 if (refurl.indexOf('R>') == 0) var ref = refurl.substring(2); 59 else if (refurl == 'L>') var ref = document.referrer; 60 else if (window.parent != window.self) var ref = (refurl == 'T>' ? top.document.referrer : parent.document.referrer); 61 else var ref = document.referrer; 62 63 var esc = function(str){return str.replace(/\*/g, '%2a').replace(/#/g, '%23')}; 64 var fixurl = furl.substring(furl.indexOf('://')+3); 65 var qs = esc(loc)+'*'+esc(fixurl)+'*'+esc(dotl)+'*'+esc(ref)+'*'+navigator.javaEnabled()+'/'; 66 if (window.screen) { 67 qs += screen.width+'x'+screen.height + '/' + screen.colorDepth + '/'; 68 } else { 69 qs += '//'; 70 }; 71 qs += bmac + '/' + bmcc + '/' + enc + '/'; 72 73 bmImg.src = prot + '//' + bmLoc + '/V13a' + qs; 74 75 //onclick -- 76 if(target) { 77 if (target == '_blank') 78 window.open(furl); 79 else 80 document.location=furl; 81 } 82 //-- onclick 83} 84 85//custom -- 86function getQueryVariable(variable) { 87 var query = window.location.search.substring(1); 88 var vars = query.split("&"); 89 for (var i=0;i<vars.length;i++) { 90 var pair = vars[i].split("="); 91 if (pair[0] == variable) { 92 return pair[1]; 93 } 94 } 95} 96//-- custom
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.