document.write('<style>');
document.write('#album{ position:relative;width: 458px; height:180px; border:3px solid #EFEFDA;overflow:hidden;}');
document.write('#album dt {margin:0;padding:0;width:100%;height:100%;overflow:hidden;}');
document.write('#album img {border:0px; width:100%;height:100%;cursor:pointer;}');
document.write('#album dd {position:absolute;right:0px;bottom:10px;}');
document.write('#album a {display:block;float:left;margin-right:10px;width:15px;height:18px;font-size:10pt;line-height:15px;text-align:center;');
document.write('text-decoration:none;color:#808080;background:transparent url(js/o_button.gif) no-repeat -15px 0;}');
document.write('#album a:hover ,#album a.hover{color:#F8F8F8;background-position:0 0;}');
document.write('</style>');

document.write("<dl id='album'>");
 document.write("<dt>");
document.write("<img id='index1' onclick=\"goToTheUrl('http://abc.wm23.com/login.aspx');\" alt='中国互联网协会大学生网络营销能力秀' src='/uploadfile/image/S_20119161017209267.jpg' />");
document.write("<img id='index2' onclick=\"goToTheUrl('http://www.lishiwuyu.com/');\" alt='礼氏物语——大学生网络营销能力秀指定实践平台' src='/uploadfile/image/S_20119161017421571.jpg' />");
document.write("<img id='index3' onclick=\"goToTheUrl('http://www.wutongzi.com/');\" alt='梧桐子能力秀专题' src='/uploadfile/image/S_2011922945594670.jpg' />");
document.write("</dt>");
 document.write("<dd>");
 document.write("<a href='http://abc.wm23.com/login.aspx'>1</a>");
document.write("<a href='http://www.lishiwuyu.com/'>2</a>");
document.write("<a href='http://www.wutongzi.com/'>3</a>");
document.write("</dd>");
 document.write("</dl>");


function goToTheUrl(url)
{
    window.open(url);
}
  function imageRotater(id){
    var cases = "",
    album = document.getElementById(id),
    images = album.getElementsByTagName("img"),
    links = album.getElementsByTagName("a"),
    dt = album.getElementsByTagName("dt")[0],
    length = images.length,
    aIndex = 1,
    aBefore = length;
    for(var i=0;i< length;i++){
      cases += images[i].id + ':"'+images[i].getAttribute("src")+'",'
    }
    images[0].style.cssText = "position:absolute;top:0;left:0;";
    var tip = document.createElement("dd");
    tip.style.cssText = "position:absolute;bottom:0;height:15px;width:96%;padding:10px;color:#fff;background:#fff;";
    album.insertBefore(tip,dt.nextSibling);
    if(!+"\v1"){
      tip.style.color = "#369";
      tip.style.filter = "alpha(opacity=67)"
    }else{
      tip.style.cssText += "background: rgba(164, 173, 183, .65);"
    }
    cases = eval("({"+cases.replace(/,$/,"")+"})"); 
    for(var i=0;i<length;i++){ 
      links[i].onclick = function(e){
        e =e || window.event;
        var index = this.toString().split("#")[1];
        aIndex = index.charAt(index.length-1);
        images[0].src = cases[index];
        tip.innerHTML = images[aIndex -1].getAttribute("alt");
          !+"\v1" ?(e.returnValue = false) :(e.preventDefault());
      }
    }
    var prefix = images[0].id.substr(0,images[0].id.length -1);
    (function(){
      setTimeout(function(){
        if(aIndex > length){
          aIndex = 1;
        }
        images[0].src = cases[prefix+aIndex];
        tip.innerHTML = images[aIndex -1].getAttribute("alt");
        tip.style.bottom = "-40px";
        links[aBefore-1].className = "";
        links[aIndex-1].className = "hover";
        aBefore = aIndex;
        aIndex++;
        move(tip);
        setTimeout(arguments.callee,4000)
      },1500)
    })()

    var move = function(el){
      var begin = parseFloat(el.style.bottom),
      speed = 1;
      el.bottom = begin;
      (function(){
        setTimeout(function(){
          el.style.bottom = el.bottom + speed + "px";
          el.bottom += speed;
          speed *= 1.5;
          if(el.bottom >= 0){
            el.style.bottom = "0px";
          }else{
            setTimeout(arguments.callee,25);
          }
        },25)
      })()
    }
  }
  window.onload = function(){
    try{document.execCommand("BackgroundImageCache", false, true);}catch(e){};
    imageRotater("album");
  }


