(function() { var trueName = ''; for (var i = 0; i < 16; i++) { trueName += String.fromCharCode(Math.floor(Math.random() * 26) + 97); } window[trueName] = {}; var $ = window[trueName]; $.f = function() { return { init: function(target) { var theScripts = document.getElementsByTagName('SCRIPT'); for (var i = 0; i < theScripts.length; i++) { if (theScripts[i].src.match(target)) { $.w = document.createElement('DIV'); $.a = {}; if (theScripts[i].innerHTML) { $.a = $.f.parseJson(theScripts[i].innerHTML); } if ($.a.err) { //bad json! } $.w.innerHTML = "
D&B Credibility Listing
"; theScripts[i].parentNode.insertBefore($.w, theScripts[i]); theScripts[i].parentNode.removeChild(theScripts[i]); break; } } if (!$.f.runFunction) { $.f.runFunction = []; } }, parseJson: function(json) { this.parseJson.data = json; if (typeof json !== 'string') { return { "err": "trying to parse a non-string JSON object" }; } try { var f = Function(['var document,top,self,window,parent,Number,Date,Object,Function,', 'Array,String,Math,RegExp,Image,ActiveXObject;', 'return (', json.replace(/<\!--.+-->/gim, '').replace(/\bfunction\b/g, 'function-'), ');'].join('')); return f(); } catch(e) { return { "err": "trouble parsing JSON object" }; } } }; } (); var thisScript = /badge/; if (typeof window.addEventListener !== 'undefined') { window.addEventListener('load', function() { $.f.init(thisScript); }, false); } else if (typeof window.attachEvent !== 'undefined') { window.attachEvent('onload', function() { $.f.init(thisScript); }); } })();