window.onload = function()
{ 
new couplet("maple1",10,8); 
new couplet("maple2",10,-8); 
new Marquee(document.getElementById("scrolldiv2")).autoScroll();
new Marquee(document.getElementById("scrolldiv")).autoScroll();
new scrollleft();
} 

function Marquee(content, speed){
this.speed = speed || 20; //default value
this.content = content;
this.content.innerHTML += this.content.innerHTML;
this.content.scrollTop = 0;
this.threadScroll = null;
}
Marquee.prototype= {
start: function(){
if(parseInt(this.content.scrollTop) >= (parseInt(this.content.scrollHeight) / 2) )
this.content.scrollTop = 0;
this.content.scrollTop++;
},
stop: function(){
if (this.threadScroll != null){
clearInterval(this.threadScroll);
threadScroll = null;
}
},
autoScroll: function(){
var self = this;
this.threadScroll = setInterval(function(){self.start()}, this.speed);
this.content .onmousemove = function(){self.stop()};
this.content .onmouseout = function(){self.autoScroll()};
}
}

function scrollleft()
{
  var speed=25
  xiangguan2.innerHTML=xiangguan1.innerHTML
  function Marquee1(){
  if(xiangguan2.offsetWidth-xiangguan.scrollLeft<=0)
  xiangguan.scrollLeft-=xiangguan1.offsetWidth
  else{
  xiangguan.scrollLeft++
  }
  }
  var MyMar1=setInterval(Marquee1,speed)
  xiangguan.onmouseover=function() {clearInterval(MyMar1)}
  xiangguan.onmouseout=function() {MyMar1=setInterval(Marquee1,speed)
  }
}


function nTabs(tabObj,obj){
        var tabList = document.getElementById(tabObj).getElementsByTagName("li");
        for(i=0; i <tabList.length; i++)
        {
                if (tabList[i].id == obj.id)
                {
                        document.getElementById(tabObj+"_Title"+i).className = "active"; 
                    document.getElementById(tabObj+"_Content"+i).style.display = "block";
                }else{
                        document.getElementById(tabObj+"_Title"+i).className = "normal"; 
                        document.getElementById(tabObj+"_Content"+i).style.display = "none";
                }
        } 
}

function WOpen(UrlStr){
 window.open(""+UrlStr+"")
}