<?php
/****************************************/
/*                                      */
/*  百信卡盟平台联系QQ:84945491         */
/*  淘宝店 http://shop70674652.taobao.com  */
/*  百信卡盟 http://www.caipiaobus.com  */
/*                                      */
/****************************************/

echo "\r\n";
$i = 0;
foreach ( $vd['ad'] as $a )
{
				if ( $a['ispic'] == 1 && $a['pos'] == 110 )
				{
								if ( $i == 0 )
								{
												echo "<s";
												echo "cript type=\"text/javascript\">\r\n  function hide(id)\r\n{\r\n  document.getElementById(id).style.display = \"none\";\r\n  clearInterval(document.getElementById(id).timerID);\r\n}\r\nfunction couplet(){ \r\n if(arguments.length>=1) this.objID = document.getElementById(arguments[0]); \r\n if(arguments.length>=2) this.divTop = arguments[1]; \r\n if(arguments.length>=3) this.divPlane = arguments[2]; \r\n if(arguments.lengt";
												echo "h>=4) this.scrollDelay = arguments[4]; \r\n if(arguments.length>=5) this.waitTime = arguments[5]; \r\n if(!this.objID){ \r\n  alert(\"对象名【\"+ arguments[0] +\"】无效，对联无法初始化，请检查对象名称是否正确！\"); \r\n  this.objID = null; return; \r\n }else{ \r\n  this.objID.style.position=\"absolute\"; \r\n  this.objID.style.display=\"block\"; \r\n  this.objID.style.zIndex=9999; \r\n } \r\n if(\"\" == this.objID.style.top){ ";
												echo "\r\n  if(isNaN(this.divTop)){ \r\n   alert(\"对象垂直位置(top)参数必须为数字。\"); return; \r\n  }else{ \r\n   this.objID.style.top = this.divTop+\"px\"; \r\n  } \r\n } \r\n if(\"\" == this.objID.style.left && \"\" == this.objID.style.right){ \r\n  if(isNaN(this.divPlane)){ \r\n   alert(\"对象水平位置(left||right)参数必须为数字。\"); return; \r\n  } \r\n  if(this.divPlane>0) this.objID.style.left = this.divPlane+\"px\"; \r\n  if(thi";
												echo "s.divPlane<0) this.objID.style.right = Math.abs(this.divPlane)+\"px\"; \r\n } \r\n if(this.scrollDelay<15 || isNaN(this.scrollDelay)) this.scrollDelay = 15; \r\n if(this.waitTime<500 || isNaN(this.waitTime)) this.waitTime = 500; \r\n if(arguments.length>=1) this.start(); \r\n} \r\ncouplet.prototype.start = function(){ \r\n if(null == this.objID) return; \r\n var objCouplet = this; \r\n timer = this.scrollDelay; \r\n objCo";
												echo "uplet.lastScrollY = 0; \r\n objCouplet.timerID = null; \r\n objCouplet.startID = function(){ \r\n  if(\"block\" == objCouplet.objID.style.display){ \r\n   objCouplet.run(); \r\n  }else{ \r\n   clearInterval(objCouplet.timerID); \r\n  } \r\n } \r\n objCouplet.Begin = function(){ \r\n objCouplet.timerID = setInterval(objCouplet.startID,timer); \r\n } \r\n  \r\n setTimeout(objCouplet.Begin,this.waitTime); \r\n} \r\ncouplet.prototyp";
												echo "e.run = function(){ \r\n if(document.documentElement && document.documentElement.scrollTop){ \r\n  uu_scrY = parseFloat(document.documentElement.scrollTop); \r\n }else if(document.body){ \r\n  uu_scrY = parseFloat(document.body.scrollTop); \r\n } \r\n uu_divX = parseFloat(this.objID.style.top.replace(\"px\",\"\")); \r\n uu_curTop = .1 * (uu_scrY - this.lastScrollY); \r\n uu_curTop = uu_curTop>0?Math.ceil(uu_curTop):M";
												echo "ath.floor(uu_curTop); \r\n this.objID.style.top = parseFloat(uu_divX + uu_curTop) + \"px\"; \r\n this.lastScrollY += uu_curTop; \r\n}\r\n</script>\r\n<div id=\"maple1\" style=\"width:110px;height:50px;font-size:12px;\"> \r\n <div style=\"cursor:pointer\" onclick=\"hide('maple1')\">[关闭]</div>\r\n <div style=\"height:50px;padding-top:4px;width:110px;\"> \r\n   <a href=\"";
												echo $a['url'];
												echo "\" target=\"_blank\"><img src=\"";
												echo $vd['root'];
												echo $vd['sc'];
												echo "upload/";
												echo $a['pic'];
												echo "\" width=\"100%\"/></a>\r\n </div>\r\n <div></div> \r\n</div>\r\n";
												echo "<s";
												echo "cript type=\"text/javascript\">\r\n  new couplet(\"maple1\",180,8);\r\n</script>\r\n";
								}
								if ( $i == 1 )
								{
												echo "<div id=\"maple2\" style=\"width:110px;height:50px;font-size:12px;\"> \r\n <div style=\"cursor:pointer\" onclick=\"hide('maple2')\">[关闭]</div> \r\n <div style=\"height:50px;padding-top:4px;width:110px;\"> \r\n   <a href=\"";
												echo $a['url'];
												echo "\" target=\"_blank\"><img src=\"";
												echo $vd['root'];
												echo $vd['sc'];
												echo "upload/";
												echo $a['pic'];
												echo "\" width=\"100%\"/></a>\r\n </div> \r\n <div></div> \r\n</div> \r\n";
												echo "<s";
												echo "cript type=\"text/javascript\">\r\n  new couplet(\"maple2\",180,-8);\r\n</script>\r\n";
												break;
								}
								++$i;
				}
}
?>
