(function(){ var imgs=[ {src:"",link:''} ]; var top_imgs=[ {src:"",link:''} ]; var float_imgs={ float_imgs1:{src:"",link:''}, float_imgs2:{src:"",link:''} }; var floatl_imgs={ floatl_imgs1:{src:"",link:''}, floatl_imgs2:{src:"",link:''} }; var side={ left1:{src:"",link:''}, left2:{src:"",link:''}, left3:{src:"",link:''}, right1:{src:"",link:''}, right2:{src:"",link:''}, right3:{src:"",link:''}, } var ua = navigator.userAgent.toLocaleLowerCase(), mobileOn=ua.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i); dom=document.createElement('div'), style=document.createElement('style'), propaHTML=''; num=parseInt(Math.random()*imgs.length); top_num=parseInt(Math.random()*top_imgs.length); float_num=parseInt(Math.random()*float_imgs.length); style.innerHTML='.propa_bottom{position:fixed;width:100%;height:60px;left:0;bottom:0;background:rgba(0,0,0,0.5)}'+ '.propa_bottom img{display:block;width:100%;height:100%;margin:0 auto;}'+ '.propa_top{position:fixed;width:100%;height:60px;left:0;top:0;background:rgba(0,0,0,0.5)}'+ '.propa_top img{display:block;width:100%;height:100%;margin:0 auto;}'+ '.propa_left1,.propa_left2,.propa_left3{position:fixed;left:-20px;}'+ '.propa_right1,.propa_right2,.propa_right3{position:fixed;right:-20px;text-align: right;}'+ '.propa_left1 img,.propa_right1 img{display:block;width:55px;height:88px;margin:0 auto;}'+ '.propa_left2 img,.propa_left3 img,.propa_right2 img,.propa_right3 img{opacity: 1;max-height:100%;max-width:100%;}'+ '.propa_left1,.propa_right1{top:112px;}'+ '.propa_left2,.propa_right2{top:50%;margin-top:-7.25%}'+ '.close{position:absolute;right:20px;top:0;font-size: 5px;padding: 2px 5px;background: rgba(0, 0, 0, 0.8);color: #fff;display: inline-block;}'+ '.propa_right1 .close,.propa_right2 .close,.propa_right3 .close{right:20px; left:unset}'+ '.propa_float1{position:fixed;width:40px;height:40px;left:80%;top:36%;background:rgba(0,0,0,0.5)}'+ '.propa_float1 img{display:block;width:auto;height:100%;margin:0 auto;}'+ '.propa_float2{position:fixed;width:40px;height:40px;left:80%;top:70%;background:rgba(0,0,0,0.5)}'+ '.propa_float2 img{display:block;width:auto;height:100%;margin:0 auto;}'+ '.propa_floatl1{position:fixed;width:30px;height:30px;left:10%;top:62%;background:rgba(0,0,0,0.5)}'+ '.propa_floatl1 img{display:block;width:auto;height:100%;margin:0 auto;}'+ '.propa_floatl2{position:fixed;width:30px;height:30px;left:10%;top:68%;background:rgba(0,0,0,0.5)}'+ '.propa_floatl2 img{display:block;width:auto;height:100%;margin:0 auto;}'; if(imgs[num].src){ var dom1=document.createElement('div'); dom1.innerHTML=''+'关闭'; if(document.cookie.search('propa=true')==-1){ document.body.appendChild(dom1); document.getElementById('propa_bottom').onload = function(e){ style.innerHTML+='.propa_left3,.propa_right3{bottom:'+document.getElementById('propa_bottom').offsetHeight+'px}'; style.innerHTML+='body{padding-bottom: 60px !important;}'; } }else{ style.innerHTML+='.propa_left3,.propa_right3{bottom:0}'; } } if(top_imgs[top_num].src){ var dom1=document.createElement('div'); dom1.innerHTML=''+'关闭'; if(document.cookie.search('propa=true')==-1){ document.body.appendChild(dom1); document.getElementById('propa_top').onload = function(e){ style.innerHTML+='.propa_left3,.propa_right3{bottom:'+document.getElementById('propa_top').offsetHeight+'px}'; style.innerHTML+='body{padding-bottom: 60px !important;}'; } }else{ style.innerHTML+='.propa_left3,.propa_right3{bottom:0}'; } } if(float_imgs.float_imgs1.src){ var dom1=document.createElement('div'); dom1.innerHTML=''+''; if(document.cookie.search('propa=true')==-1){ document.body.appendChild(dom1); document.getElementById('propa_float1').onload = function(e){ style.innerHTML+='.propa_left3,.propa_right3{bottom:'+document.getElementById('propa_float1').offsetHeight+'px}'; style.innerHTML+='body{padding-bottom: 60px !important;}'; } }else{ style.innerHTML+='.propa_left3,.propa_right3{bottom:0}'; } } if(float_imgs.float_imgs2.src){ var dom1=document.createElement('div'); dom1.innerHTML=''+''; if(document.cookie.search('propa=true')==-1){ document.body.appendChild(dom1); document.getElementById('propa_float2').onload = function(e){ style.innerHTML+='.propa_left3,.propa_right3{bottom:'+document.getElementById('propa_float2').offsetHeight+'px}'; style.innerHTML+='body{padding-bottom: 60px !important;}'; } }else{ style.innerHTML+='.propa_left3,.propa_right3{bottom:0}'; } } if(floatl_imgs.floatl_imgs1.src){ var dom1=document.createElement('div'); dom1.innerHTML=''+''; if(document.cookie.search('propa=true')==-1){ document.body.appendChild(dom1); document.getElementById('propa_floatl1').onload = function(e){ style.innerHTML+='.propa_left3,.propa_right3{bottom:'+document.getElementById('propa_floatl1').offsetHeight+'px}'; style.innerHTML+='body{padding-bottom: 60px !important;}'; } }else{ style.innerHTML+='.propa_left3,.propa_right3{bottom:0}'; } } if(floatl_imgs.floatl_imgs2.src){ var dom1=document.createElement('div'); dom1.innerHTML=''+''; if(document.cookie.search('propa=true')==-1){ document.body.appendChild(dom1); document.getElementById('propa_floatl2').onload = function(e){ style.innerHTML+='.propa_left3,.propa_right3{bottom:'+document.getElementById('propa_floatl2').offsetHeight+'px}'; style.innerHTML+='body{padding-bottom: 60px !important;}'; } }else{ style.innerHTML+='.propa_left3,.propa_right3{bottom:0}'; } } if(mobileOn){ style.innerHTML+='.propa_right1,.propa_right2,.propa_right3,.propa_left1,.propa_left2,.propa_left3{width:20%;max-height: 25%;overflow:hidden}'; }else{ style.innerHTML+='.propa_right1,.propa_right2,.propa_right3,.propa_left1,.propa_left2,.propa_left3{width:200px;max-height: 25%;overflow:hidden}'; } if(!mobileOn||!imgs[num].src){ style.innerHTML+='.propa_left3,.propa_right3{bottom:0}'; } if(side.left1.src&&document.cookie.search('propa_left1=true')==-1){ propaHTML+=''+'关闭' } if(side.left2.src&&document.cookie.search('propa_left2=true')==-1){ propaHTML+=''+'关闭' } if(side.left3.src&&document.cookie.search('propa_left3=true')==-1){ propaHTML+=''+'关闭' } if(side.right1.src&&document.cookie.search('propa_right1=true')==-1){ propaHTML+=''+'关闭' } if(side.right2.src&&document.cookie.search('propa_right2=true')==-1){ propaHTML+=''+'关闭' } if(side.right3.src&&document.cookie.search('propa_right3=true')==-1){ propaHTML+=''+'关闭' } document.getElementsByTagName('head')[0].appendChild(style); dom.innerHTML=propaHTML; document.body.appendChild(dom); for(var i=0,max=document.getElementsByClassName('close').length;i