(function () {window._dt_dynad_5550002447_15851316044571749122586='';window._tp_dynad_5550002447_15851316044571749122586={'borderColor':'FFFFFF','altColor':'FFFFFF','idt_product':'1','titleColor':'000000','bgColor':'FFFFFF','deslabel':'fg-uol-728x90','coddisplaysupplier':'60b2c720d4054be69bd0bbb303994a6c','aff_source':'60b2c720d4054be69bd0bbb303994a6c','urlColor':'A6A6A6','descrColor':'000000'};if(typeof JSON!=="object"){JSON={};JSON.parse=JSON.parse||function(o){return eval('('+o+')')};JSON.stringify=JSON.stringify||function(o){var n;var a;var t=typeof(o);var json=[];if(t!='object'||o===null){if(t=="string"){o='"'+o+'"'}return String(o)}else{a=(o&&o.constructor==Array);for(var key in o){n=o[key];t=typeof(n);if(t=="string"){n='"'+n.replace(/["]/g,"\\\"")+'"'}else if(t=="object"&&n!==null){n=JSON.stringify(n)}json.push((a?"":'"'+key+'":')+String(n))}return(a?"[":"{")+String(json)+(a?"]":"}")}}}
function DADB(t){return DADB.inst instanceof DADB?DADB.inst._rs=t(DADB.inst):(this._if=null,this._ok=!1,this._db=(typeof window['_dynad_tag_protocol_']!=='undefined'?window['_dynad_tag_protocol_']:("http:"!=window.location.protocol?"https://":"http://"))+"s.dynad.net",this._pt="/stack/KMA9C2O70iP6CHSgXk0LGaQ8ML9m6vJE4RIi1Rf61p4.html?v69",this._qu=[],this._rq={},this._id=(new Date).getTime()+Math.floor(1e4*Math.random()),this._ls=this._dg()==this._db,this._rs="",DADB.inst=this,void this.init(function(){"function"==typeof t&&(DADB.inst._rs=t(DADB.inst))}))}"object"!=typeof JSON&&(JSON={},JSON.parse=JSON.parse||function(o){return eval("("+o+")")},JSON.stringify=JSON.stringify||function(t){var i,e,s=typeof t,n=[];if("object"!=s||null===t)return"string"==s&&(t='"'+t+'"'),t+"";e=t&&t.constructor==Array;for(var o in t)i=t[o],s=typeof i,"string"==s?i='"'+i.replace(/["]/g,'\\"')+'"':"object"==s&&null!==i&&(i=JSON.stringify(i)),n.push((e?"":'"'+o+'":')+(i+""));return(e?"[":"{")+(n+"")+(e?"]":"}")}),DADB.prototype={constructor:DADB,init:function(t){var i=this;this._ls||this._if||(this._if=document.createElement("iframe"),this._if.style.cssText="position:absolute;width:1px;height:1px;left:-9999px;",(document.body||document.documentElement||document.getElementsByTagName('body')[0]).appendChild(this._if),window.addEventListener?(this._if.addEventListener("load",function(){i._ild()},!1),window.addEventListener("message",function(t){i._hm(t)},!1)):this._if.attachEvent&&(this._if.attachEvent("onload",function(){i._ild()},!1),window.attachEvent("onmessage",function(t){i._hm(t)})),this._if.src=this._db+this._pt),"function"==typeof t&&t()},getResult:function(){return this._rs},getCk:function(t,i){var e={request:{id:++this._id,type:"gc",key:t},callback:i};this._s(e)},setCk:function(t,i,e,s){"function"==typeof e&&(s=e,e=2592e3);var n={request:{id:++this._id,type:"sc",key:t,value:i,ttl:e},callback:s};this._s(n)},setNav:function(t,i,e,s,n){var o={request:{id:++this._id,type:"snav",key:t,value:i+"|"+e+"|"+s},callback:n};this._s(o)},getNav:function(t,i){var e={request:{id:++this._id,type:"nav",key:t},callback:i};this._s(e)},getItem:function(t,i){if(this._ls)return localStorage[t];var e=this,s={request:{id:++e._id,type:"get",key:t},callback:i};e._s(s)},setItem:function(t,i,e){if(this._ls)return void(localStorage[t]=i);var s=this,n={request:{id:++s._id,type:"set",key:t,value:i},callback:e};s._s(n)},delItem:function(t){if(this._ls)return delete localStorage[t];var i={request:{id:++this._id,type:"unset",key:t}};this._s(i)},_s:function(t){this._ok?this._if&&(this._rq[t.request.id]=t,this._if.contentWindow.postMessage(JSON.stringify(t.request),this._db)):this._qu.push(t)},_ild:function(){if(this._ok=!0,this._qu.length){for(var t=0,i=this._qu.length;i>t;t++)this._s(this._qu[t]);this._qu=[]}},_hm:function(t){if(!/\{.*(\"id\")+.*(\"key\")+.*\}/.test(t.data)||!/s.dynad.net/.test(t.origin)) return;try{if(t.origin==this._db){var i=JSON.parse(t.data);void 0!==this._rq[i.id].deferred&&this._rq[i.id].deferred.resolve(i.value);void 0!==this._rq[i.id]&&"function"==typeof this._rq[i.id].callback&&(this._rs=this._rq[i.id].callback(i.key,i.value)),delete this._rq[i.id]}}catch(t){}},_dg:function(){var t=window.location.href,i=document.createElement("a");return i.href=t,i.hostname}};
window._DADB_5550002447_15851316044571749122586=DADB;
function DAFIFO(e,t,n,r,i){this.s=e;this.t=t;this.db=n;this.it=[];this.ttl=r;this._rs="";var s=this;s.db.getItem(s.t,function(e,t){s.init(e,t);if(typeof i=="function"){s._rs=i(s)}})}DAFIFO.prototype={constructor:DAFIFO,init:function(e,t){if(t==null||t==""){this.it={}}else{this.it=JSON.parse(t)}},commit:function(e){var t=this;var n=0;this.db.setItem(this.t,JSON.stringify(this.it));if(typeof e=="function"){e(n)}},getResult:function(){return this._rs},push:function(e,t){var n=0;if(this.it!=null&&typeof e==="string"&&e!=""){this.it=this._vd();var r=[];r[r.length]={v:e,t:parseInt((new Date).getTime()/1e3)};var i=1;for(k in this.it){if(i++<this.s&&typeof this.it[k]==="object"&&typeof this.it[k]["v"]==="string"&&typeof this.it[k]["t"]==="number"&&this.it[k]["v"]!=e&&this.it[k]["v"]!=""){r[r.length]=this.it[k]}}n=1;this.it=r;if(typeof t=="function"){t(n)}}return n},pop:function(e){var t=null;if(this.it!=null){this.it=this._vd();var n=[];var r=0;for(k in this.it){if(r++>0){n[n.length]=this.it[k]}else{t=this.it[k]["v"]}}this.it=n;if(typeof e=="function"){e(t)}}return t},remove:function(e,t){var n=[];if(this.it!=null){var r=0;var i=[];for(k in this.it){if(this._ia(k)&&this.it[k]["v"]!=e){i[r++]=this.it[k]}}this.it=i;if(typeof t=="function"){t(n)}}return n},list:function(e,t,n){var f=[];if("function"==typeof e&&void 0==t&&(n=e,t=!1,e=this.it.length),"function"==typeof t&&void 0==n&&(n=t,t=!1),null!=this.it){var o=-1;for(k in this.it)if(this._ia(k)){if(++o>=this.s||o>=e)break;f[o]=t?this.it[k]:this.it[k].v}"function"==typeof n&&n(f)}return f},clear:function(e){this.it=[];if(typeof e=="function"){e()}},_vd:function(){var e=[];for(k in this.it){if(this._ia(k))e[k]=this.it[k]}return e},_ct:function(){var e=0;for(k in this.it)e++;return e},_ia:function(e){return(new Date).getTime()/1e3-this.it[e]["t"]<this.ttl}};
window._DAFIFO_5550002447_15851316044571749122586=DAFIFO;
new DADB(function(db){db.getCk('optout',function(k,v){if(v!=='1'){(function(customerId, placementId, campaignId, creativeId, timestamp, lookBackWindow, action){setTimeout(function(){new DADB(function(a){"I"==action?new DAFIFO(100,"d"+customerId+"W",a,15552e3,function(a){a.push(placementId+"|"+campaignId+"|"+creativeId+"|"+timestamp+"|"+(timestamp+24*lookBackWindow*3600),function(){a.commit(function(){a.list(function(b){for(var c in b){var d=b[c].split("|");d[d.length-1]<timestamp&&a.remove(b[c],function(){a.commit()})}})})})}):"D"==action?new DAFIFO(100,"d"+customerId+"W",a,15552e3,function(a){a.list(function(b){for(var c in b)els[els.length-1]<timestamp&&a.remove(b[c],function(){a.commit()}),b[c].indexOf(placementId+"|"+campaignId+"|"+creativeId+"|")>-1&&a.remove(b[c],function(){a.commit()})})}):"R"==action&&new DAFIFO(100,"d"+customerId+"W",a,15552e3,function(a){a.list(function(b){var c="";for(var d in b)c+=(""==c?"":";")+b[d];a.clear(function(){a.commit(function(){callback(c)})})})})});},0,customerId,placementId,campaignId,creativeId,timestamp,lookBackWindow,action);})(2016111101,5550002447,5000005410,4000025804,1585131648,30,'I');}else{db.setCk('uid','',0)}})});
document.write('<div style="background-color:white; border:0; z-index:1; margin:0; overflow:hidden; visibility:visible; display:block; width:728px; height:90px; " id="_dynad_c_I5550002447_15851316044571749122586">');var tagParameters=window._tp_dynad_5550002447_15851316044571749122586;var dt_dynad=window._dt_dynad_5550002447_15851316044571749122586;try{
var _rp15851316044571749122586=(function(reqid,type,step,containerId,placementId){try{try {
    if (step == 1) {
        var container = document.getElementById(containerId);
        var scripts = container.parentNode.getElementsByTagName('script');
        if (scripts.length === 0) {
            scripts = document.getElementsByTagName('script');
        }
        var found = false;
        window.formatId = '1';
        window.numads = '2';
        window.type = '1';
        for (var x = (scripts.length - 1); x >= 0; x--) {
            if (scripts[x].hasAttribute('src')) {
                var scriptSrc = scripts[x].getAttribute('src');
                if (typeof scriptSrc !== 'undefined' && null !== scriptSrc && '' !== scriptSrc && 
                    scriptSrc.indexOf('.dynad.net') > -1 && scriptSrc.indexOf('?dc=' + placementId + ';') > -1) {
                    found = true;
                    var params = scriptSrc.substring(scriptSrc.indexOf('?') + 1);
                    var splitted = params.split(';');
                    for (var y = (splitted.length - 1); y >= 0; y--) {
                        if (typeof splitted[y] !== 'undefined' && 
                            null !== splitted[y] &&
                            splitted[y].indexOf('=') > -1) {
                            var entry = splitted[y].split('=');
                            window[entry[0]] = entry[1];
                        }
                    }
                    break;
                }
            }
        }
        if (!found) {
            for (var x = (scripts.length - 1); x >= 0; x--) {
                var scriptUri = scripts[x].baseURI;
                if (typeof scriptUri !== 'undefined' && null !== scriptUri && '' !== scriptUri && 
                    scriptUri.indexOf('.dynad.net') > -1 && scriptUri.indexOf('?dc=' + placementId + ';') > -1) {
                    var params = scriptUri.substring(scriptUri.indexOf('?') + 1);
                    var splitted = params.split(';');
                    for (var y = (splitted.length - 1); y >= 0; y--) {
                        if (typeof splitted[y] !== 'undefined' && 
                            null !== splitted[y] &&
                            splitted[y].indexOf('=') > -1) {
                            var entry = splitted[y].split('=');
                            window[entry[0]] = entry[1];
                        }
                    }
                    break;
                }
            }
        }
    }
 
    if( step == 2 ) {
        var divContainer = document.getElementById(containerId);
        var tagScript = divContainer.parentNode.getElementsByTagName('script'); 
        for( var x = (tagScript.length - 1) ; x >= 0; x-- ) {
            if( tagScript[x].hasAttribute('src') && 
                typeof tagScript[x].getAttribute('src') !== 'undefined' && 
                tagScript[x].getAttribute('src') != '' && 
                tagScript[x].getAttribute('src') != null ) {
                
                var strSRC = tagScript[x].getAttribute('src');
                if( strSRC.indexOf('.dynad.net') > -1 
                    && strSRC.indexOf('?dc='+placementId+';') > -1
                    && strSRC.indexOf(';idt_url=') > -1 ) {

                    var aff_source = "";
                    if( strSRC.indexOf(';aff_source=') > -1 ) {
                        aff_source = strSRC.substring( strSRC.indexOf(';aff_source=') + ';aff_source='.length );
                        aff_source = aff_source.substring(0, aff_source.indexOf(';'));
                    }

                    var idtURL = strSRC.substring( strSRC.indexOf(';idt_url=') + ';idt_url='.length );
                    idtURL = idtURL.substring(0, idtURL.indexOf(';'));
                    
                    var idtLabel = "";                
                    if( strSRC.indexOf(';idt_label=') > -1 ) {
                        idtLabel = strSRC.substring( strSRC.indexOf(';idt_label=') + ';idt_label='.length );
                        idtLabel = idtLabel.substring(0, idtLabel.indexOf(';'));
                    }

                    var cpg = "";                
                    if( strSRC.indexOf(';cpg=') > -1 ) {
                        cpg = strSRC.substring( strSRC.indexOf(';cpg=') + ';cpg='.length );
                        cpg = cpg.substring(0, cpg.indexOf(';'));
                    }

                    var creative = "";                
                    if( strSRC.indexOf(';creative=') > -1 ) {
                        creative = strSRC.substring( strSRC.indexOf(';creative=') + ';creative='.length );
                        creative = creative.substring(0, creative.indexOf(';'));
                    }

                    var parameters = "";                
                    if( strSRC.indexOf(';parameters=') > -1 ) {
                        parameters = strSRC.substring( strSRC.indexOf(';parameters=') + ';parameters='.length );
                        parameters = parameters.substring(0, parameters.indexOf(';'));
                    }
                    
                    var tagParams = null;
                    try { 
                        if( typeof window['_tp_dynad_' + reqid.substring(1)] !== 'undefined' )
                            tagParams = window['_tp_dynad_' + reqid.substring(1)];
                    } catch (exParams){}
                    
                    var idtBanner = "";
                    try {
                        if( tagParams != null && typeof tagParams['idt_banner'] !== 'undefined' )
                            idtBanner = tagParams['idt_banner'];
                    } catch ( exIdtBanner ){}
                    
                    var container = document.getElementById(containerId);
                    var anchor = container.getElementsByTagName('a');
                    if( typeof anchor !== 'undefined' && anchor.length > 0 ) {
                        for(var a = 0; a < anchor.length; a++ ) {
                            if( typeof anchor[a].getAttribute('href') !== 'undefined' && anchor[a].getAttribute('href') != '' ) {
                                if( anchor[a].getAttribute('href').indexOf('.dynad.net') > -1 && anchor[a].getAttribute('href').indexOf('/c/') > -1 ) {
                                    anchor[a].setAttribute('href', anchor[a].getAttribute('href') + ';p2=' + 
                                            encodeURIComponent('idtURL=' + encodeURIComponent(idtURL) + '&idtLabel=' + idtLabel + '&idtBanner=' + idtBanner + 
                                            '&aff_source=' + aff_source + '&cpg=' + cpg + '&creative=' + creative + '&parameters=' + parameters) );
                                }
                            }
                        }
                    }
                    
                }
                break;
            }
        }
    }
} catch (e){}
return true;}catch(e){if(typeof console!=='undefined'&&typeof console.log!=='undefined'){console.log('DynAd Error:');console.log(e);}}})('I5550002447_15851316044571749122586', 'TP', 1,'_dynad_c_I5550002447_15851316044571749122586','5550002447');if(_rp15851316044571749122586==true||typeof _rp15851316044571749122586==='undefined'){document.write('<script type=\"text\/javascript\">\n    var paramsObj = {\n        \"coddisplaysupplier\": \"\",\n        \"excludeTM\": \"\",\n        \"deslabel\": \"\",\n        \"borderColor\": \"\",\n        \"urlAffiliatedReferer\": \"\",\n        \"externalUrl\": \"\",\n        \"bgColor\": \"\",\n        \"descrColor\": \"\",\n        \"titleColor\": \"\",\n        \"urlColor\": \"\",\n        \"formatId\": \"\"\n    };\n    var UOLAF = window.UOLAF || {};\n\n    UOLAF.init = function () {\n\n        if(!UOLAF.runOnce) {\n            UOLAF.runOnce=true;\n            try {\n                UOLAF.pg = Number((\/UOLAFpg=([^|;]+)\/).exec(document.cookie)[1]);\n            } catch(e) {\n                UOLAF.pg = -1;\n            }\n        }\n\n        adBlockCountLp = (typeof adBlockCountLp != \"undefined\")? adBlockCountLp + 1 : 0;\n\n        UOLAF.insertAds();\n\n        UOLAF.validateParameter();\n\n        try {\n            if(UOLAF.validateFlagPG() && top.document) {\n                UOLAF.isVisible = function (element){\n                var rect = element.getBoundingClientRect();\n                var width = 0;\n                if(rect.left >= 0) {\n                    width = window.innerWidth - rect.left;\n                } else if(rect.right >= 0){\n                    width = rect.right;\n                }\n\n                var height = 0;\n                if(rect.top >= 0) {\n                    height = window.innerHeight - rect.top;\n                } else if(rect.bottom >= 0){\n                    height = rect.bottom;\n                }\n\n                if((width * height) >= ((rect.width * rect.height)\/2)){\n                    return true;\n                }\n                return false;\n            };\n\n            UOLAF.clearTimer = function (){\n                for(var i = 0; i < UOLAF.visibleTime.length; i++){\n                    if(UOLAF.visibleTime[i]){\n                        clearTimeout(UOLAF.visibleTime[i]);\n                        UOLAF.visibleTime[i] = null;\n                    }\n                }\n            };\n\n            UOLAF.calcPercentTovisible = function () {\n                UOLAF.clearTimer();\n                if(!UOLAF.visibleAds){\n                    for(var i = 0; i < UOLAF.elements.length; i++) {\n                        var el = UOLAF.elements[i];\n                        if(el.src.search(\"formatId=66\") == -1){\n                            continue;\n                        }\n                        if(UOLAF.isVisible(el)){\n                           UOLAF.visibleTime[i] = setTimeout(UOLAF.checkVisibility, 1000, i);\n                        }\n                    }\n                }\n            };\n\n            UOLAF.checkVisibility = function(i){\n                if(UOLAF.isVisible(UOLAF.elements[i])){\n                    if(!UOLAF.visibleAds){\n                        UOLAF.removeListerners();\n                        UOLAF.writePageOnSessionStorage();\n                    }\n                    UOLAF.visibleAds = true;\n                }\n            };\n\n            UOLAF.writePageOnSessionStorage = function(){\n                try {\n                    if(top.document) {\n                        if(sessionStorage){\n                            var actualPage = sessionStorage.getItem(\'numpage1\');\n                            if(actualPage !== null && !UOLAF.resetPG){\n                                actualPage = parseInt(actualPage);\n                                sessionStorage.setItem(\"numpage1\",++actualPage);\n                            }else{\n                                sessionStorage.setItem(\"numpage1\",0);\n                            }\n                        }else{\n                            if(window.console){\n                                console.warn(\"Nao existe o metodo Session Storage \");\n                            }\n                        }\n                    }\n                } catch (exception) {\n                    if(window.console) {\n                        console.warn(\"Nao setaremos o Session Storage em iframes.\");\n                    }\n                }\n            };\n\n            UOLAF.readPostMessage = function(event){\n                try{\n                    var origin = event.origin;\n                    origin = origin.replace(\/^http(s)?:\\\/\\\/\/,\"\");\n                    if(origin == \"adclient.siga.uol.com.br\" && typeof event.data != \"object\"){\n                        var jsonData = JSON.parse(event.data);\n                        if(jsonData !== null && jsonData.location !== null){\n                            var match = jsonData.location.match(\/formatId=(.+)_.+&numads=([^&]+)\/);\n                            if(match !== null && match[1] == \'66\') {\n                                if(jsonData.ads.length < parseInt(match[2])){\n                                    UOLAF.resetPG = true;\n                                }\n                            }\n                        }\n                    }\n                }catch(e){\n                    if(window.console){\n                        console.warn(\"Formato 66 - Erro ao receber mensagem : \" + e);\n                    }\n                }\n            };\n\n            UOLAF.initPG = function() {\n                UOLAF.calcPercentTovisible();\n                UOLAF.addListerner(\'scroll\', UOLAF.calcPercentTovisible);\n                UOLAF.addListerner(\'resize\', UOLAF.calcPercentTovisible);\n            };\n\n            UOLAF.addListerner = function(eventType, func){\n                if(window.addEventListener) {\n                    window.addEventListener(eventType, func, true);\n                }\n                else{\n                    eventType = \'on\' + eventType;\n                    window.attachEvent(eventType, func);\n                }\n            };\n\n            UOLAF.addListerners = function(){\n                UOLAF.addListerner(\'load\', UOLAF.initPG);\n                UOLAF.addListerner(\'message\', UOLAF.readPostMessage);\n            };\n\n            UOLAF.removeListerners = function(){\n                if(window.removeEventListener) {\n                    window.removeEventListener(\'load\', UOLAF.initPG, true);\n                    window.removeEventListener(\'scroll\', UOLAF.calcPercentTovisible, true);\n                    window.removeEventListener(\'resize\', UOLAF.calcPercentTovisible, true);\n                } else  {\n                    window.detachEvent(\'onload\', UOLAF.initPG);\n                    window.detachEvent(\'onscroll\', UOLAF.calcPercentTovisible);\n                    window.detachEvent(\'onresize\', UOLAF.calcPercentTovisible);\n                }\n            };\n                UOLAF.addListerners();\n            }\n        } catch (exception) {\n            if(window.console) {\n                console.warn(\"Set Session Storage - \" + exception);\n            }\n        }\n        UOLAF.closeIframe();\n    };\n\n    var associacaoCodigoAplicacao = [];\n\n    associacaoCodigoAplicacao[\"LINKS\"] = \"1\";\n    associacaoCodigoAplicacao[\"SHOPPING\"] = \"2\";\n\n    UOLAF.setLocalStorageAB = function() {\n        if(localStorage){\n            var uolaf_ab = localStorage.getItem(\"UOLAF-AB\");\n            if(uolaf_ab == null){\n                var rand = Math.random();\n                if(rand < 0.5) localStorage.setItem(\"UOLAF-AB\", \"e\");\n                else if (rand < 0.75) localStorage.setItem(\"UOLAF-AB\", \"f\");\n                else localStorage.setItem(\"UOLAF-AB\", \"g\");\n            }\n        }\n    };\n\n    UOLAF.validateFlagPG = function() {\n        try {\n            var flagPG = 0;\n            if(formatId == \"66_f\"){\n                flagPG = 1;\n            }\n        } catch (exception) {\n            var flagPG = 0;\n        } finally {\n            return flagPG;\n        }\n    };\n\n    UOLAF.getFormat66 = function(){\n         var format66 = \"66_e\";\n         if(localStorage){\n            UOLAF.setLocalStorageAB();\n            format66 = \"66_\" + localStorage.getItem(\"UOLAF-AB\");\n        }\n        return format66;\n    };\n\n    UOLAF.prepareRequest = function(adBlockCount){\n        \/\/console.log(\"prepareRequest: \" + adBlockCount);\n        UOLAF.adsHTML = (typeof UOLAF.adsHTML != \"undefined\") ? UOLAF.adsHTML : [];\n        var className = \"iframeUOL\" + adBlockCount;\n        document.write(\'<div class=\"\' + className + \'\">Anuncie aqui!<\/div>\');\n        var divAd = document.getElementsByClassName(className)[0];\n        UOLAF.adsHTML[adBlockCount] = UOLAF.validateParameter();\n\n        inViewport(divAd, {\n            offset: 100\n        }, UOLAF.appendAds);\n    };\n\n    UOLAF.appendAds = function(element) {\n        \/\/console.log(\"anexar anuncios\");\n        var elementClass = element.classList[0].split(\"UOL\");\n        var adBlockCount = elementClass[1];\n        \/\/console.log(\"  - bloco:\" + adBlockCount);\n        var adHTML = UOLAF.adsHTML[adBlockCount];\n        element.innerHTML = adHTML;\n    };\n\n    UOLAF.insertAds = function() {\n        \/\/console.log(\"insertAds: \" + adBlockCountLp);\n        var adHTML = UOLAF.validateParameter();\n        UOLAF.createAdsIframe(adHTML);\n    };\n\n    UOLAF.validateParameter = function() {\n        var adHTML;\n        try {\n            adHTML = UOLAF.ads();\n        } catch (e) {\n            if (window.console) {\n                console.warn(\"[UOL Cliques]Ha erro nos parametros passado pelo Afiliado.\");\n            }\n        }\n        return adHTML;\n    };\n\n    UOLAF.ads = function () {\n        UOLAF.pg++;\n        UOLAF.pg = (UOLAF.pg>9)?0:UOLAF.pg;\n\n        try {\n            finalApplicationType = associacaoCodigoAplicacao[type];\n            if (finalApplicationType == null) {\n                finalApplicationType = type;\n            }\n        } catch (e) {\n            void (null);\n        }\n\n        \/*\n         * Mostrar randomicamente um formato diferente em casos especificos.\n         * O algoritmo tera uma taxa de randomizacao onde, em x% das requisicoes, sera feita uma randomizacao entre todos os formatos opcionais\n         *\/\n\n        var rateRandom = 1; \/\/porcentagem de vezes que o teste de randomizacao sera feito\n        var urlString = location.href;\n\n        var custumAdArray = null;\n        try{\n            custumAdArray = (afXAdvertise || afYAdvertise || afYAd || afFontType || afFontSize);\n        } catch(e){\n            custumAdArray = false;\n        }\n\n        try{\n            hideImage = (noImage);\n        } catch(e){\n            hideImage = false;\n        }\n\n        if(formatId == 69){\n            formatId = 79;\n        }\n\n        \/*type = 2 Shopping*\/\n        if(type == \"2\") {\n            formatId = UOLAF.convertShoppingToCliques(formatId.toString());\n            finalApplicationType = \"1\";\n        }\n\n        if( Math.random()>(1-rateRandom) && !custumAdArray ){\n\n            var manipulatedParameters = []; \/\/lista de formatos alternativos (chave e quantidade de anuncios)\n\n            \/**\n             *  caso futuramente deseje-se utilizar formatos com e sem imagem (e.g. 1_c e 1_d) randomicamente,\n             *  deve-se deixar o bloco dos formatos com imagem com o if, e os sem imagem  sem if (como no exemplo comentado abaixo)\n             *\/\n\n            \/\/exibe apenas 10% com img default. 0.20 considerando 10% de 50\n            if (Math.random() < 0.20) {\n                if(formatId==5) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"5_c\", \"numAds\": 2};\n                else if(formatId==6) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"6_c\", \"numAds\": 2};\n                else if(formatId==8) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"8_c\", \"numAds\": 1};\n                else if(formatId==10) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"10_c\", \"numAds\": 1};\n                else if(formatId==11) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"11_d\", \"numAds\": 2};\n                else if(formatId==66) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"66_d\", \"numAds\": 3};\n                else if(formatId==67) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"67_d\", \"numAds\": 2};\n                else if(formatId==68) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"68_a\", \"numAds\": 4};\n                else if(formatId==69) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"69_a\", \"numAds\": 2};\n                else if(formatId==77) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"77_d\", \"numAds\": 5};\n                else if(formatId==78) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"78_a\", \"numAds\": 5};\n                else if(formatId==79) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"79_a\", \"numAds\": 5};\n                else if(formatId==80) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"80_a\", \"numAds\": 5};\n                else if(formatId==81) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"81_a\", \"numAds\": 4};\n                else if(formatId==82) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"82_a\", \"numAds\": 4};\n                else if(formatId==83) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"83_a\", \"numAds\": 4};\n            }\n\n            \/\/if(hideImage===false){\n                if(formatId==1) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"1_f\", \"numAds\": 2};\n                else if(formatId==2) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"2\", \"numAds\": 1};\n                else if(formatId==3) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"3\", \"numAds\": 1};\n                else if(formatId==4) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"4\", \"numAds\": 1};\n                else if(formatId==5) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"5_d\", \"numAds\": 2};\n                else if(formatId==6) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"6_d\", \"numAds\": 2};\n                else if(formatId==7) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"7\", \"numAds\": 1};\n                else if(formatId==8) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"8_d\", \"numAds\": 1};\n                else if(formatId==9) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"9_g\", \"numAds\": 2};\n                else if(formatId==10) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"10_d\", \"numAds\": 1};\n                else if(formatId==11) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"11_e\", \"numAds\": 2};\n                else if(formatId==66) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": UOLAF.getFormat66(), \"numAds\": 3};\n                else if(formatId==67) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"67_e\", \"numAds\": 2};\n                else if(formatId==68) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"68_b\", \"numAds\": 4};\n                else if(formatId==69) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"69_b\", \"numAds\": 2};\n                else if(formatId==77) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"77_c\", \"numAds\": 5};\n                else if(formatId==78) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"78_b\", \"numAds\": 5};\n                else if(formatId==79) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"79_b\", \"numAds\": 5};\n                else if(formatId==80) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"80_b\", \"numAds\": 5};\n                else if(formatId==81) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"81_b\", \"numAds\": 4};\n                else if(formatId==82) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"82_b\", \"numAds\": 4};\n                else if(formatId==83) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"83_b\", \"numAds\": 4};\n                else if(formatId==84) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"84\", \"numAds\": 1};\n                else if(formatId==85) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"85\", \"numAds\": 1};\n                else if(formatId==86) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"86\", \"numAds\": 4};\n                else if(formatId==87) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"87\", \"numAds\": 3};\n                else if(formatId==88) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"88\", \"numAds\": 1};\n                else if(formatId==89) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"89\", \"numAds\": 3};\n                else if(formatId==90) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"90\", \"numAds\": 2};\n                else if(formatId==91) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"91\", \"numAds\": 3};\n                else if(formatId==92) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"92\", \"numAds\": 1};\n                else if(formatId==93) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"93\", \"numAds\": 3};\n                else if(formatId==101) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"101\", \"numAds\": 1};\n                else if(formatId==102) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"102\", \"numAds\": 1};\n                else if(formatId==103) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"103\", \"numAds\": 1};\n                else if(formatId==104) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"104\", \"numAds\": 2};\n                else if(formatId==105) manipulatedParameters[manipulatedParameters.length] = {\"formatId\": \"105\", \"numAds\": 1};\n            \/\/}\n            switch(formatId.toString()){\n                \/\/essas duas linhas pode ser parametrizada para cada formato posteriormente, deixando as ultimas na condicao default\n                case \"1\":\n                case \"2\":\n                case \"3\":\n                case \"4\":\n                case \"5\":\n                case \"6\":\n                case \"7\":\n                case \"8\":\n                case \"9\":\n                case \"10\":\n                case \"11\":\n                case \"66\":\n                case \"67\":\n                case \"68\":\n                case \"69\":\n                case \"77\":\n                case \"78\":\n                case \"79\":\n                case \"80\":\n                case \"81\":\n                case \"82\":\n                case \"83\":\n                case \"84\":\n                case \"85\":\n                case \"86\":\n                case \"87\":\n                case \"88\":\n                case \"89\":\n                case \"90\":\n                case \"91\":\n                case \"92\":\n                case \"93\":\n                case \"101\":\n                case \"102\":\n                case \"103\":\n                case \"104\":\n                case \"105\":\n                    if(manipulatedParameters.length>0){\n                        var numFormats = manipulatedParameters.length;\n                        var rand = Math.floor(Math.random()*numFormats);\n                        formatId = manipulatedParameters[rand].formatId;\n                        numads = manipulatedParameters[rand].numAds;\n                    }\n                break;\n            }\n        }\n\n\n        urlAdvertiseUol  = \'\/\/adclient.siga.uol.com.br\/\';\n        try{urlAdvertiseUol += \'format\'+formatId+\'.html?\'; }catch(e){ void(null) }\n        if(!UOLAF.validateFlagPG()){\n            try{urlAdvertiseUol += \'adBlockCount=\'+adBlockCountLp+\'&amp;\';}catch(e){void(null)}\n        }\n        try{urlAdvertiseUol += \'page=\'+UOLAF.pg+\'&amp;\';}catch(e){void(null)}\n        try{urlAdvertiseUol += \'afYAd=\'+afYAd+\'&amp;\';}catch(e){void(null)}\n        try{urlAdvertiseUol += \'afXAdvertise=\'+afXAdvertise+\'&amp;\';}catch(e){void(null)}\n        try{urlAdvertiseUol += \'afYAdvertise=\'+afYAdvertise+\'&amp;\';}catch(e){void(null)}\n        try{urlAdvertiseUol += \'afFontType=\'+escape(afFontType)+\'&amp;\';}catch(e){void(null)}\n        try{urlAdvertiseUol += \'afFontSize=\'+afFontSize+\'&amp;\';}catch(e){void(null)}\n        try{urlAdvertiseUol += \'urlReferer=\'+ UOLAF.resolveURLReferer()+\'&amp;\';}catch(e){void(null)}\n        try{urlAdvertiseUol += \'urlAffiliatedReferer=\'+UOLAF.removeAllParameters(document.referrer)+\'&amp;\';}catch(e){void(null)}\n        try{urlAdvertiseUol += \'formatId=\'+formatId+\'&amp;\';}catch(e){void(null)}\n        try{urlAdvertiseUol += \'numads=\'+numads+\'&amp;\';}catch(e){void(null)}\n        try{urlAdvertiseUol += \'borderColor=\'+borderColor+\'&amp;\';}catch(e){void(null)}\n        try{urlAdvertiseUol += \'bgColor=\'+bgColor+\'&amp;\';}catch(e){void(null)}\n        try{urlAdvertiseUol += \'titleColor=\'+titleColor+\'&amp;\';}catch(e){void(null)}\n        try{urlAdvertiseUol += \'descrColor=\'+descrColor+\'&amp;\';}catch(e){void(null)}\n        try{urlAdvertiseUol += \'urlColor=\'+urlColor+\'&amp;\';}catch(e){void(null)}\n        try{urlAdvertiseUol += \'altColor=\'+altColor+\'&amp;\';}catch(e){void(null)}\n        try{urlAdvertiseUol += \'hasFrames=\'+hasFrames+\'&amp;\';}catch(e){void(null)}\n        try{urlAdvertiseUol += \'deslabel=\'+encodeURIComponent(deslabel)+\'&amp;\';}catch(e){void(null)}\n        try{ urlAdvertiseUol += \'coddisplaysupplier=\'+coddisplaysupplier+\'&amp;\'; }catch(e){ void(null) }\n        try{ urlAdvertiseUol += \'has_search=\'+has_search+\'&amp;\'; }catch(e){ void(null) }\n        try{ urlAdvertiseUol += \'adult=\'+adult+\'&amp;\'; }catch(e){ void(null) }\n        try{ urlAdvertiseUol += \'subjects=\'+subjects+\'&amp;\'; }catch(e){ void(null) }\n        try{ urlAdvertiseUol += \'partnerurl=\'+encodeURIComponent(partnerurl)+\'&amp;\'; }catch(e){ void(null) }\n        try{ urlAdvertiseUol += \'flagBehaviour=\'+0+\'&amp;\'; }catch(e){ void(null) }\n        try{\n            if (typeof retarget == \'undefined\' || retarget == true) {\n                urlAdvertiseUol += \'flagRetarget=1&amp;\';\n            }\n        }catch(e){ void(null) }\n        try{\n            if(finalApplicationType != null){\n                urlAdvertiseUol += \'type=\' + finalApplicationType + \'&amp;\';\n            }\n        }catch(e){ void(null) }\n        try{ urlAdvertiseUol += \'category=\'+category+\'&amp;\'; }catch(e){ void(null) }\n\n        try{\n            if( formatId == 66 || formatId == 67 ){\n                urlAdvertiseUol += \'blank=1&amp;\';\n            } else {\n                urlAdvertiseUol += \'blank=\'+blank+\'&amp;\';\n            }\n        }catch(e){ void(null) }\n        try{urlAdvertiseUol += \'cache=\'+afCache; }catch(e){ void(null) }\n        try {\n            if(top.document){\n                if(UOLAF.validateFlagPG()) {\n                    var currentPage = UOLAF.getNumpage1();\n                    var ignoreCookie = 1;\n                    urlAdvertiseUol += \'numpage=\'+currentPage+\'&amp;pg=\'+ignoreCookie+\"&amp;\";\n                    sessionStorage.setItem(\"numpage1\",currentPage);\n               }\n               urlAdvertiseUol += \'top=1&amp;\';\n            }\n        }catch(e){void(null)}\n        try {\n\n            UOLAF.trim();\n            if (typeof externalUrl != null || typeof externalUrl != \'undefined\') {\n                if (externalUrl != \"\") {\n                    urlAdvertiseUol += \'externalUrl=\'+encodeURIComponent(externalUrl.trim());\n                }\n            }\n        }catch(e){ void(null) }\n\n\n        document.cookie = \'UOLAFpg=\'+UOLAF.pg;\n        htmlUol = \'<iframe src=\"\'+urlAdvertiseUol+\'\" \';\n        htmlUol += \'marginwidth=\"0\" marginheight=\"0\" vspace=\"0\" hspace=\"0\" allowtransparency=\"true\" frameborder=\"0\" scrolling=\"no\" class=\"iframe_uolcliques\" \';\n        tipos = [\'zeroIndex\', [728,90], [468,60], [125,125], [234,60], [120,600], [160,600], [180,150], [120,240], [300,250],[250,250], [336,280], [944,275], [944,185], [622,370], [622,155]];\n        tipos[84]  = [300,250];\n        tipos[85]  = [944,185];\n        tipos[86]  = [944,275];\n        tipos[87]  = [600,370];\n        tipos[88]  = [622,155];\n        tipos[90]  = [288,250];\n        tipos[91]  = [635,237];\n        tipos[92]  = [560,100];\n        tipos[93]  = [620,235];\n        tipos[100] = [160, numads * 93.5];\n        tipos[101] = [600,90];\n        tipos[102] = [728,90];\n        tipos[103] = [300,250];\n        tipos[104] = [310,290];\n        tipos[105] = [300,50];\n\n        aFormat280_610 = [66];\n        aFormat202_581 = [67];\n        aFormat276_940 = [68];\n        aFormat300_600 = [69,77,78,79,80,81,82,83,89];\n\n        var strId = \"\"+formatId;\n        strId = (strId.indexOf(\"_\")>-1) ? strId.split(\"_\")[0] : strId;\n\n        if(UOLAF.inArray(strId, aFormat280_610)) {\n            height = 280;\n            width = 610;\n        }\n        else if(UOLAF.inArray(strId, aFormat276_940)) {\n            height = 276;\n            width = 940;\n        }\n        else if(UOLAF.inArray(strId, aFormat202_581)) {\n            height = 202;\n            width = 584;\n        }\n        else if(UOLAF.inArray(strId, aFormat300_600)) {\n            height = 600;\n            width  = 300;\n        }else {\n            height = tipos[Number(strId)][1];\n            width  = tipos[Number(strId)][0];\n        }\n\n        if(typeof afXAdvertise != \"undefined\" && typeof afYAdvertise != \"undefined\"){\n            htmlUol += \'height=\"\'+ (parseInt(afYAdvertise) + 2) +\'\" width=\"\'+ (parseInt(afXAdvertise) + 2) +\'\"><\/iframe>\';\n        } else {\n            htmlUol += \'height=\"\'+height+\'\" width=\"\'+width+\'\"><\/iframe>\';\n        }\n\n        if(typeof blank != \"undefined\" && blank == 1) blank = 0;\n\n        return htmlUol;\n    };\n\n    UOLAF.createAdsIframe = function(htmlUol){\n      try{\n          document.write(htmlUol);\n          UOLAF.elements = document.querySelectorAll(\".iframe_uolcliques\");\n          UOLAF.visibleTime = new Array(UOLAF.elements.length);\n          UOLAF.visibleAds = false;\n      }catch(e){\n          if(window.console){\n              console.warn(\"Nao foi possivel escrever o iframe\");\n          }\n      }\n    }\n\n    UOLAF.trim = function() {\n        if(typeof String.prototype.trim !== \'function\') {\n            String.prototype.trim = function() {\n                return this.replace(\/^\\s+|\\s+$\/g, \'\');\n            };\n        }\n    };\n\n    UOLAF.inArray = function(idElement, aElements) {\n        var result = false;\n        for(x = 0; x < aElements.length; x++) {\n            if(aElements[x] == idElement) {\n                result = true;\n                break;\n            }\n        }\n        return result;\n    };\n\n    UOLAF.removeAllParameters =  function(url){\n        var newUrl = url.split(\'?\')[0];\n        return encodeURIComponent(newUrl);\n    };\n\n    UOLAF.isInSafeFrame = function(){\n        var isInSafeFrame = false;\n        try{\n            isInSafeFrame = typeof $sf != \'undefined\' && typeof $sf.ext.status == \'function\';\n        }finally{\n            return isInSafeFrame;\n        }\n    };\n\n    UOLAF.resolveURLReferer = function(){\n        var urlReferer = document.location.href;\n        if(UOLAF.isInSafeFrame()){\n            urlReferer = document.referrer;\n        }\n        return UOLAF.removeAllParameters(urlReferer);\n    };\n\n    UOLAF.getNumpage1 = function(){\n        if(sessionStorage){\n            var actualPage = sessionStorage.getItem(\'numpage1\');\n            if(actualPage !== null){\n                return sessionStorage.getItem(\"numpage1\");\n            }else{\n                return 0;\n            }\n        }else{\n            if(window.console){\n                console.warn(\"Nao existe o metodo Session Storage\");\n            }\n        }\n    };\n\n    UOLAF.validateSuppliers = function(supplier) {\n        if( codDisplaySuppliers.search(supplier) != -1 ){\n            return true;\n        }\n        return false;\n    };\n\n    UOLAF.getParameter = function (url) {\n        var queryString = url.split(\'?\')[1];\n        var paramValue = queryString.split(\'id=\')[1];\n        return paramValue;\n    };\n\n    UOLAF.initDFP = function() {\n        UOLAF.uolAdsData = [];\n        function SigaSessionStorageItem(key, initialValue) {\n            var $private = {};\n            var $protected = this;\n            var $public = $protected.constructor.prototype;\n\n            $private.key = key;    \n\n            $public.getValue = function () {\n                try {\n                    if(sessionStorage){\n                        return sessionStorage.getItem($private.key);\n                    }else{\n                        if(window.console){\n                            console.warn(\"Nao existe o metodo Session Storage\");\n                        }\n                    }\n                } catch (exception) {\n                    if(window.console) {\n                        console.warn(\"[UOLPD] \" + exception);\n                    }\n                }\n            };\n\n            $public.setValue = function (value) {\n                try {\n                    if(sessionStorage){\n                        sessionStorage.setItem($private.key, value);\n                    }else{\n                        if(window.console){\n                            console.warn(\"Nao existe o metodo Session Storage\");\n                        }\n                    }\n                } catch (exception) {\n                    if(window.console) {\n                        console.warn(\"[UOLPD] \" + exception);\n                    }\n                }\n            };\n\n            $public.removeValue = function (value) {\n                try {\n                    if(sessionStorage) {\n                        sessionStorage.removeItem(value);\n                    }\n                } catch (exception) {\n                    if(window.console) {\n                        console.warn(\"[UOLPD] \" + exception);\n                    }\n                }\n            }\n\n        }\n\n        function SigaURL(url) {\n\n            var sigaURL = {host:\'\',pathname:\'\',fullpathname:\'\'};\n            var tempUrl;\n\n            if(typeof (URL) == \'function\'){\n                tempUrl = new URL(url);\n                sigaURL.host = tempUrl.host;\n                sigaURL.pathname = tempUrl.pathname;\n                sigaURL.fullpathname = sigaURL.host + sigaURL.pathname;\n            }else{\n                tempUrl = document.createElement(\'a\');\n                tempUrl.href = url;\n                sigaURL.host = tempUrl.host;\n                sigaURL.pathname = \'\/\' + tempUrl.pathname;\n                sigaURL.fullpathname = sigaURL.host + sigaURL.pathname;\n            }\n\n            return sigaURL;\n\n        }\n        function ConfigParamatersAff() {\n\n            var $private = {};\n            var $public = this;\n            var obj ={};\n\n            $public.getCAF = function () {\n                return typeof obj.coddisplaysupplier != \'undefined\' ? obj.coddisplaysupplier : \'\';\n            };\n\n            $public.getFormatId = function () {\n                return typeof obj.formatId != \'undefined\' ? obj.formatId : \'\';\n            };\n\n            $public.getLabel = function () {\n                return typeof obj.deslabel != \'undefined\' ? obj.deslabel : \'\';\n            };\n\n            $public.getTitleColor = function () {\n                return typeof obj.titleColor != \'undefined\' ? obj.titleColor : \'\';\n            };\n\n            $public.getDescrColor = function () {\n                return typeof obj.descrColor != \'undefined\' ? obj.descrColor : \'\';\n            };\n\n            $public.getUrlColor = function () {\n                return typeof obj.urlColor != \'undefined\' ? obj.urlColor : \'\';\n            };\n\n            $public.getBgColor = function () {\n                return typeof obj.bgColor != \'undefined\' ? obj.bgColor : \'\';\n            };\n            \n            $public.getBorderColor = function () {\n                return typeof obj.borderColor != \'undefined\' ? obj.borderColor : \'\';\n            };\n\n            $public.getParamExcludeTM = function () {\n                return typeof obj.excludeTM != \'undefined\' ? obj.excludeTM : false;\n            };\n\n            $public.getUrlReferer = function () {\n                var urlReferer = document.location.href;\n                if($private.isInSafeFrame()){\n                    urlReferer = document.referrer;\n                }\n\n                \/\/ Para funcionar na DYNAD\n                if (document.location.host.indexOf(\"dynad.net\") > -1) {\n                    urlReferer = window.defaultAffUrl;\n                }\n\n                return $private.removeAllParameters(urlReferer);\n            };\n            \n            $public.setParams = function (paramsObj) {\n                if(!obj.hasOwnProperty(\'coddisplaysupplier\')) {\n                        var paramsNames = [\'coddisplaysupplier\',\'excludeTM\' , \'formatId\', \'deslabel\', \'titleColor\', \'descrColor\',\n                        \'urlColor\', \'bgColor\', \'borderColor\', \'urlAffiliatedReferer\', \'externalUrl\'];\n                    for(var i = 0; i < paramsNames.length; i++){\n                        if(paramsObj[paramsNames[i]] != \'\'){\n                            obj[paramsNames[i]] = paramsObj[paramsNames[i]];\n                        }else{\n                            if (eval(\"typeof \" + paramsNames[i]) != \'undefined\') {\n                                obj[paramsNames[i]] = eval(paramsNames[i]);\n                            }\n                        }\n                    }\n                }\n                return obj;\n            };\n\n            $private.isInSafeFrame = function () {\n                var isInSafeFrame = false;\n                try{\n                    isInSafeFrame = typeof $sf != \'undefined\' && typeof $sf.ext.status == \'function\';\n                }finally{\n                    return isInSafeFrame;\n                }\n            };\n\n            $private.removeAllParameters = function (url) {\n                var newUrl = url.split(\'?\')[0];\n                return newUrl;\n            };\n        }\n        var ConfigParamatersAffSingleton = (function () {\n            var instance;\n         \n            function createInstance() {\n                return new ConfigParamatersAff();\n            }\n         \n            return {\n                getInstance: function () {\n                    if (!instance) {\n                        instance = createInstance();\n                    }\n                    return instance;\n                }\n            };\n        })();\n        function DfpLocalStorage() {\n\n            var $protected = this;\n            var $public = $protected.constructor.prototype;\n\n            $public.getValue = function (key) {\n                try {\n                    if(localStorage){\n                        return localStorage.getItem(key);\n                    }else{\n                        if(window.console){\n                            console.warn(\"Nao existe o metodo Local Storage\");\n                        }\n                    }\n                } catch (exception) {\n                    if(window.console) {\n                        console.warn(\"[UOLPD] \" + exception);\n                    }\n                }\n            };\n\n            $public.setValue = function (key, value) {\n                try {\n                    if(localStorage){\n                        localStorage.setItem(key, value);\n                    }else{\n                        if(window.console){\n                            console.warn(\"Nao existe o metodo Local Storage\");\n                        }\n                    }\n                } catch (exception) {\n                    if(window.console) {\n                        console.warn(\"[UOLPD] \" + exception);\n                    }\n                }\n            };\n\n            $public.remove = function (key) {\n                try {\n                    if(localStorage) {\n                        localStorage.removeItem(key);\n                    }\n                } catch (exception) {\n                    if(window.console) {\n                        console.warn(\"[UOLPD] \" + exception);\n                    }\n                }\n            }\n\n        }\n\n        function SizeFormatId() {\n\n            var $private = {};\n            var $public = this;\n            \n            $private.defineSize = function() {\n\n                var format = [{\n                    \"formatId\": 1,\n                    \"sizeBox\": \"728px|90px\",\n                    \"sizeAd\": \"362px|90px\",\n                    \"numads\": 2,\n                    \"style\": \"float: left; box-sizing: border-box;\",\n                    \"border\": \"right\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 2,\n                    \"sizeBox\": \"468px|60px\",\n                    \"sizeAd\": \"468px|60px\",\n                    \"numads\": 1,\n                    \"style\": \"\",\n                    \"border\": \"\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 3,\n                    \"sizeBox\": \"125px|125px\",\n                    \"sizeAd\": \"125px|125px\",\n                    \"numads\": 1,\n                    \"style\": \"\",\n                    \"border\": \"\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 4,\n                    \"sizeBox\": \"234px|60px\",\n                    \"sizeAd\": \"234px|60px\",\n                    \"numads\": 1,\n                    \"style\": \"\",\n                    \"border\": \"\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 5,\n                    \"sizeBox\": \"120px|600px\",\n                    \"sizeAd\": \"120px|300px\",\n                    \"numads\": 2,\n                    \"style\": \"\",\n                    \"border\": \"bottom\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 6,\n                    \"sizeBox\": \"160px|600px\",\n                    \"sizeAd\": \"160px|300px\",\n                    \"numads\": 2,\n                    \"style\": \"\",\n                    \"border\": \"bottom\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 7,\n                    \"sizeBox\": \"180px|150px\",\n                    \"sizeAd\": \"180px|150px\",\n                    \"numads\": 1,\n                    \"style\": \"\",\n                    \"border\": \"\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 8,\n                    \"sizeBox\": \"120px|240px\",\n                    \"sizeAd\": \"120px|240px\",\n                    \"numads\": 1,\n                    \"style\": \"\",\n                    \"border\": \"\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 9,\n                    \"sizeBox\": \"300px|250px\",\n                    \"sizeAd\": \"300px|125px\",\n                    \"numads\": 2,\n                    \"style\": \"\",\n                    \"border\": \"bottom\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 10,\n                    \"sizeBox\": \"250px|250px\",\n                    \"sizeAd\": \"250px|250px\",\n                    \"numads\": 1,\n                    \"style\": \"\",\n                    \"border\": \"\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 11,\n                    \"sizeBox\": \"336px|280px\",\n                    \"sizeAd\": \"336px|140px\",\n                    \"numads\": 2,\n                    \"style\": \"\",\n                    \"border\": \"bottom\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 66,\n                    \"sizeBox\": \"610px|280px\",\n                    \"sizeAd\": \"610px|93px\",\n                    \"numads\": 3,\n                    \"style\": \"\",\n                    \"border\": \"bottom\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 67,\n                    \"sizeBox\": \"582px|200px\",\n                    \"sizeAd\": \"582px|100px\",\n                    \"numads\": 2,\n                    \"style\": \"\",\n                    \"border\": \"bottom\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 68,\n                    \"sizeBox\": \"940px|276px\",\n                    \"sizeAd\": \"400px|90px\",\n                    \"numads\": 4,\n                    \"style\": \"float: left;\",\n                    \"border\": \"\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 79,\n                    \"sizeBox\": \"300px|600px\",\n                    \"sizeAd\": \"300px|120px\",\n                    \"numads\": 5,\n                    \"style\": \"\",\n                    \"border\": \"bottom\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 90,\n                    \"sizeBox\": \"288px|250px\",\n                    \"sizeAd\": \"288px|125px\",\n                    \"numads\": 2,\n                    \"style\": \"\",\n                    \"border\": \"bottom\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 91,\n                    \"sizeBox\": \"635px|237px\",\n                    \"sizeAd\": \"635px|79px\",\n                    \"numads\": 3,\n                    \"style\": \"\",\n                    \"border\": \"bottom\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 93,\n                    \"sizeBox\": \"618px|233px\",\n                    \"sizeAd\": \"618px|78px\",\n                    \"numads\": 3,\n                    \"style\": \"\",\n                    \"border\": \"bottom\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 94,\n                    \"sizeBox\": \"100%|50px\",\n                    \"sizeAd\": \"100%|25px\",\n                    \"numads\": 2,\n                    \"style\": \"\",\n                    \"border\": \"bottom\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 96,\n                    \"sizeBox\": \"940px|275px\",\n                    \"sizeAd\": \"435px|93px\",\n                    \"numads\": 4,\n                    \"style\": \"float: left;\",\n                    \"border\": \"\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 97,\n                    \"sizeBox\": \"1180px|275px\",\n                    \"sizeAd\": \"540px|93px\",\n                    \"numads\": 4,\n                    \"style\": \"float: left;\",\n                    \"border\": \"bottom\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 98,\n                    \"sizeBox\": \"620px|214px\",\n                    \"sizeAd\": \"620px|71px\",\n                    \"numads\": 3,\n                    \"border\": \"bottom\",\n                    \"style\": \"\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 99,\n                    \"sizeBox\": \"308px|1015px\",\n                    \"sizeAd\": \"308px|112px\",\n                    \"numads\": 9,\n                    \"border\": \"bottom\",\n                    \"style\": \"\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 100,\n                    \"sizeBox\": \"100%|211px\",\n                    \"sizeAd\": \"100%|93px\",\n                    \"numads\": 2,\n                    \"style\": \"\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 101,\n                    \"sizeBox\": \"600px|90px\",\n                    \"sizeAd\": \"600px|90px\",\n                    \"numads\": 1,\n                    \"style\": \"\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 102,\n                    \"sizeBox\": \"728px|90px\",\n                    \"sizeAd\": \"728px|90px\",\n                    \"numads\": 1,\n                    \"style\": \"\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 103,\n                    \"sizeBox\": \"300px|250px\",\n                    \"sizeAd\": \"300px|250px\",\n                    \"numads\": 1,\n                    \"style\": \"\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 105,\n                    \"sizeBox\": \"300px|50px\",\n                    \"sizeAd\": \"300px|50px\",\n                    \"numads\": 1,\n                    \"style\": \"\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 106,\n                    \"sizeBox\": \"100%|350px\",\n                    \"sizeAd\": \"130px|270px\",\n                    \"numads\": 7,\n                    \"style\": \"margin: 0 1.5%; margin-top: 32px;\",\n                    \"styleBlock\" : \"max-width: 1170px;\"\n                }, {\n                    \"formatId\": 107,\n                    \"sizeBox\": \"100%|350px\",\n                    \"sizeAd\": \"335px|98px\",\n                    \"numads\": 6,\n                    \"style\": \"float: left; border-bottom: 1px solid #f2f2f2; margin: 31px 20px 0 27px;\",\n                    \"styleBlock\" : \"max-width: 1170px;\"\n                }, {\n                    \"formatId\": 108,\n                    \"sizeBox\": \"288px|250px\",\n                    \"sizeAd\": \"110px|200px\",\n                    \"numads\": 2,\n                    \"style\": \"margin: 0px 44px 0px 12px; float: left;  margin-top: 32px;\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 109,\n                    \"sizeBox\": \"100%|320px\",\n                    \"sizeAd\": \"110px|268px\",\n                    \"numads\": 6,\n                    \"style\": \"margin: 13px 2% 0; display: inline-block;\",\n                    \"styleBlock\" : \"max-width: 944px;\"\n                }, {\n                    \"formatId\": 110,\n                    \"sizeBox\": \"600px|250px\",\n                    \"sizeAd\": \"110px|195px\",\n                    \"numads\": 4,\n                    \"style\": \"margin: 0 38px 0 2px; float: left;\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 111,\n                    \"sizeBox\": \"463px|362px\",\n                    \"sizeAd\": \"130px|252px\",\n                    \"numads\": 3,\n                    \"style\": \"padding: 0 2px; margin: 0 8px; float: left;\",\n                    \"styleBlock\" : \"\"\n                }, {\n                    \"formatId\": 112,\n                    \"sizeBox\": \"970px|250px\",\n                    \"sizeAd\": \"130px|210px\",\n                    \"numads\": 7,\n                    \"style\": \"float: left;\",\n                    \"styleBlock\" : \"\"\n                },{\n                    \"formatId\": 115,\n                    \"sizeBox\": \"630px|275px\",\n                    \"sizeAd\": \"125px|235px\",\n                    \"numads\": 4,\n                    \"style\": \"float: left;\",\n                    \"styleBlock\" : \"\"\n                }];\n\n                return format;\n            };\n\n            $private.mapConvertFormatId = function(id) {\n                if(id == 77 || id == 78 || id == 80 || id == 81 || id == 89) {\n                    return 79;\n                } else if(id == 84) {\n                    return 9;\n                }\n\n                return id;\n            };\n            \n            $public.getFormat = function (formatId) {\n                var formats = $private.defineSize();\n\n                formatId = $private.mapConvertFormatId(formatId);\n                \n                for(var i = 0; i < formats.length; i++) {\n                    var objFormat = formats[i];\n\n                    if(formatId == objFormat.formatId) {\n                        return objFormat;\n                    }\n                };\n            }\n        }\n        function CreateElement() {\n            var $private = {};\n            var $public = this;\n\n            $private.configParametersAff = ConfigParamatersAffSingleton.getInstance();\n            $private.borderColorDefault = $private.configParametersAff.getBorderColor() != \'\' ? $private.configParametersAff.getBorderColor() : \'CCC\';\n\n            $public.createDivBloco = function (objFormat) {\n                var idBloco = window.UOLAF.idBloco != null && window.UOLAF.idBloco != \'\' ? window.UOLAF.idBloco : 0;\n                var boxSize = objFormat.sizeBox.split(\"|\");\n                var style = \'\';\n                var styleBlock = objFormat.styleBlock;\n                var backgroundColor = $private.configParametersAff.getBgColor() != \'\' ? $private.configParametersAff.getBgColor() : \'ffffff\';\n                idBloco++;\n                window.UOLAF.idBloco = idBloco;\n\n                var div = document.createElement(\'div\');\n                div.id = \'bloco-\'+idBloco;\n                div.className = \"formato-\" + objFormat.formatId;\n                div.align = \"center\";\n                style += \"width:\" + boxSize[0] + \";\";\n                style += \"height:\" + boxSize[1] + \";\";\n                style += \"overflow: hidden;\";\n                style += \"background: #\" + backgroundColor + \";\";\n                style += styleBlock;\n\n\n                if(objFormat.formatId == 96 || objFormat.formatId == 97) {\n                    style += \"border:4px solid #E6E6E6\";\n                }else if(objFormat.formatId !== 100) {\n                    style += \"border:1px solid #\" + $private.borderColorDefault;\n                }\n\n                div.setAttribute(\"style\", style);\n\n                $private.formatHeaders(objFormat.formatId, div);\n                $private.formatFooter(objFormat.formatId, div);\n\n                return {div: div, id: div.id};\n            };\n\n            $public.createDiv = function(idBloco, position, objFormat) {\n                var formatIdBloco = objFormat.formatId;\n                var boxSizeAd = objFormat.sizeAd.split(\"|\");\n                var boxStyle = objFormat.style;\n                var border = objFormat.border;\n                var divDFP = document.createElement(\'div\');\n                divDFP.className = \"ads\";\n                var style = \'\';\n\n                style += \"width:\" + boxSizeAd[0] + \";\";\n                style += \"height:\" + boxSizeAd[1] + \";\";\n                style += boxStyle;\n                divDFP.setAttribute(\"style\", style);\n\n                if (position == 1 && border == \"right\") {\n                    divDFP.style.borderRight = \"1px solid #\" + $private.borderColorDefault;\n                }\n\n                if (border == \"bottom\") {\n                    divDFP.style.borderBottom = \"1px solid #\" + $private.borderColorDefault;\n                }\n\n                blocoId = formatIdBloco.toString();\n                if(blocoId.length == 1) {\n                    var formatSize = \"0000\"+formatIdBloco;\n\n                }else if(blocoId.length == 2) {\n                    var formatSize = \"000\"+formatIdBloco;\n\n                }else if(blocoId.length == 3) {\n                    var formatSize = \"00\"+formatIdBloco;\n\n                }else if(blocoId.length == 4) {\n                    var formatSize = \"0\"+formatIdBloco;\n\n                }else{\n                    var formatSize = formatIdBloco;\n                }\n\n                divDFP.id = \'banner-native-oferta-\'+formatSize+\'-\'+idBloco+\'-ad-\'+position;\n                $public.addUolAdsData(divDFP.id, idBloco, position, $private.configParametersAff.getFormatId());\n                return divDFP;\n            };\n\n            $private.formatHeaders = function(id, divBloco) {\n                switch (id) {\n                    case 91:\n                        $private.appendDivHeader(id, divBloco, \"height: 18px;\");\n                        break;\n                    case 93:\n                        $private.appendDivHeader(id, divBloco, \"height: 18px;\");\n                        break;\n                    case 96:\n                        $private.appendDivHeader(id, divBloco, \"height: 40px; padding-bottom: 5px; text-align: left;\");\n                        break;\n                    case 97:\n                        $private.appendDivHeader(id, divBloco, \"height: 40px; padding-bottom: 5px; text-align: left;\");\n                        break;\n                    case 100:\n                        $private.appendDivHeader(id, divBloco, \"height: 20px; text-align: left;\");\n                        break;\n                    case 106:\n                        $private.appendDivHeader(id, divBloco, \"height: 47px; text-align: left;\");\n                        break;\n                    case 107:\n                        $private.appendDivHeader(id, divBloco, \"height: 50px; text-align: left;\");\n                        break;\n                    case 108:\n                        $private.appendDivHeader(id, divBloco, \"height: 45px; text-align: left;\");\n                        break;\n                    case 109:\n                        $private.appendDivHeader(id, divBloco, \"height: 42px; text-align: left;\");\n                        break;\n                    case 110:\n                        $private.appendDivHeader(id, divBloco, \"height: 55px; text-align: left;\");\n                        break;\n                    case 111:\n                        $private.appendDivHeader(id, divBloco, \"height: 65px; text-align: left;\");\n                        break;\n                    case 112:\n                        $private.appendDivHeader(id, divBloco, \"height: 32px; text-align: center;\");\n                        break;\n                    case 115:\n                        $private.appendDivHeader(id, divBloco, \"height: 17px; text-align: right; width: calc(100% - 60px) !important;\");\n                        break;  \n                }\n            };\n\n            $private.formatFooter = function(id, divBloco) {\n                switch (id) {   \n                    case 68:\n                        $private.appendDivFooter(id, divBloco, \"height: 0px;\");\n                        break;\n                    case 91:\n                        $private.appendDivFooter(id, divBloco, \"height: 18px;\");\n                        break;\n                    case 93:\n                        $private.appendDivFooter(id, divBloco, \"height: 18px;\");\n                        break;\n                }\n            };\n\n            $private.appendDivHeader = function(id, divBloco, style) {\n                var divHeader = document.createElement(\"div\");\n                divHeader.setAttribute(\"style\", style);\n\n                if(id == 91 || id == 93) {\n                    divHeader.className = \"AdsTopRight\";\n                    divHeader.appendChild($private.createLinkAnuncieAqui(id));\n                }else if(id == 100) {\n                    divHeader.id = \"formato-\"+id;\n                    divHeader.className = \"header home-mobile\";\n                    var corOfertas =  $private.configParametersAff.getTitleColor() == \'\' ? \'\' : (\'color:#\' + $private.configParametersAff.getTitleColor());\n                    divHeader.appendChild($private.createDivOfertasParaVoce(corOfertas));\n                }else if(id == 108 || id == 110 || id == 112 || id == 115) {\n                    divHeader.id = \"uolCliques\";\n                    divHeader.appendChild($private.createDivOfertasParaVoce(\'\'));\n                }else if(id == 96 || id == 97 || id == 106 || id == 107 || id == 109 || id == 111) {\n                    divHeader.id = \"uolCliques\";\n                    divHeader.className = \"formato-\"+id;\n                    divHeader.appendChild($private.createDivOfertasParaVoce(\'\'));\n                    divHeader.appendChild($private.createLinkAnuncieAqui(id));\n                }\n\n                divBloco.appendChild(divHeader);\n            };\n\n            $private.appendDivFooter = function(id, divBloco, style) {\n                var divFooter = document.createElement(\"div\");\n                divFooter.setAttribute(\"style\", style);\n                divFooter.className = \"AdsUOLRight\";\n\n                if(id == 68) {\n                    divFooter.className = \"AdsBottomRight\";\n                    divFooter.appendChild($private.createLinkAnuncieAqui(id));\n                }else if(id == 91 || id == 93) {\n                    var span = document.createElement(\"span\");\n                    span.className = \"textUOL\";\n                    span.textContent = \"Ofertas para voc\\u00ea\";\n                    divFooter.appendChild(span);\n                }\n\n                divBloco.appendChild(divFooter);\n            };\n\n            $private.createDivOfertasParaVoce = function(corOfertas) {\n\n                var header = document.createElement(\"header\");\n                var span = document.createElement(\"span\");\n                span.className = \"textUOL\";\n                span.textContent = \"ofertas para voc\\u00ea\";\n                span.setAttribute(\"style\", corOfertas);\n\n                var spanIcon = document.createElement(\"span\");\n                spanIcon.className = \"iconUOL\";\n\n                span.appendChild(spanIcon);\n                header.appendChild(span);\n\n                return header;\n            };\n\n            $private.createLinkAnuncieAqui = function(id) {\n                var link = document.createElement(\"a\");\n                link.id = \"link-anuncie\";\n                link.className = \"link-anuncie-color formato-\"+id;\n                link.target = \"_blank\";\n                link.href = \"http:\/\/ads.uol.com.br\";\n                link.textContent = \"Anuncie aqui\";\n\n                return link;\n            };\n\n            $public.addUolAdsData = function(id, idBloco, pos, formatId){\n                UOLAF.uolAdsData.push(\n                    {\n                        \'id\': id,\n                        \'domain\': \'\',\n                        \'idtUrl\': \'\',\n                        \'pos\': pos,\n                        \'label\': $private.configParametersAff.getLabel(),\n                        \'group\': null,\n                        \'customTargetings\': {\n                            \'cssTitleColor\': $private.configParametersAff.getTitleColor() != \'\' ? $private.configParametersAff.getTitleColor() : \'cccccc\',\n                            \'cssDescrColor\': $private.configParametersAff.getDescrColor() != \'\' ? $private.configParametersAff.getDescrColor() : \'cccccc\',\n                            \'cssUrlColor\': $private.configParametersAff.getUrlColor() != \'\' ? $private.configParametersAff.getUrlColor() : \'cccccc\',\n                            \'cssBgColor\': $private.configParametersAff.getBgColor() != \'\' ? $private.configParametersAff.getBgColor() : \'ffffff\',\n                            \'modelo\': formatId,\n                            \'idBloco\':idBloco.replace(\'bloco-\', \'\')\n                        }\n                    }\n                );\n            };\n\n            $public.createScriptAsync = function (url) {\n                var scriptAsync = document.createElement(\'script\');\n                \n                scriptAsync.id = \"tm-tag-adrequisitor\";\n                scriptAsync.async = true;\n                scriptAsync.src =  url;\n                \n                return scriptAsync;\n            };\n\n            $public.createLinkCss = function(url) {\n                var link = document.createElement(\"link\");\n                link.rel = \"stylesheet\";\n                link.type = \"text\/css\";\n                link.href = url;\n                link.id = \"css-uolCliques\";\n\n                return link;\n            };\n        }\n        function CreateNameSpaceTM() {\n\n            var $public = this;\n\n            $public.createNameSpace = function() {\n                window.uolads = window.uolads || [];\n            };\n        }\n        \/**\n         * Created by maz_tsantos on 06\/06\/16.\n         *\/\n\n        function AddUolAds(){\n\n            var $public = this;\n            $public.addUolAds = function (values) {\n                for (var i = 0; i < values.length; i++){\n                    window.uolads.push(\n                        {\n                            \'id\': values[i].id,\n                            \'adUnit\': {\n                                \'network\': \'8804\',\n                                \'site\': \'\',\n                                \'chan\': values[i].domain,\n                                \'subchan\': values[i].idtUrl.toString()\n                            },\n                            \'pos\': values[i].pos,\n                            \'label\': values[i].pos + \"-\" + values[i].label,\n                            \'group\': values[i].group,\n                            \'customTargetings\': {\n                                \'cssTitleColor\': values[i].customTargetings.cssTitleColor,\n                                \'cssDescrColor\': values[i].customTargetings.cssDescrColor,\n                                \'cssUrlColor\': values[i].customTargetings.cssUrlColor,\n                                \'cssBgColor\': values[i].customTargetings.cssBgColor,\n                                \'modelo\': values[i].customTargetings.modelo,\n                                \'adBlock\': values[i].customTargetings.idBloco\n                            },\n                            \'campaignuol\':values[i].contentType == \'CA\' ? 3 : 1\n                        }\n                    )\n                }\n            }\n\n        }\n        \/**\n         * Created by maz_tsantos on 03\/06\/16.\n         *\/\n\n        function AjaxRequest(){\n\n            var $public = this;\n            var localStorage = new DfpLocalStorage();\n            var localKey = \'\';\n            var valorCAF = null;\n            var st;\n            var codList = [\'408\',\'500\',\'503\',\'504\'];\n            var configParametersAff = ConfigParamatersAffSingleton.getInstance();\n            var tempoConsulta = 900; \/** 15 minutos **\/\n\n            $public.dataRequest = function(coddisplaysuppliertemp, values) {\n                var host = document.location.host + document.location.pathname;\n                if(host == \'adrequisitor-af.lp.uol.com.br\/ads.html\') {\n                    var urlRef = SigaURL(document.referrer);\n                    localKey = urlRef.host + urlRef.pathname + coddisplaysuppliertemp + configParametersAff.getLabel();\n                }else{\n                    localKey = document.location.pathname + coddisplaysuppliertemp + configParametersAff.getLabel();\n                }\n                valorCAF = JSON.parse(localStorage.getValue(localKey));\n\n                if (valorCAF == null) {\n                    $public.infoRequest(coddisplaysuppliertemp, values);\n                } else {\n                    st = setInterval($public.localStorageVerify, 200, coddisplaysuppliertemp, values);\n                }\n            };\n\n            $public.infoRequest = function(coddisplaysuppliertemp, values) {\n\n                var data1;\n                var retornoPublisher = {\n                    \"codRetorno\": \'\',\n                    \"tempo\": \'\',\n                    \"retorno\": []\n                };\n\n                localStorage.setValue(localKey, JSON.stringify(retornoPublisher));\n\n                var http;\n                if (window.XMLHttpRequest) {\n                    \/** code for IE7+, Firefox, Chrome, Opera, Safari **\/\n                    http = new XMLHttpRequest();\n                }\n                else {\n                    \/**code for IE6, IE5 **\/\n                    http = new ActiveXObject(\"Microsoft.XMLHTTP\");\n                }\n                var labelVerify = configParametersAff.getLabel() == \'\' ? \'\' : (\'&label=\' + configParametersAff.getLabel());\n                var url = \"\/\/publisher.cliques.uol.com.br\/affiliatedData?caf=\" + coddisplaysuppliertemp + \"&url=\" + configParametersAff.getUrlReferer() + labelVerify;\n                http.open(\"GET\", url, true);\n                http.onreadystatechange = function () {\n                    if(http.readyState == 4) {\n                        if (http.status == 200) {\n                            var data2 = new Date();\n                            var response = JSON.parse(http.responseText);\n                            if (values != null) {\n                                for (var i = 0; i < values.length; i++) {\n                                    values[i].contentType = response.contentType;\n                                    values[i].domain = response.domain;\n                                    values[i].idtUrl = response.idtUrl;\n                                    values[i].label = response.label;\n                                    values[i].group = response.categories.split(\",\") == \"\" ? null : response.categories;\n                                }\n                                var addUolAds = new AddUolAds();\n                                addUolAds.addUolAds(values);\n\n                                \/** Armazenar valores no localStorage **\/\n                                retornoPublisher.codRetorno = http.status;\n                                retornoPublisher.tempo = new Date().getTime();\n                                var retorno = {\n                                    \"contentType\": response.contentType,\n                                    \"domain\": response.domain,\n                                    \"idtUrl\": response.idtUrl,\n                                    \"label\": response.label,\n                                    \"group\": response.categories.split(\",\") == \"\" ? null : response.categories\n                                };\n                                retornoPublisher.retorno = retorno;\n                                localStorage.setValue(localKey, JSON.stringify(retornoPublisher));\n                            }\n\n                        } else {\n                            retornoPublisher.codRetorno = http.status;\n                            retornoPublisher.tempo = new Date().getTime();\n                            localStorage.setValue(localKey, JSON.stringify(retornoPublisher));\n                        }\n                    }\n                };\n                http.send();\n                data1 = new Date();\n            };\n\n            $public.localStorageVerify = function (coddisplaysuppliertemp, values) {\n                valorCAF = JSON.parse(localStorage.getValue(localKey));\n                if(valorCAF !== null) {\n                    if(typeof valorCAF.retorno.domain != \"undefined\"){\n                        var horaAtual = new Date().getTime();\n                        var difTempo = (Math.abs(horaAtual - valorCAF.tempo)) \/ 1000;\n                        if(difTempo <= tempoConsulta) {\n                            if (values != null) {\n                                for (var i = 0; i < values.length; i++) {\n                                    values[i].contentType = valorCAF.retorno.contentType;\n                                    values[i].domain = valorCAF.retorno.domain;\n                                    values[i].idtUrl = valorCAF.retorno.idtUrl;\n                                    values[i].label = valorCAF.retorno.label;\n                                    values[i].group = valorCAF.retorno.group;\n                                }\n                                var addUolAds = new AddUolAds();\n                                addUolAds.addUolAds(values);\n                            }\n                            clearInterval(st);\n                        }else{\n                            localStorage.remove(localKey);\n                            $public.infoRequest(coddisplaysuppliertemp, values);\n                            clearInterval(st);\n                        }\n                    } else if(typeof valorCAF.codRetorno != \"undefined\" && valorCAF.codRetorno != 200){\n                        if(UOLAF.inArray(valorCAF.codRetorno, codList)){\n                            $public.infoRequest(coddisplaysuppliertemp, values);\n                        }else {\n                            var horaAtual = new Date().getTime();\n                            var difTempo = (Math.abs(horaAtual - valorCAF.tempo)) \/ 1000;\n                            if (difTempo < tempoConsulta) {\n                                clearInterval(st);\n                            } else {\n                                $public.infoRequest(coddisplaysuppliertemp, values);\n                            }\n                        }\n                    }\n                } else {\n                    $public.infoRequest(coddisplaysuppliertemp, values);\n                    clearInterval(st);\n                }\n            };\n\n        }\n        function InitTM() {\n            \n            var $private = {};\n            var $public = this;\n\n            $private.nsTM = new CreateNameSpaceTM();\n            $private.createElem = new CreateElement();\n            $private.dataRequest = new AjaxRequest();\n            $private.addUolAds = new AddUolAds();\n            $private.configParametersAff = ConfigParamatersAffSingleton.getInstance();\n            $private.cafList= [\'51eed576aff54be8b1311d90735f36a6\',\'23a84821cc6e4a4eb37cd7ee556f43cf\'];\/\/UOL,BOL\n\n            var format = new SizeFormatId();\n\n            $public.initTM = function () {\n                $private.nsTM.createNameSpace();\n                $public.appendTM();\n                $private.appendCssFile();\n                $private.appendDiv();\n\n                if(document.getElementById(\"tm-tag-adrequisitor\")) {\n                    $public.executeAjax();\n                }\n\n                $private.checkIsPageLoad();\n            };\n\n            $public.executeAjax = function () {\n                $private.dataRequest.dataRequest($private.configParametersAff.getCAF(), UOLAF.uolAdsData);\n            };\n\n            $public.appendTM = function () {\n                if(!document.getElementById(\"tm-tag-adrequisitor\")) {\n                    if (!UOLAF.inArray($private.configParametersAff.getCAF(), $private.cafList) && !$private.configParametersAff.getParamExcludeTM()) {\n                        var tmUrl = \"\/\/tm.jsuol.com.br\/uoltm.js?id=8p1jqp\";\n                        var scr = $private.createElem.createScriptAsync(tmUrl);\n                        var el = document.getElementsByTagName(\"script\")[0];\n                        el.parentNode.insertBefore(scr, el);\n                    }\n                }\n            };\n\n            $private.appendCssFile = function() {\n                if(!document.getElementById(\"css-uolCliques\")){\n                    var cssUrl = \"\/\/simg.uol.com.br\/lp\/formatos-uol-cliques.min.css?v=4\";\n                    document.body.appendChild($private.createElem.createLinkCss(cssUrl));\n                }\n            };\n\n            $private.isObject = function (obj) {\n                return obj && obj.constructor === Object;\n            };\n\n            $private.appendDiv = function() {\n\n                try {\n                    var parentNodeScript;\n\n                    if(document.currentScript) {\n                        var loadedScript = document.currentScript;\n\n                        if(loadedScript.src.search(\'uolaf.js\') != -1 || loadedScript.parentNode.id.indexOf(\"dynad\") != -1) {\n                            parentNodeScript = loadedScript.parentNode;\n                            $private.appendBlocoAndDiv(parentNodeScript);\n                        }\n                    } else {\n\n                        var divTMCodeInjector = document.getElementsByClassName(\"tm-dfp-cliques\");\n                        window.UOLAF.initCountDivTM;\n\n                        if(divTMCodeInjector.length > 0) {\n                            window.UOLAF.initCountDivTM = (window.UOLAF.initCountDivTM == undefined ? 0: window.UOLAF.initCountDivTM + 1 );\n                            $private.appendBlocoAndDiv(divTMCodeInjector[window.UOLAF.initCountDivTM]);\n                        } else {\n                            var listScript = document.body.getElementsByTagName(\'script\');\n\n                            var scriptTag = listScript[listScript.length - 1];\n                            if(scriptTag.src.search(\'uolaf.js\') != -1 || scriptTag.parentNode.id.indexOf(\"dynad\") != -1) {\n                                parentNodeScript = scriptTag.parentNode;\n                                $private.appendBlocoAndDiv(parentNodeScript);\n                            }\n                        }\n                    }\n                     if(!document.getElementById(\"tm-tag-adrequisitor\")) {\n                         var addUolAds = new AddUolAds();\n                         for(var i = 0; i < UOLAF.uolAdsData.length; i++){\n                             if(UOLAF.uolAdsData[i].label == \'\'){\n                                 UOLAF.uolAdsData[i].label = \'default@cliques\';\n                             }\n                         }\n                         addUolAds.addUolAds(UOLAF.uolAdsData);\n                     }\n                } catch (exception) {\n                    console.warn(\'[UOL CLIQUES] Nao foi possivel escrever o elemento DIV.\' + exception);\n                }\n            };\n\n            $private.appendBlocoAndDiv = function(parentNodeScript) {\n                var objFormat = format.getFormat($private.configParametersAff.getFormatId());\n                var objDiv = $private.createElem.createDivBloco(objFormat);\/\/criar bloco para cada request adrequisitor\n                parentNodeScript.appendChild(objDiv.div);\n\n                for( var i = 1; i <= objFormat.numads; i++ ) {\n                    objDiv.div.appendChild($private.createElem.createDiv(objDiv.id, i, objFormat));\n                }\n            };\n\n            $private.clearStorage = function () {\n                var listLocalStorageKeys = Object.keys(localStorage);\n                for(var i = 0; i < listLocalStorageKeys.length; i++){\n                    try{\n                        var value = localStorage.getItem(listLocalStorageKeys[i]);\n                        var time = JSON.parse(value).tempo;\n                        if (typeof time != \'undefined\') {\n                            var horaAtual = new Date().getTime();\n                            var difTempo = (Math.abs(horaAtual - time)) \/ 1000;\n                            \/** 15 minutos **\/\n                            if (difTempo > 900) {\n                                localStorage.removeItem(listLocalStorageKeys[i]);\n                            }\n                        }\n                    }catch(exception){\n\n                    }\n                }\n\n            };\n\n            $private.checkIsPageLoad = function() {\n                if(document.addEventListener) {\n                    document.addEventListener(\'DOMContentLoaded\', $private.clearStorage, false);\n                } else {\n                    document.attachEvent(\'DOMContentLoaded\', $private.clearStorage, false);\n                }\n            };\n        }\n\n        var config = ConfigParamatersAffSingleton.getInstance();\n        config.setParams(paramsObj);\n\n        var initTM = new InitTM();\n        initTM.initTM();\n    };\n    \n    UOLAF.convertShoppingToCliques = function(id) {\n       var IDS = {\n            \"12\": \"1\",\n            \"13\": \"3\",\n            \"14\": \"5\",\n            \"15\": \"6\",\n            \"16\": \"7\",\n            \"17\": \"9\",\n            \"18\": \"10\",\n            \"19\": \"11\",\n            \"20\": \"8\",\n            \"21\": \"2\",\n            \"22\": \"4\"\n        };\n\n        var formatIdConverted;\n        for(var key in IDS) {\n            if(key == id) {\n                formatIdConverted = IDS[key];\n                break;\n            }\n        }\n        return formatIdConverted;\n    };\n    UOLAF.closeIframeWithoutAds = function(event) {\n        try{\n            var urlOrigin = event.origin;\n            var pattern = \/^(http:\\\/\\\/|https:\\\/\\\/)\/;\n            var url = urlOrigin.replace(pattern, \'\/\/\');\n\n            if(url == \"\/\/adclient.siga.uol.com.br\") {\n\n                if(typeof event.data != \"object\") {\n                    var adInformation = JSON.parse(event.data);\n                    \n                    if(adInformation.ads && adInformation.ads.length === 0) {\n                        var iframeCliques = document.querySelectorAll(\".iframe_uolcliques\");\n                        var bloco = \'adBlockCount=\' + adInformation.bloco;\n\n                        for(var i = 0; i < iframeCliques.length; i++) {\n                            if (iframeCliques[i].src.search(\"formatId=104\") != -1 && iframeCliques[i].src.search(bloco) != -1) {\n                                var iframe = iframeCliques[i];\n                                iframe.parentNode.removeChild(iframe);\n                            }\n                        }\n                    }\n                    \n                    window.removeEventListener(\"message\", UOLAF.closeIframeWithoutAds, false);\n                }\n            }\n        } catch(exception) {\n            if(window.console) {\n                console.warn(\"Ocorreu o seguinte erro: \" + exception);\n            }\n        }\n    }\n\n    UOLAF.closeIframe = function (){\n\n        if(window.addEventListener) {\n            window.addEventListener(\"message\", UOLAF.closeIframeWithoutAds, false);\n        } else {\n            window.attachEvent(\"message\", UOLAF.closeIframeWithoutAds);\n        }\n    };\n\n    var loggerChance = Math.random();\n    UOLAF.initDFP();\n<\/script>');(function(reqid,type,step,containerId,placementId,siteId,campaignId,creativeId){try{try {
    if (step == 1) {
        var container = document.getElementById(containerId);
        var scripts = container.parentNode.getElementsByTagName('script');
        if (scripts.length === 0) {
            scripts = document.getElementsByTagName('script');
        }
        var found = false;
        window.formatId = '1';
        window.numads = '2';
        window.type = '1';
        for (var x = (scripts.length - 1); x >= 0; x--) {
            if (scripts[x].hasAttribute('src')) {
                var scriptSrc = scripts[x].getAttribute('src');
                if (typeof scriptSrc !== 'undefined' && null !== scriptSrc && '' !== scriptSrc && 
                    scriptSrc.indexOf('.dynad.net') > -1 && scriptSrc.indexOf('?dc=' + placementId + ';') > -1) {
                    found = true;
                    var params = scriptSrc.substring(scriptSrc.indexOf('?') + 1);
                    var splitted = params.split(';');
                    for (var y = (splitted.length - 1); y >= 0; y--) {
                        if (typeof splitted[y] !== 'undefined' && 
                            null !== splitted[y] &&
                            splitted[y].indexOf('=') > -1) {
                            var entry = splitted[y].split('=');
                            window[entry[0]] = entry[1];
                        }
                    }
                    break;
                }
            }
        }
        if (!found) {
            for (var x = (scripts.length - 1); x >= 0; x--) {
                var scriptUri = scripts[x].baseURI;
                if (typeof scriptUri !== 'undefined' && null !== scriptUri && '' !== scriptUri && 
                    scriptUri.indexOf('.dynad.net') > -1 && scriptUri.indexOf('?dc=' + placementId + ';') > -1) {
                    var params = scriptUri.substring(scriptUri.indexOf('?') + 1);
                    var splitted = params.split(';');
                    for (var y = (splitted.length - 1); y >= 0; y--) {
                        if (typeof splitted[y] !== 'undefined' && 
                            null !== splitted[y] &&
                            splitted[y].indexOf('=') > -1) {
                            var entry = splitted[y].split('=');
                            window[entry[0]] = entry[1];
                        }
                    }
                    break;
                }
            }
        }
    }
 
    if( step == 2 ) {
        var divContainer = document.getElementById(containerId);
        var tagScript = divContainer.parentNode.getElementsByTagName('script'); 
        for( var x = (tagScript.length - 1) ; x >= 0; x-- ) {
            if( tagScript[x].hasAttribute('src') && 
                typeof tagScript[x].getAttribute('src') !== 'undefined' && 
                tagScript[x].getAttribute('src') != '' && 
                tagScript[x].getAttribute('src') != null ) {
                
                var strSRC = tagScript[x].getAttribute('src');
                if( strSRC.indexOf('.dynad.net') > -1 
                    && strSRC.indexOf('?dc='+placementId+';') > -1
                    && strSRC.indexOf(';idt_url=') > -1 ) {

                    var aff_source = "";
                    if( strSRC.indexOf(';aff_source=') > -1 ) {
                        aff_source = strSRC.substring( strSRC.indexOf(';aff_source=') + ';aff_source='.length );
                        aff_source = aff_source.substring(0, aff_source.indexOf(';'));
                    }

                    var idtURL = strSRC.substring( strSRC.indexOf(';idt_url=') + ';idt_url='.length );
                    idtURL = idtURL.substring(0, idtURL.indexOf(';'));
                    
                    var idtLabel = "";                
                    if( strSRC.indexOf(';idt_label=') > -1 ) {
                        idtLabel = strSRC.substring( strSRC.indexOf(';idt_label=') + ';idt_label='.length );
                        idtLabel = idtLabel.substring(0, idtLabel.indexOf(';'));
                    }

                    var cpg = "";                
                    if( strSRC.indexOf(';cpg=') > -1 ) {
                        cpg = strSRC.substring( strSRC.indexOf(';cpg=') + ';cpg='.length );
                        cpg = cpg.substring(0, cpg.indexOf(';'));
                    }

                    var creative = "";                
                    if( strSRC.indexOf(';creative=') > -1 ) {
                        creative = strSRC.substring( strSRC.indexOf(';creative=') + ';creative='.length );
                        creative = creative.substring(0, creative.indexOf(';'));
                    }

                    var parameters = "";                
                    if( strSRC.indexOf(';parameters=') > -1 ) {
                        parameters = strSRC.substring( strSRC.indexOf(';parameters=') + ';parameters='.length );
                        parameters = parameters.substring(0, parameters.indexOf(';'));
                    }
                    
                    var tagParams = null;
                    try { 
                        if( typeof window['_tp_dynad_' + reqid.substring(1)] !== 'undefined' )
                            tagParams = window['_tp_dynad_' + reqid.substring(1)];
                    } catch (exParams){}
                    
                    var idtBanner = "";
                    try {
                        if( tagParams != null && typeof tagParams['idt_banner'] !== 'undefined' )
                            idtBanner = tagParams['idt_banner'];
                    } catch ( exIdtBanner ){}
                    
                    var container = document.getElementById(containerId);
                    var anchor = container.getElementsByTagName('a');
                    if( typeof anchor !== 'undefined' && anchor.length > 0 ) {
                        for(var a = 0; a < anchor.length; a++ ) {
                            if( typeof anchor[a].getAttribute('href') !== 'undefined' && anchor[a].getAttribute('href') != '' ) {
                                if( anchor[a].getAttribute('href').indexOf('.dynad.net') > -1 && anchor[a].getAttribute('href').indexOf('/c/') > -1 ) {
                                    anchor[a].setAttribute('href', anchor[a].getAttribute('href') + ';p2=' + 
                                            encodeURIComponent('idtURL=' + encodeURIComponent(idtURL) + '&idtLabel=' + idtLabel + '&idtBanner=' + idtBanner + 
                                            '&aff_source=' + aff_source + '&cpg=' + cpg + '&creative=' + creative + '&parameters=' + parameters) );
                                }
                            }
                        }
                    }
                    
                }
                break;
            }
        }
    }
} catch (e){}
return true;}catch(e){if(typeof console!=='undefined'&&typeof console.log!=='undefined'){console.log('DynAd Error:');console.log(e);}}})('I5550002447_15851316044571749122586','TH',2,'_dynad_c_I5550002447_15851316044571749122586','5550002447','3000000173','5000005410','4000025804');}}catch(e){if(typeof console!=='undefined'&&typeof console.log!=='undefined'){console.log('DynAd Error:');console.log(e);}
var v='<A HR';v+='EF="https://t.dynad.net/c/?dc=5550002447;ci=5000005410;cr=4000039918.0;ord=1583178946849;tid=D3-FE14;srctype=bkp;C=0;tp=THDPARTY;st=1;er=';v+=encodeURI(e.message);v+='" TARGET="_blank" STYLE="" ><IMG ID="I5550002447_15851316044571749122586" S';v+='RC="https://s.dynad.net/stack/K3J84B9HPxEGbcVwswEHyo6OtK8jX4zqFzUSWrp2smE.gif?bv=1585068519000" WIDTH="728" HEIGHT="90" ALT="" BORDER="0"></a><IMG SRC="https://t.dynad.net/n/?dc=5550002447;ci=5000005410;bi=4000039918.0;cr=4000025804.0;srctype=bkp;15851316044571749122586" STYLE="display:none;" WIDTH="0" HEIGHT="0" BORDER="0" />';document.write(v)}
document.write('</div>');})();