function tab(obj1,name)
  {
   var b = obj1.parentNode.getElementsByTagName("a");
   var divs = document.getElementById(name).getElementsByTagName("div");
   var v= Array();
   j=0;
   for(i=0;i<divs.length;i++)
   {
	   if(divs[i].className=='conBody') 
	   {
		   v[j]=divs[i];
	   	   j+=1;
	   }
   }
 
   for(i=0;i<v.length;i++)
   {
    if(obj1==b[i])
    {
	 if (b[i].className == "nn")
     b[i].className = "nnD";
	 if (b[i].className == "nnC")
	 b[i].className = "nnCD";
     v[i].style.display = "block";
    }
    else
    {
     if (b[i].className == "nnD")
     b[i].className = "nn";
	 if (b[i].className == "nnCD")
	 b[i].className = "nnC";
     v[i].style.display = "none";
    }
   }
  }  
function showDiv(obj1,name)
  {
   var b = obj1.parentNode.getElementsByTagName("a");
   var divs = document.getElementById(name).getElementsByTagName("div");
   var v= Array();
   j=0;
   for(i=0;i<divs.length;i++)
   {
	   if(divs[i].className=='listcon') 
	   {
		   v[j]=divs[i];
	   	   j+=1;
	   }
   }
 
   for(i=0;i<v.length;i++)
   {
    if(obj1==b[i])
    {
	 if (b[i].className == "nnCR")
     b[i].className = "nnDR";
     v[i].style.display = "block";
    }
    else
    {
	 if (b[i].className == "nnDR")
	 b[i].className = "nnCR";
     v[i].style.display = "none";
    }
   }
  }  
function changeCN(objl,FCN,ECN){
	var b = objl.parentNode.getElementsByTagName("a");
	for (i=0;i<b.length;i++){
		if(objl==b[i]){
			b[i].className=ECN;
		}
		else
		{
			b[i].className=FCN;
		}
	}
}
function TabTag()
{
	this.tabID;
	this.contentID;
	this.curTabIndex=0;
	this.curTabClassName;
	this.tabClassName;
	this.curContentClassName='show';
	this.contentClassName='hide';
	this.tabTag='li';
	this.contentTag='div';
	this.tabevent='click';
}
TabTag.prototype.Start=function(showIndex)
{
	if(showIndex!=null&&showIndex>=0)
		this.curTabIndex=showIndex;
	if(this.tabID)
	{
		var tabObj=document.getElementById(this.tabID);
		if(this.contentID)
		{
			var contentObj=document.getElementById(this.contentID);
		}
		
		var tabs=tabObj.getElementsByTagName(this.tabTag);
		var tem=contentObj.childNodes;
		var contents=tem;
		for(var i=0;i<tabs.length;i++)
		{
			tabs[i].index=i;			

		}
		var context=this;
		for(var i=0;i<tabs.length;i++)
		{
			if(this.tabevent=='click')
			{	
				tabs[i].onclick=function()
				{
					for(var j=0;j<tabs.length;j++)
					{
						contents[j].className=context.contentClassName;
						tabs[j].className=context.tabClassName;
					}
						contents[this.index].className=context.curContentClassName;
						tabs[this.index].className=context.curTabClassName;
				}
			}
			if(this.tabevent=='mouse')
			{
				tabs[i].onmouseover=function()
				{
					for(var j=0;j<tabs.length;j++)
					{
						contents[j].className=context.contentClassName;
						tabs[j].className=context.tabClassName;
					}
						contents[this.index].className=context.curContentClassName;
						tabs[this.index].className=context.curTabClassName;
				}
			}
		}
		for(var j=0;j<tabs.length;j++)
		{
			contents[j].className=context.contentClassName;
			tabs[j].className=context.tabClassName;
		}
			contents[this.curTabIndex].className=context.curContentClassName;
			tabs[this.curTabIndex].className=context.curTabClassName;
	}
}
function ScrollText(content,btnPrevious,btnNext,autoStart)
{
    this.Delay = 10;
    this.LineHeight = 20;
	this.Amount = 1;//注意:LineHeight一定要能整除Amount.
	this.Direction = "up";
    this.Timeout = 1500;
    this.ScrollContent = this.$(content);
    this.ScrollContent.innerHTML += this.ScrollContent.innerHTML;
    //this.ScrollContent.scrollTop = 0;
    if(btnNext)
    {
        this.NextButton = this.$(btnNext);
        this.NextButton.onclick = this.GetFunction(this,"Next");
        this.NextButton.onmouseover = this.GetFunction(this,"Stop");
        this.NextButton.onmouseout = this.GetFunction(this,"Start");
    }
    if(btnPrevious)
    {
        this.PreviousButton = this.$(btnPrevious);
        this.PreviousButton.onclick = this.GetFunction(this,"Previous");
        this.PreviousButton.onmouseover = this.GetFunction(this,"Stop");
        this.PreviousButton.onmouseout = this.GetFunction(this,"Start");
    }
    this.ScrollContent.onmouseover = this.GetFunction(this,"Stop");
    this.ScrollContent.onmouseout = this.GetFunction(this,"Start");
    if(autoStart)
    {
        this.Start();
    }
}

