Advertisement
anatolionobre

Leaderboard Topo Imagem

Apr 20th, 2015
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.48 KB | None | 0 0
  1. <img src="%%VIEW_URL_UNESC%%http://s0.2mdn.net/dot.gif" width="1" height="1" style="display:none"/>
  2.  
  3.  
  4. <div id="lb_container" style="text-align:center;width:728px; margin: 10px auto">
  5.  
  6. <script type="text/javascript">
  7.  
  8.  
  9. if ( String(window.location.host).replace('www.', '') === "maisfutebol.iol.pt") {
  10.  
  11. var eldfp = document.getElementById('lb_container');
  12.  
  13. if(eldfp) {eldfp.setAttribute("style","margin: 10px auto 10px; width: 728px; text-align:center");}
  14.  
  15.  
  16. var divdfp = document.getElementById("heightPH");
  17. if(divdfp) { divdfp.parentNode.removeChild(divdfp) };
  18.  
  19. }
  20.  
  21.  
  22.  
  23.  
  24. var link_builder = "%%DEST_URL%%";
  25.  
  26. var hostDfp = String(window.location.host).replace('www.', '')
  27.  
  28. if (hostDfp.indexOf("iol") >-1) {
  29. //Tem dominio IOL
  30. //Γ© o IOl.pt?
  31. if(hostDfp.split(".")[0] ==="iol") {
  32. link_builder_1 = "iol"
  33. }else{
  34. link_builder_1 = hostDfp.split(".")[0];
  35. }
  36.  
  37.  
  38. }else {
  39. //fora do domΓ­nio IOL -> retorna dominio
  40. var link_builder_1 = hostDfp.split(".")[0];
  41. }
  42.  
  43. link_builder = link_builder.replace(/tvi/g,link_builder_1);
  44. var urlerr = "%%CLICK_URL_ESC%%"+link_builder;
  45.  
  46. var bannerwidth= 728;
  47. var bannerheight = 90;
  48.  
  49. var DFPscreenwidth = document.body.clientWidth;
  50.  
  51. var host = String(window.location.host).replace('www.', '');
  52.  
  53. if (host === "tvi24.iol.pt") {
  54. var new_bannerwidth = DFPscreenwidth * 0.7;
  55. var new_bannerheight = (bannerheight/bannerwidth) * new_bannerwidth;
  56. }else {
  57.  
  58. var new_bannerwidth = bannerwidth;
  59. var new_bannerheight = bannerheight;
  60.  
  61. }
  62.  
  63.  
  64.  
  65.  
  66.  
  67. var DFPImage = {
  68. getEl: function (i){return document.getElementById(i)},
  69. Image: function(file, selector, w, h, click){
  70. if(!click){click = urlerr}
  71. DFPImage.getEl(selector).innerHTML='<a href="'+click+'" target="_blank"><img src="'+file+'" alt="" width="'+w+'" height="'+h+'" border="0" /></a>';
  72.  
  73. },
  74.  
  75.  
  76. }
  77.  
  78. DFPImage.Image('%%FILE:PNG1%%', 'lb_container', bannerwidth, bannerheight)
  79.  
  80. </script>
  81.  
  82. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement