var SteamMediaData=new Array(); SteamMediaData.push([ "",//投放开始时间(不限制为空) "",//投放结束时间(不限制为空) "http://img1.toocle.com/uppic/a/2010/07/03/f8/9f/f89fde395be64e8090e14794952e0446-210253.swf",//素材地址 "http://img1.toocle.com/uppic/a/2010/07/03/c1/fe/c1fe977112ff459c87c8ccbb798872e6-210259.jpg",//标签地址 "http://www.chinayyjx.com/intro.html",//链接地址 230,//流媒体宽 195,//流媒体高 158,//流媒体距离顶部高度 -1,//流媒体左边距,居中为-1 -1//背景透明,透明:-1,不透明:1 ]); /****************************************************/ /**流媒体广告 begin**/ function SteamMediaOpenWin(){ var pthis = this;//设置指针 var o = new SinaDotAdJs();//加载通用类 var d = SteamMediaData;//加载数据 var tmpLeft = 0; window.SteamMediaFlag = false; if(o.$("SteamMediaWrap")){var w = o.$("SteamMediaWrap");}else{var w = false;}//加载容器对象 this.stimer = null; this.stimer_pos = null; //流媒体构造函数 this.initAdSM = function(u,t,l,w,h,tp,ol,om){ //容器构造 //主容器 eval(o.initWrap(0x02,"SteamMediaWrap","smWrap",w,"0","","","","","","","0 auto","0","","block")); //触发部分 eval(o.initWrap(0x01,"div","seWrap",w,h,"fixed","0","",tp,"","9999","0","0","none","none")); if(o.isIE6 || !o.isXHTML){seWrap.style.position = "absolute";} smWrap.appendChild(seWrap); eval(o.initWrap(0x01,"div","seDiv",w,h,"","","","","","","0","0","none","block")); seWrap.appendChild(seDiv); if(w>375){eval(o.initWrap(0x01,"div","seCls",77,31,"absolute","","0","","-31","9999","0","0","url(http://img1.toocle.com/uppic/a/2010/07/01/d5/c3/d5c3a0df20a44ecab1719c8c60bc730e-209764.gif) no-repeat","block"));} else{eval(o.initWrap(0x01,"div","seCls",77,31,"absolute","","0","","-31","9999","0","0","url(http://img1.toocle.com/uppic/a/2010/07/01/b1/3c/b13c24d588ba4659adedbb4381c07189-209765.gif) no-repeat","block"));} seCls.style.cursor = "pointer"; seWrap.appendChild(seCls); if(om>=0){ eval(o.initWrap(0x01,"iframe","seIfm",w,h,"absolute","0","","0","","-1","0","0","#fff","")); seIfm.frameBorder = 0; seWrap.appendChild(seIfm); } //标签部分 eval(o.initWrap(0x01,"div","stWrap",17,204,"fixed","","0","","-20","9999","0","0","","none")); if(o.isIE6 || !o.isXHTML){stWrap.style.position = "absolute";} smWrap.appendChild(stWrap); eval(o.initWrap(0x01,"div","stDiv",17,242,"absolute","0","","-114","","","0","0","none","block")); stWrap.appendChild(stDiv); eval(o.initWrap(0x01,"div","srBtn",17,14,"absolute","0","","128","","","0","0","url(http://img1.toocle.com/uppic/a/2010/07/01/8d/3e/8d3e88cd0815486e9d06f8ac80dd8769-209738.gif) no-repeat center","block")); srBtn.style.cursor = "pointer"; stWrap.appendChild(srBtn); eval(o.initWrap(0x01,"div","scBtn",17,27,"absolute","0","","142","","","0","0","url(http://img1.toocle.com/uppic/a/2010/07/01/7a/a8/7aa8374f31c84404aa693c8659d433b6-209737.gif) no-repeat center","block")); scBtn.style.cursor = "pointer"; stWrap.appendChild(scBtn); //获取位置 this.getSMPos = function(){ if(ol<0){tmpLeft = smWrap.offsetLeft=="undefined"?((o.bdy.offsetWidth - w)/2-(o.isIE6?16:0)):(smWrap.offsetLeft!=0?smWrap.offsetLeft:smWrap.parentNode.offsetLeft);} if(tmpLeft>=0){seWrap.style.left = tmpLeft+"px";} if(o.isIE6 || !o.isXHTML){seWrap.style.top = o.bdy.scrollTop + tp + "px";} if(o.isIE6 || !o.isXHTML){stWrap.style.top=o.bdy.scrollTop+o.bdy.offsetHeight-208+"px";} pthis.stimer_pos = setTimeout("getSMPos()",50); }; //播放流媒体 this.showSM = function(fst){ clearTimeout(pthis.stimer); seDiv.innerHTML = ""; stDiv.innerHTML = ""; seWrap.style.display = "block"; stWrap.style.display = "none"; var eObj = o.initObj("SteamMediaObj",u,l,w,h); seDiv.appendChild(eObj); if(fst==true){ pthis.stimer = setTimeout("hideSM(true)",w>259?12000:12000); }else{ pthis.stimer = setTimeout("hideSM()",w>259?12000:12000); } }; //关闭流媒体 this.hideSM = function(fst){ clearTimeout(pthis.stimer); seDiv.innerHTML = ""; stDiv.innerHTML = ""; seWrap.style.display = "none"; stWrap.style.display = "block"; var tObj = o.initObj("SteamMediaTag",t,l,17,242); stDiv.appendChild(tObj); if(fst==true || window.SteamMediaFlag){try{window.SteamMediaFlag = false;nextAD();}catch(e){}} }; //关闭标签 this.closeSM = function(){ clearTimeout(pthis.stimer); clearTimeout(pthis.stimer_pos); smWrap.style.display = "none"; smWrap.innerHTML = ""; }; //按钮事件注册 o.addEvent(seCls,"click",this.hideSM);//关闭流媒体 o.addEvent(srBtn,"click",this.showSM);//重播流媒体 o.addEvent(scBtn,"click",this.closeSM);//关闭标签 //IP控制 window.SteamMediaFlag = true; this.cookie = o.getAdCookie("SteamMedia"+document.URL); this.cookie = this.cookie==""?0:++this.cookie; if(this.cookie<150){this.showSM(true);}else{this.hideSM(true);} o.setAdCookie("SteamMedia"+document.URL,this.cookie,1440); this.getSMPos(); }; //时间过滤 this.ifSMAD = false; if(w && d.length>0){ for(var i=0;i