ScrollText.prototype.$ = function(element)
{
    return document.getElementById(element);
}

ScrollText.prototype.Previous = function()
{
    clearTimeout(this.AutoScrollTimer);
    clearTimeout(this.ScrollTimer);
    this.Scroll("up");
}

ScrollText.prototype.Next = function()
{
    clearTimeout(this.AutoScrollTimer);
    clearTimeout(this.ScrollTimer);
    this.Scroll("down");
}

ScrollText.prototype.Start = function()
{
    clearTimeout(this.AutoScrollTimer);
    this.AutoScrollTimer = setTimeout(this.GetFunction(this,"AutoScroll"), this.Timeout);
}

ScrollText.prototype.Stop = function()
{
    clearTimeout(this.ScrollTimer);
    clearTimeout(this.AutoScrollTimer);
}

ScrollText.prototype.AutoScroll = function()
{
    if(this.Direction == "up")
    {
        if(parseInt(this.ScrollContent.scrollTop) >= parseInt(this.ScrollContent.scrollHeight) / 2)
        {
            this.ScrollContent.scrollTop = 0;
        }
        this.ScrollContent.scrollTop += this.Amount;
    }
    else
    {
        if(parseInt(this.ScrollContent.scrollTop) <= 0)
        {
            this.ScrollContent.scrollTop = parseInt(this.ScrollContent.scrollHeight) / 2;
        }
        this.ScrollContent.scrollTop -= this.Amount;
    }
    if(parseInt(this.ScrollContent.scrollTop) % this.LineHeight != 0)
    {
        this.ScrollTimer = setTimeout(this.GetFunction(this,"AutoScroll"), this.Delay);
    }
    else
    {
        this.AutoScrollTimer = setTimeout(this.GetFunction(this,"AutoScroll"), this.Timeout);
    }
}

ScrollText.prototype.Scroll = function(direction)
{
    if(direction=="up")
    {
        if(this.ScrollContent.scrollTop == 0)
        {
            this.ScrollContent.scrollTop = parseInt(this.ScrollContent.scrollHeight) / 2;
        }
        this.ScrollContent.scrollTop -= this.Amount;
    }
    else
    {
        this.ScrollContent.scrollTop += this.Amount;
    }
    if(parseInt(this.ScrollContent.scrollTop) >= parseInt(this.ScrollContent.scrollHeight) / 2)
        {
            this.ScrollContent.scrollTop = 0;
        }
    if(parseInt(this.ScrollContent.scrollTop) % this.LineHeight != 0)
    {
        this.ScrollTimer = setTimeout(this.GetFunction(this,"Scroll",direction), this.Delay);
    }
}

ScrollText.prototype.GetFunction = function(variable,method,param)
{
    return function()
    {
        variable[method](param);
    }
}