/*
 * Original file name: liblp.v2.3.js
 * Last change.......: 2009-09-15 15h37
 */

if(location.href.search(/(.*?)\?setQtdAnuncios=([0-9]{1,5}$)/)>-1){var LPQtdAnuncio=location.href.replace(/(.*?)\?setQtdAnuncios=([0-9]{1,5})/,"$2")}var LPdesLabelInterna=location.pathname.replace(/^\/|(.*?)\/*?index\..*?$/g,"$1")?"-interna":"";var LPdesLabel=location.hostname+LPdesLabelInterna;document.write('<script type="text/javascript" src="http://adclient-uol.lp.uol.com.br/ci_n_ads.js?adBlockCount=0&urlReferer='+escape((typeof LPUrl=="undefined"?location.href:LPUrl))+"&numads="+LPQtdAnuncio+"&deslabel="+LPdesLabel+"&adult="+(typeof LPadult!="undefined"?LPadult:0)+"&coddisplaysupplier="+LPIdentificador+"&cookie="+(typeof LPCookie=="undefined"?"false":LPCookie)+'"><\/script>');var elementLP2=document.getElementById("links-patrocinados2")||false;if(elementLP2){document.write('<script type="text/javascript" src="http://adclient-uol.lp.uol.com.br/ci_n_ads2.js?adBlockCount=1&urlReferer='+escape((typeof LPUrl=="undefined"?location.href:LPUrl))+"&numads="+(typeof LPQtdAnuncio2!="undefined"?LPQtdAnuncio2:8)+"&deslabel="+LPdesLabel+(typeof LPdesLabel2!="undefined"?"-"+LPdesLabel2:"-rodape")+"&adult="+(typeof LPadult!="undefined"?LPadult:0)+"&coddisplaysupplier="+LPIdentificador+"&cookie="+(typeof LPCookie=="undefined"?"false":LPCookie)+'"><\/script>')}if(typeof adArrayCalhau=="undefined"){var adArrayCalhau=[];document.write('<script type="text/javascript" src="http://adclient-uol.lp.uol.com.br/stc/calhau_n_ads.js"><\/script>')}if(typeof adArray=="undefined"){var adArray=[]}if(typeof LPAddCalhauExtra=="undefined"){var LPAddCalhauExtra=true}libLPAfiliado={objBloco:document.getElementById("links-patrocinados"),LPIndices:[],monta:function(b){var e="";if(showAd){e+='<h3><a href="http://linkspatrocinados.uol.com.br/" target="_blank">'+(typeof LPChapeu=="undefined"?"UOL Links Patrocinados":LPChapeu)+"</a></h3>\n";e+="<ul>\n";for(anuncio in b){e+="\n";e+='  <li class="item'+anuncio+" "+(anuncio%2==0?"par":"impar")+'">\n';e+='    <a href="'+b[anuncio][4]+'" target="_blank">\n';e+="      <strong>"+b[anuncio][0]+"</strong><br />\n";
e+="    	<em>"+b[anuncio][1]+"</em>\n";e+="    	<em>"+b[anuncio][2]+"</em><br />\n";e+="    	<span>"+b[anuncio][3]+"</span><br />\n";e+="		</a>\n";e+="  </li>\n"}e+="\n</ul>"}if((b.length<LPQtdAnuncio||!showAd)&&adArrayCalhau.length>0&&this.objBloco!=elementLP2){e+='<h3 class="chapeu-calhau">'+(typeof LPChapeuCalhau=="undefined"?"Produtos UOL":LPChapeuCalhau)+"</h3>\n";e+="<ul>\n";var c=(LPQtdAnuncio-b.length)%2&&LPAddCalhauExtra>0?(LPQtdAnuncio-b.length+1):(LPQtdAnuncio-b.length);for(var a=0;a<c&&a<adArrayCalhau.length;a++){var d=Math.round((Math.random()*(adArrayCalhau.length-1)));while(!this.checkRepeat(d)){d=Math.round((Math.random()*(adArrayCalhau.length-1)))}e+="\n";e+='  <li class="'+(a%2==0?"par":"impar")+'">\n';e+='    <a href="'+adArrayCalhau[d][3]+'" target="_blank">\n';e+="      <strong>"+adArrayCalhau[d][0]+"</strong><br />\n";e+="    	<em>"+adArrayCalhau[d][1]+"</em><br />\n";e+="    	<span>"+adArrayCalhau[d][2]+"</span><br />\n";e+="		</a>\n";e+="  </li>\n"}e+="\n</ul>"}e+='\n<h4 class="lp-anuncie-aqui"><a href="http://linkspatrocinados.uol.com.br/" target="_blank">Anuncie aqui</a></h4>';this.objBloco.innerHTML=e;this.wordbreak()},checkRepeat:function(a){for(var b in this.LPIndices){if(this.LPIndices[b]==a){return false}}this.LPIndices.push(a);return true},wordbreak:function(){var i=this.objBloco.getElementsByTagName("li");if(i.length>0){var f=i[0].offsetWidth>210?150:26;var f=i[0].offsetWidth<150?20:f}else{return false}for(var h=0;h<i.length;h++){var a=i[h].getElementsByTagName("span")[0];var d=a.innerHTML;if(d.indexOf("www.")==-1){if(d.length>f){var e=d.split(".")[0];var g=d.split(d.split(".")[0]+".")[1];a.innerHTML=e+"<br />"+g}}else{if(d.length>f){var c="";if(d.indexOf("/")!=-1){var j=d.substring(d.lastIndexOf("/")+1,d.length)}else{var b=d.indexOf(".",d.indexOf(".")+1);var j=d.substring(b,d.length)}c=d.replace(j,"<br />"+j);a.innerHTML=c}}}}};var adArray2Timer=null;if(document.getElementById("links-patrocinados")){libLPAfiliado.objBloco.style.visibility="hidden";
var LPMontado=false;var loadingLP=setInterval(function(){if(typeof showAd!="undefined"){if(!LPMontado){libLPAfiliado.monta(adArray)}if(elementLP2){adArray2Timer=setInterval(function(){if(typeof adArray2!=undefined){clearInterval(adArray2Timer);libLPAfiliado.objBloco=elementLP2;libLPAfiliado.monta(adArray2);eval(LPEqualize)}},500)}LPMontado=true;try{eval(LPEqualize);if(document.getElementById("links-patrocinados")){document.getElementById("links-patrocinados").style.visibility="visible"}if(document.getElementById("links-patrocinados2")){document.getElementById("links-patrocinados2").style.visibility="visible"}clearInterval(loadingLP)}catch(e){setTimeout("libLPAfiliado.objBloco.style.visibility = 'visible';",500)}}},250)};
