
function nTabs(thisObj,Num){
if(thisObj.className == "active")return;
var tabObj = thisObj.parentNode.id;
var tabList = document.getElementById(tabObj).getElementsByTagName("li");
for(i=0; i <tabList.length; i++)
{
  if (i == Num)
  {
   thisObj.className = "active"; 
      document.getElementById(tabObj+"_Content"+i).style.display = "block";
  }else{
   tabList[i].className = "normal"; 
   document.getElementById(tabObj+"_Content"+i).style.display = "none";
  }
} 
}

//横向滚动广告
function hbhmao_scroll(divId, width) {
			this.divId = divId;
			this.width = width;
			this.amount = 20;
			this.delay =1;
			this.direction = "left";

			this.max = 0;
			this.si = null;
		}
		hbhmao_scroll.prototype = {
			run: function() {
				var _this = this;
				var div = _this.$(_this.divId);
				div.style.width = _this.width + "px";
				div.style.overflow = "hidden";
				var table = '<table width="' + _this.width + '" border="0" cellspacing="0" cellpadding="0"><tr><td style="white-space:nowrap;">' + div.innerHTML + '</td></tr></table>';
				var htm = '<table width="' + _this.width + '" border="0" cellspacing="0" cellpadding="0"><tr><td>' + table + '</td><td>' + table + '</td></tr></table>';
				div.innerHTML = htm;
				var m = div.getElementsByTagName("table")[0].getElementsByTagName("td")[0].offsetWidth;
				if (m > _this.width) {
					_this.max = m;
				}
				else {
					div.scrollLeft = 999999;
					_this.max = div.scrollLeft;
				}
				_this.start(_this);
				div.onmouseout = function() {
					_this.start(_this);
				};
				div.onmouseover = function() {
					clearInterval(_this.si);
				};
			},
			start: function(_this) {
				_this.si = setInterval(function() {
					if (_this.direction == "left") {
						if (_this.$(_this.divId).scrollLeft < _this.max) {
							_this.$(_this.divId).scrollLeft += _this.delay;
						}
						else {
							_this.$(_this.divId).scrollLeft = 0;
						}
					}
					else if (_this.direction == "right") {
						if (_this.$(_this.divId).scrollLeft > 0) {
							_this.$(_this.divId).scrollLeft -= _this.delay;
						}
						else {
							_this.$(_this.divId).scrollLeft = _this.max;
						}
					}
				}, _this.amount);
			},
			$: function(id) {
				return "string" == typeof id ? document.getElementById(id) : id;
			}
		};
		
		/**********
window.onload = function() {
    changeColor('ct');
    changeColor('ct2');
    changeColor('ct3');
	changeColor('ct4');
	changeColor('ct4');
	changeColor('ct5');
	changeColor('ct6');
	changeColor('ct7');
}***********/
function changeColor(id) {
    var arrayli = document.getElementById(id).getElementsByTagName('dl');
        var bool = false; //奇数行为true
        var oldStyle; //保存原有样式
        for(var i = 0;i<arrayli.length;i++){
            //各行变色
            if(bool === true){
                arrayli[i].className = "change";
                bool = false;
            }
            else {
                arrayli[i].className = "";
                bool = true;    
            }
            //划过变色
            arrayli[i].onmouseover = function() {
                oldStyle = this.className;
                this.className = "current"
            } 
            arrayli[i].onmouseout = function() {
                this.className = oldStyle;
            } 
        }
}
