document.writeln("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">");
document.writeln("<html xmlns=\"http://www.w3.org/1999/xhtml\">");
document.writeln("<head>");
document.writeln("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\" />");
document.writeln("<title></title>");
document.writeln("</head>");
document.writeln("<body>");
document.writeln("<script type=\"text/javascript\">");
document.writeln("var $ = function (id) {");
document.writeln("    return \"string\" == typeof id ? document.getElementById(id) : id;");
document.writeln("};");
document.writeln("");
document.writeln("var Class = {");
document.writeln("  create: function() {");
document.writeln("    return function() {");
document.writeln("      this.initialize.apply(this, arguments);");
document.writeln("    }");
document.writeln("  }");
document.writeln("}");
document.writeln("");
document.writeln("Object.extend = function(destination, source) {");
document.writeln("    for (var property in source) {");
document.writeln("        destination[property] = source[property];");
document.writeln("    }");
document.writeln("    return destination;");
document.writeln("}");
document.writeln("");
document.writeln("function addEventHandler(oTarget, sEventType, fnHandler) {");
document.writeln("    if (oTarget.addEventListener) {");
document.writeln("        oTarget.addEventListener(sEventType, fnHandler, false);");
document.writeln("    } else if (oTarget.attachEvent) {");
document.writeln("        oTarget.attachEvent(\"on\" + sEventType, fnHandler);");
document.writeln("    } else {");
document.writeln("        oTarget[\"on\" + sEventType] = fnHandler;");
document.writeln("    }");
document.writeln("};");
document.writeln("");
document.writeln("");
document.writeln("var Scroller = Class.create();");
document.writeln("Scroller.prototype = {");
document.writeln("  initialize: function(idScroller, idScrollMid, options) {");
document.writeln("    var oScroll = this, oScroller = $(idScroller), oScrollMid = $(idScrollMid);");
document.writeln("    ");
document.writeln("    this.heightScroller = oScroller.offsetHeight;");
document.writeln("    this.heightList = oScrollMid.offsetHeight;");
document.writeln("    ");
document.writeln("    if(this.heightList <= this.heightScroller) return;");
document.writeln("    ");
document.writeln("    oScroller.style.overflow = \"hidden\";");
document.writeln("    oScrollMid.appendChild(oScrollMid.cloneNode(true));");
document.writeln("    ");
document.writeln("    this.oScroller = oScroller;    ");
document.writeln("    this.timer = null;");
document.writeln("    ");
document.writeln("    this.SetOptions(options);");
document.writeln("    ");
document.writeln("    this.side = 1;//1是上 -1是下");
document.writeln("    switch (this.options.Side) {");
document.writeln("        case \"down\" :");
document.writeln("            this.side = -1;");
document.writeln("            break;");
document.writeln("        case \"up\" :");
document.writeln("        default :");
document.writeln("            this.side = 1;");
document.writeln("    }");
document.writeln("    ");
document.writeln("    addEventHandler(oScrollMid , \"mouseover\", function() { oScroll.Stop(); });");
document.writeln("    addEventHandler(oScrollMid , \"mouseout\", function() { oScroll.Start(); });");
document.writeln("    ");
document.writeln("    if(this.options.PauseStep <= 0 || this.options.PauseHeight <= 0) this.options.PauseStep = this.options.PauseHeight = 0;");
document.writeln("    this.Pause = 0;");
document.writeln("    ");
document.writeln("    this.Start();");
document.writeln("  },");
document.writeln("  //设置默认属性");
document.writeln("  SetOptions: function(options) {");
document.writeln("    this.options = {//默认值");
document.writeln("      Step:            1,//每次变化的px量");
document.writeln("      Time:            50,//速度(越大越慢)");
document.writeln("      Side:            \"up\",//滚动方向:\"up\"是上，\"down\"是下");
document.writeln("      PauseHeight:    0,//隔多高停一次");
document.writeln("      PauseStep:    4000//停顿时间(PauseHeight大于0该参数才有效)");
document.writeln("    };");
document.writeln("    Object.extend(this.options, options || {});");
document.writeln("  },");
document.writeln("  //滚动");
document.writeln("  Scroll: function() {");
document.writeln("    var iScroll = this.oScroller.scrollTop, iHeight = this.heightList, time = this.options.Time, oScroll = this, iStep = this.options.Step * this.side;");
document.writeln("    ");
document.writeln("    if(this.side > 0){");
document.writeln("        if(iScroll >= (iHeight * 2 - this.heightScroller)){ iScroll -= iHeight; }");
document.writeln("    } else {");
document.writeln("        if(iScroll <= 0){ iScroll += iHeight; }");
document.writeln("    }");
document.writeln("    ");
document.writeln("    if(this.options.PauseHeight > 0){");
document.writeln("        if(this.Pause >= this.options.PauseHeight){");
document.writeln("            time = this.options.PauseStep;");
document.writeln("            this.Pause = 0;");
document.writeln("        } else {");
document.writeln("            this.Pause += Math.abs(iStep);");
document.writeln("            this.oScroller.scrollTop = iScroll + iStep;");
document.writeln("        }");
document.writeln("    } else { this.oScroller.scrollTop = iScroll + iStep; }");
document.writeln("    ");
document.writeln("    this.timer = window.setTimeout(function(){ oScroll.Scroll(); }, time);");
document.writeln("  },");
document.writeln("  //开始");
document.writeln("  Start: function() {");
document.writeln("    this.Scroll();");
document.writeln("  },");
document.writeln("  //停止");
document.writeln("  Stop: function() {");
document.writeln("    clearTimeout(this.timer);");
document.writeln("  }");
document.writeln("};");
document.writeln("");
document.writeln("window.onload = function(){");
document.writeln("    new Scroller(\"idScroller\", \"idScrollMid\",{ PauseHeight:25 });");
document.writeln("}");
document.writeln("</script>");
document.writeln("<style>");
document.writeln("#idScroller *{margin:0px; padding:0px;}");
document.writeln("#idScroller{line-height:25px;width:300px; height:25px; overflow:hidden; border:0px solid #000000;}");
document.writeln("#idScroller ul{width:100%}");
document.writeln("#idScroller li{width:100%;  float:left; overflow:hidden; list-style:none;}");
document.writeln("</style>");
document.writeln("<div id=\"idScroller\">");
document.writeln("  <div id=\"idScrollMid\">");
document.writeln("    <ul>");
document.writeln("      <li><a href=\"http://s8.taobao.com/search?q=t%D0%F4&commend=all&mode=66&pid=mm_17119339_0_0&unid=0&start_price=1&end_price=15&filter=reserve_price%5B1%2C15%5D\" target=\"_blank\"><font color=\"#0033FF\">10元T恤任你选。</font></a><img src=\"/upload/hott.gif\" border=0></li>");
document.writeln("      <li><a href=\"http://www.jpwz5.com/\" target=\"_blank\"><font color=\"#29B531\">精品文章屋——一个绿色文章阅读平台。</font></a></li>");
document.writeln("      <li><a href=\"/tao/\" target=\"_blank\"><font color=\"#000000\">淘宝网精选，淘你喜欢的...</font></a></li>");
document.writeln("      <li><a href=\"/sdo.htm\" target=\"_blank\"><font color=\"#000000\">盛大游戏白金账号免费注册|经验|道具免费领</font></a></li>");
document.writeln("      <li><a href=\"/wish/\" target=\"_blank\"><font color=\"#63b5ff\">发牢骚|祝福|许愿|表白|感恩|祈祷……</font></a></li>");
document.writeln("    </ul>");
document.writeln("    <div style=\"clear:both;\"></div>");
document.writeln("  </div>");
document.writeln("</div>");
document.writeln("</body>");
document.writeln("</html>");
