document.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    <title>js自动轮播图片广告代码（幻灯片）</title>\n    <style>\n    <!--星越星网络电视！www.xyxsoft.com-->\n    body,div,ul,li{margin:0;padding:0;}\n    ul{list-style-type:none;}\n    img{border:0;}\n    \n    #box{position:relative;width:950px;height:252px;background:#fff;border-radius:5px;border:8px solid #fff;margin:10px \n\nauto;cursor:pointer;}\n    #box .list{position:relative;width:950px;height:252px;overflow:hidden;}\n    #box .list ul{position:absolute;top:0;left:0;}\n    #box .list li{width:950px;height:252px;overflow:hidden;}\n    #box .list li img{width:950px;height:252px;}\n    #box .count{position:absolute;right:0;bottom:5px;}\n    #box .count li{color:#fff;float:left;width:20px;height:20px;cursor:pointer;margin-\n\nright:5px;overflow:hidden;background:#F90;opacity:0.7;filter:alpha(opacity=70);border-radius:20px;}\n    #box .count li.current{color:#fff;opacity:1;filter:alpha(opacity=100);font-weight:700;background:#f60;}\n    #tmp{width:100px;height:100px;background:red;position:absolute;}\n    </style>\n    <script type=\"text/javascript\">\n    <!--星越星网络电视！www.xyxsoft.com-->\n    //获取ID\n    var $ = function (id) {return typeof id === \"string\" ? document.getElementById(id) : id};\n    //获取tagName\n    var $$ = function (tagName, oParent) {return (oParent || document).getElementsByTagName(tagName)};\n    //自动播放对象\n    var AutoPlay = function (id) {this.initialize(id)};\n    AutoPlay.prototype = {\n    initialize: function (id)\n    {\n    var oThis = this;\n    this.oBox = $(id);\n    this.oUl = $$(\"ul\", this.oBox)[0];\n    this.aImg = $$(\"img\", this.oBox);\n    this.timer = null;\n    this.autoTimer = null;\n    this.iNow = 0;\n    this.creatBtn();\n    this.aBtn = $$(\"li\", this.oCount);\n    this.toggle();\n    this.autoTimer = setInterval(function ()\n    {\n    oThis.next()\n    }, 3000);\n    this.oBox.onmouseover = function ()\n    {\n    clearInterval(oThis.autoTimer)\n    };\n    this.oBox.onmouseout = function ()\n    {\n    oThis.autoTimer = setInterval(function ()\n    {\n    oThis.next()\n    }, 3000)\n    };\n    for (var i = 0; i < this.aBtn.length; i++)\n    {\n    this.aBtn[i].index = i;\n    this.aBtn[i].onmouseover = function ()\n    {\n    oThis.iNow = this.index;\n    oThis.toggle()\n    }\n    }\n    },\n    creatBtn: function ()\n    {\n    this.oCount = document.createElement(\"ul\");\n    this.oFrag = document.createDocumentFragment();\n    this.oCount.className = \"count\";\n    for (var i = 0; i < this.aImg.length; i++)\n    {\n    var oLi = document.createElement(\"li\");\n    oLi.innerHTML = i + 1;\n    this.oFrag.appendChild(oLi)\n    }\n    this.oCount.appendChild(this.oFrag);\n    this.oBox.appendChild(this.oCount)\n    },\n    toggle: function ()\n    {\n    for (var i = 0; i < this.aBtn.length; i++) this.aBtn[i].className = \"\";\n    this.aBtn[this.iNow].className = \"current\";\n    this.doMove(-(this.iNow * this.aImg[0].offsetHeight))\n    },\n    next: function ()\n    {\n    this.iNow++;\n    this.iNow == this.aBtn.length && (this.iNow = 0);\n    this.toggle()\n    },\n    doMove: function (iTarget)\n    {\n    var oThis = this;\n    clearInterval(oThis.timer);\n    oThis.timer = setInterval(function ()\n    {\n    var iSpeed = (iTarget - oThis.oUl.offsetTop) / 6;\n    iSpeed = iSpeed > 0 ? Math.ceil(iSpeed) : Math.floor(iSpeed);\n    oThis.oUl.offsetTop == iTarget ? clearInterval(oThis.timer) : (oThis.oUl.style.top = oThis.oUl.offsetTop + iSpeed + \"px\")\n    }, 30)\n    }\n    };\n    window.onload = function ()\n    {\n    new AutoPlay(\"box\");\n    };\n        </script>\n        <body bgcolor=white>\n    <div id=\"box\">\n    <div class=\"list\">\n    <ul>\n    <li><a href=\"http://www.xyxsoft.com/vod-read-id-15336.html\" target=\"_blank\"><img src=\"http://www.xyxsoft.com/wumingfeng/4f07632ab8166.jpg\" /></a></li>\n    <li><a href=\"http://www.xyxsoft.com/vod-read-id-13274.html\" target=\"_blank\"><img \n\nsrc=\"http://www.xyxsoft.com/wumingfeng/4f0764bd6c9eb.jpg\" /></a></li>\n    <li><a href=\"http://www.xyxsoft.com/vod-read-id-13399.html\" target=\"_blank\"><img \n\nsrc=\"http://www.xyxsoft.com/wumingfeng/5.jpg\" /></a></li>\n    <li><a href=\"http://www.xyxsoft.com/vod-read-id-50824.html\" target=\"_blank\"><img \n\nsrc=\"http://www.xyxsoft.com/wumingfeng/untitled.png\" /></a></li>\n    <li><a href=\"http://www.xyxsoft.com/vod-read-id-15633.html\" target=\"_blank\"><img \n\nsrc=\"http://www.xyxsoft.com/wumingfeng/3.jpg\" /></a></li>\n    <li><a href=\"http://www.xyxsoft.com/vod-read-id-15949.html\" target=\"_blank\"><img src=\"http://www.xyxsoft.com/wumingfeng/xinliangjian.jpg\" /></a></li>\n    <li><a href=\"http://www.xyxsoft.com/vod-read-id-12090.html\" target=\"_blank\"><img src=\"http://www.xyxsoft.com/wumingfeng/datangnvjiang.jpg\" /></a></li>\n    <li><a href=\"http://www.xyxsoft.com/vod-read-id-46578.html\" target=\"_blank\"><img src=\"http://www.xyxsoft.com/wumingfeng/4f0942f64fcb7.jpg\" /></a></li>\n    <li><a href=\"http://www.xyxsoft.com/vod-read-id-12722.html\" target=\"_blank\"><img src=\"http://www.xyxsoft.com/wumingfeng/2011100216254579.jpg\" /></a></li>\n<li><a href=\"http://www.xyxsoft.com/vod-read-id-11078.html\" target=\"_blank\"><img src=\"http://www.xyxsoft.com/wumingfeng/2011100216093829.jpg\" /></a></li>\n\n\n\n    </ul>\n\n    </div>\n    </div>");
