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"; 
  } 
} 
} 
//             滑动门  JS 



function isMatch(str1,str2) 
{  
var index = str1.indexOf(str2); 
if(index==-1) return false; 
return true; 
} 
function ResumeError() { 
return true; 
} 
window.onerror = ResumeError; 
function $(id) {
    return document.getElementById(id);
}
//相对尺寸
function GetOffsetTop (el, p) {
    var _t = el.offsetTop;
    var _p = el.offsetParent;
    while (_p) {
        if (_p == p) break;
        _t += _p.offsetTop;
        _p = _p.offsetParent;
    }
    return _t;
};
function GetOffsetLeft (el, p) {
    var _l = el.offsetLeft;
    var _p = el.offsetParent;
    while (_p) {
        if (_p == p) break;
        _l += _p.offsetLeft;
        _p = _p.offsetParent;
    }
    return _l;
};
function showMenu (baseID, divID) {
    baseID = $(baseID);
    divID  = $(divID);
    //var l = GetOffsetLeft(baseID);
    //var t = GetOffsetTop(baseID);
    //divID.style.left = l + 'px';
    //divID.style.top = t + baseID.offsetHeight + 'px';
    if (showMenu.timer) clearTimeout(showMenu.timer);
	hideCur();
    divID.style.display = 'block';
	showMenu.cur = divID;
    if (! divID.isCreate) {
        divID.isCreate = true;
        //divID.timer = 0;
        divID.onmouseover = function () {
            if (showMenu.timer) clearTimeout(showMenu.timer);
			hideCur();
            divID.style.display = 'block';
        };
        function hide () {
            showMenu.timer = setTimeout(function () {divID.style.display = 'none';}, 1000);
        }
        divID.onmouseout = hide;
        baseID.onmouseout = hide;
    }
	function hideCur () {
		showMenu.cur && (showMenu.cur.style.display = 'none');
	}
}
function doClick_down(o){
	 o.className="current";
	 var j;
	 var id;
	 var e;
	 for(var i=1;i<=4;i++){
	   id ="down"+i;
	   j = document.getElementById(id);
	   e = document.getElementById("d_con"+i);
	   if(id != o.id){
	   	 j.className="";
	   	 e.style.display = "none";
	   }else{
		e.style.display = "block";
	   }
	 }
	 }
	 
function doClick_jy(o){
	 o.className="current";
	 var j;
	 var id;
	 var e;
	 for(var i=1;i<=8;i++){
	   id ="jy"+i;
	   j = document.getElementById(id);
	   e = document.getElementById("jy_con"+i);
	   if(id != o.id){
	   	 j.className="";
	   	 e.style.display = "none";
	   }else{
		e.style.display = "block";
	   }
	 }
	 }
function doZoom(size){
	document.getElementById('textbody').style.fontSize=size+'px'
}

function doClick_submit () {
    var keyword = document.getElementsByName('keyword')[0].value;
    window.open(doClick_submit.url + keyword);
}
window.onload = function (){
	var keyword = document.getElementsByName('keyword')[0];
	keyword.onkeydown = function (e) {
		e = e || window.event;
		if (e.keyCode == 13) {
			doClick_submit();
		}
	};
}

//导航下拉菜单




