1$(document).ready(function() { 2 var hash = window.location.hash; 3 var referrer = document.referrer; 4 5 if (hash && hash.indexOf("#ibl-") == 0 /*&& ibl_allowAjax*/) { 6 var url = "/sfvc/inboundlinks/"; 7 url += hash.substring("#ibl-".length); 8 9 var prefix = "?"; 10 if (referrer) { 11 url += prefix + "ACCZ=" + encodeURIComponent(referrer); 12 prefix = "&"; 13 } 14 15 var params = window.location.search; 16 var index = Math.max(params.indexOf("?adrhid="), params.indexOf("&adrhid=") ); 17 18 if (params && index != -1) { 19 var rest = params.substring(index + "Xadrhid=".length); 20 21 index = rest.indexOf("&"); 22 if (index != -1) { 23 rest = rest.substring(0, index); 24 } 25 26 url += prefix + "ACDZ=" + encodeURIComponent(rest); 27 prefix = "&"; 28 } 29 30 // pass through the creative parameter 31 index = Math.max(params.indexOf("?CR="), params.indexOf("&CR=")); 32 if (params && index != -1) { 33 var rest = params.substring(index + "XCR=".length); 34 35 index = rest.indexOf("&"); 36 if (index != -1) { 37 rest = rest.substring(0, index); 38 } 39 url += prefix + "CR=" + rest; 40 } 41 42 // pass through the trackingID or CT parameter 43 index = Math.max(params.indexOf("?CT="), params.indexOf("&CT=")); 44 if (params && index != -1) { 45 var rest = params.substring(index + "XCT=".length); 46 47 index = rest.indexOf("&"); 48 if (index != -1) { 49 rest = rest.substring(0, index); 50 } 51 url += prefix + "CT=" + rest; 52 } else { 53 index = Math.max(params.indexOf("?trackingID="), params.indexOf("&trackingID=")); 54 if (params && index != -1) { 55 var rest = params.substring(index + "XtrackingID=".length); 56 57 index = rest.indexOf("&"); 58 if (index != -1) { 59 rest = rest.substring(0, index); 60 } 61 url += prefix + "trackingID=" + rest; 62 } 63 } 64 65 callSubRequest(url, inboundLinkCallback, false); 66 } 67}); 68 69function callSubRequest(url, funct) { 70 callSubRequest(url, funct, true); 71} 72 73function callSubRequest(url, funct, addDummyParam) { 74 var xmlHttp = null; 75 // Mozilla, Opera, Safari and Internet Explorer 7 76 if (typeof XMLHttpRequest != 'undefined') { 77 xmlHttp = new XMLHttpRequest(); 78 } 79 80 if (!xmlHttp) { 81 // Internet Explorer 6 and older 82 try { 83 xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); 84 } catch(e) { 85 try { 86 xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); 87 } catch(e) { 88 xmlHttp = null; 89 } 90 } 91 } 92 93 if (xmlHttp) { 94 if(addDummyParam){ 95 var now = new Date(); 96 var newtime = now.getTime(); 97 url = url + "&__dummy=" + newtime; 98 } 99 100 xmlHttp.open('GET', url, true); 101 if (funct) { 102 xmlHttp.onreadystatechange = function () { 103 if (xmlHttp.readyState == 4) { 104 funct(xmlHttp); 105 } 106 }; 107 } 108 xmlHttp.send(null); 109 } 110} 111 112function inboundLinkCallback(obj) { 113 if (obj.status != 200 || obj.responseText == "") { 114 //equivalent to Constants.FAILURE 115 return; 116 } 117 118 try{ 119 var json = eval("(" + obj.responseText + ")"); 120 var adrhid = json.partnercoopLead; 121 122 if (adrhid) { 123 document.cookie = "partnercoopLead=" + adrhid; 124 } 125 126 var citcimg = getElement('citcimg'); 127 if (citcimg && json.imgurl) { 128 citcimg.src = json.imgurl; 129 } 130 } catch(e){ 131 // nothing 132 } 133}
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.