(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) {
                            alert('bad json!');
                        }

						$.w.innerHTML = "<div style='width:128px; height:98px; text-align:center; padding: 0; margin: 0; outline: 0; border: 0 none; clear: both; vertical-align: baseline; display: block;'><div style='position:relative; left:32px; top:0px; width:64px; height:64px; z-index:0; padding: 0; margin: 0; outline: 0; border: 0 none; clear: both; vertical-align: baseline; display: block;'><a style='cursor: pointer; color: black; text-decoration:none; padding: 0; margin: 0; outline: 0; border: 0 none; clear: both; vertical-align: baseline; display: block;' href='https://www.dandb.com/businessdirectory/business.jsp?businessID=13989555' target='_blank'><h1 style='padding: 0; margin: 0; outline: 0; border: 0 none; clear: both; vertical-align: baseline; display: block;'><div style='position:absolute; left:10px; top:6px; z-index:100; font: 22px Arial, Helvetica, sans-serif; color:black; padding: 0; margin: 0; outline: 0; border: 0 none; clear: both; vertical-align: baseline; display: block;'>D<span style='font:24px \"Courier New\", Courier, monospace; color:black; padding: 0; margin: 0; outline: 0; border: 0 none; clear: both; vertical-align: baseline;'>&amp;</span>B</div><div style='position:absolute; left:4px; top:29px; width:56px; height:11px; z-index:100; font: bold 10px \"Times New Roman Bold\", Times, serif; letter-spacing:-1px; color:black; padding: 0; margin: 0; outline: 0; border: 0 none; clear: both; vertical-align: baseline; display: block;'>CREDIBILITY</div><div style='position:absolute; left:3px; top:45px; width:40px; height:12px; z-index:100; font: bold 11px \"Times New Roman Bold\", Times Bold, serif; color:black; padding: 0; margin: 0; outline: 0; border: 0 none; clear: both; vertical-align: baseline; display: block;'>PLATINUM</div></h1><img src='https://www.dandb.com/businessdirectory/badgecontrol.jsp?bid=13989555&html=1' style='width:66px; height:98px; padding: 0; margin: 0; outline: 0; border: 0 none; clear: both; vertical-align: baseline; display: block;' alt='D&B Credibility Platinum' /></a><div style='padding: 4px 0 0 0; position:absolute; left:6px; top:64px; width:54px; height:35px; z-index:10;'><a style='font: bold 9px/9px Arial, Helvetica, sans-serif; cursor:pointer; color:#333; text-decoration:none; padding: 0; margin: 0; outline: 0; border: 0 none; clear: both; vertical-align: baseline; display: block;' href='https://www.dandb.com/businessdirectory/' target='_blank'>D&amp;B Credibility Review</a></div></div></div>";

                        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);
        });
    }
})();