var $ = function(id) {
    return "string" == typeof id ? document.getElementById(id) : id;
};
var Class = {
    create: function() {
        return function() {
            this.initialize.apply(this, arguments);
        }
    }
}
Object.extend = function(destination, source) {
    for (var property in source) {
        destination[property] = source[property];
    }
    return destination;
}
var TransformView = Class.create();
TransformView.prototype = {
    initialize: function(container, slider, parameter, count, options) {
        if (parameter <= 0 || count <= 0) return;
        var oContainer = $(container),
        oSlider = $(slider),
        oThis = this;
        this.Index = 0;
        this._timer = null;
        this._slider = oSlider;
        this._parameter = parameter;
        this._count = count || 0;
        this._target = 0;
        this.SetOptions(options);
        this.Up = !!this.options.Up;
        this.Step = Math.abs(this.options.Step);
        this.Time = Math.abs(this.options.Time);
        this.Auto = !!this.options.Auto;
        this.Pause = Math.abs(this.options.Pause);
        this.onStart = this.options.onStart;
        this.onFinish = this.options.onFinish;
        oContainer.style.overflow = "hidden";
        oContainer.style.position = "relative";
        oSlider.style.position = "absolute";
        oSlider.style.top = oSlider.style.left = 0;
    },
    SetOptions: function(options) {
        this.options = {
            Up: true,
            Step: 3,
            Time: 10,
            Auto: true,
            Pause: 5000,
            onStart: function() {},
            onFinish: function() {}
        };
        Object.extend(this.options, options || {});
    },
    Start: function() {
        if (this.Index < 0) {
            this.Index = this._count - 1;
        } else if (this.Index >= this._count) {
            this.Index = 0;
        }
        this._target = -1 * this._parameter * this.Index;
        this.onStart();
        this.Move();
    },
    Move: function() {
        clearTimeout(this._timer);
        var oThis = this,
        style = this.Up ? "top": "left",
        iNow = parseInt(this._slider.style[style]) || 0,
        iStep = this.GetStep(this._target, iNow);
        if (iStep != 0) {
            this._slider.style[style] = (iNow + iStep) + "px";
            this._timer = setTimeout(function() {
                oThis.Move();
            },
            this.Time);
        } else {
            this._slider.style[style] = this._target + "px";
            this.onFinish();
            if (this.Auto) {
                this._timer = setTimeout(function() {
                    oThis.Index++;
                    oThis.Start();
                },
                this.Pause);
            }
        }
    },
    GetStep: function(iTarget, iNow) {
        var iStep = (iTarget - iNow) / this.Step;
        if (iStep == 0) return 0;
        if (Math.abs(iStep) < 1) return (iStep > 0 ? 1 : -1);
        return iStep;
    },
    Stop: function(iTarget, iNow) {
        clearTimeout(this._timer);
        this._slider.style[this.Up ? "top": "left"] = this._target + "px";
    }
};
function Each(list, fun) {
    for (var i = 0,
    len = list.length; i < len; i++) {
        fun(list[i], i);
    }
};
function LoadPicRun(TDiv, TImg, TNum, TW, TC) {
    var objs2 = $(TNum).getElementsByTagName("li");
    var tv2 = new TransformView(TDiv, TImg, TW, TC, {
        onStart: function() {
            Each(objs2,
            function(o, i) {
                o.className = tv2.Index == i ? "on": "";
            })
        },
        Up: false
    });
    tv2.Start();
    Each(objs2,
    function(o, i) {
        o.onmouseover = function() {
            o.className = "on";
            tv2.Auto = false;
            tv2.Index = i;
            tv2.Start();
        }
        o.onmouseout = function() {
            o.className = "";
            tv2.Auto = true;
            tv2.Start();
        }
    })
}
//          banner图片滑动  JS




function correctPNG()
{ 
var arVersion = navigator.appVersion.split("MSIE") 
var version = parseFloat(arVersion[1]) 
if ((version >= 5.5) && (document.body.filters)) 
{ 
for(var j=0; j<document.images.length; j++) 
{ 
var img = document.images[j] 
var imgName = img.src.toUpperCase() 
if (imgName.substring(imgName.length-3, imgName.length) == "PNG") 
{ 
var imgID = (img.id) ? "id='" + img.id + "' " : "" 
var imgClass = (img.className) ? "class='" + img.className + "' " : "" 
var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' " 
var imgStyle = "display:inline-block;" + img.style.cssText 
if (img.align == "left") imgStyle = "float:left;" + imgStyle 
if (img.align == "right") imgStyle = "float:right;" + imgStyle 
if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle 
var strNewHTML = "<span " + imgID + imgClass + imgTitle 
+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";" 
+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" 
+ "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
img.outerHTML = strNewHTML 
j = j-1 
} 
} 
}     
} 
window.attachEvent("onload", correctPNG); 
//           PNG图片透明 IE 5.5 & 6.



