if(typeof MVP=="undefined"||!MVP){var MVP={}};
MVP.nameSpace=function(){
    var A=arguments,E=null,D,J=A.length;
    for(C=0;C<J;C++){
        D=A[C].split(".");
        E=MVP,L=D.length;
        for(B=(D[0]=="MVP")?1:0;B<L;B++){
            E[D[B]]=E[D[B]]||{};
            E=E[D[B]]
        }
    }
    return E;
};
MVP.nameSpace("b");//BOM(Brower Object Model)
(function() { //TB js
    var ua = navigator.userAgent.toLowerCase();
    MVP.b={
        version: (ua.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1],
        isSaf: /webkit/.test( ua ),
        isOpe: /opera/.test( ua ),
        isIE: /msie/.test( ua ) && !/opera/.test( ua ),
        isMoz: /mozilla/.test( ua ) && !/(compatible|webkit)/.test( ua ),
        isIE6: /msie 6/.test( ua ) && !/opera/.test( ua ),//ua.indexOf("msie 6") != -1
        isIE7: /msie 7/.test( ua ) && !/opera/.test( ua ),
            //Usage Expale:
            //if (MVP.b.isMoz) {alert("browse is FF.")}
        getCookie: function(N) {
            var i = document.cookie.match("(?:^|;)\\s*" + N + "=([^;]*)");
            return i ? unescape(i[1]) : ""
        },
        setCookie: function(N, V, E, D, P) {//name,value,expires,domain,path
            V = escape(V);
            V += (D) ? "; domain=" + D: "";
            V += (P) ? "; path=" + P: "";
            if (E) {
                var i = new Date();
                i.setTime(i.getTime() + (E * 86400000));
                V += "; expires=" + i.toGMTString()
            }
            document.cookie = N + "=" + l
            //TB.b.setCookie('tg', tg+1, 100, document.domain, '');
        },
        removeCookie: function(N) {
            this.setCookie(N, "", -1)
        },
        addBookmark: function(N, U) {//name,url
            if (window.sidebar) {
                window.sidebar.addPanel(N, U, "")
            } else {
                if (document.external) {
                    window.external.AddFavorite(U, N)
                } else {}
            }
        }
    }
})();
MVP.nameSpace("d");//Dom
MVP.d={
    version : "9",
    G:function(N){//IdName, var $=G=function(N){return(typeof N==="string")?document.getElementById(N):N};
        return(typeof N==="string")?document.getElementById(N):N;
    },
    C:function(E,T,N){//element, tagName, className
        var A=[],C=(E||document).getElementsByTagName(T||"*"),B,L=C.length;
        for(B=0;B<L;B++) {//(var i=0; i<_el.length; i++)
            if(MVP.d.hasClassName(C[B],N)){A.push(C[B]);}
        };
        return A;
    },
        //Usage Expale://MVP.d.C('','a','test'); //获取document内超链接class是“test”的
        //MVP.d.C(MVP.d.G('AAA'),'span','test'); //获取id="AAA"内class含“test”的所有span
        //MVP.d.C('','div','test')[0].style.display='none'//隐藏 第1个class含"text"的div

    hasClassName:function (E,N){//element, className
        return new RegExp('(\\s|)'+N+'(\\s|$)').test(E.className);
    },
    addClassName:function(E,N) {//element, className
        if(!E||MVP.d.hasClassName(E,N)){return;}
        E.className+=E.className?' '+N:N;
    },
    removeClassName:function(E,N) {//element, className
        if(!E||!MVP.d.hasClassName(E,N)){return};
        E.className = E.className.replace(new RegExp('(\\s|)'+N+'(\\s|$)'),' ');
    },
    replaceClassName:function (E,O,N){//element, oldClassName , newClassName
            MVP.d.removeClassName(E,O);
            MVP.d.addClassName(E,N);
    },
    getStyle:function(){ //支持:margin-left|marginLeft,border-left|borderLeft
        var f=document.defaultView; //Safari不支持document.defaultView
        return new Function('el','style',[
            "style.indexOf('-')>-1 && (style=style.replace(/-(\\w)/g,function(m,a){return a.toUpperCase()}));",
            "style=='float' && (style='",
            f ? 'cssFloat' : 'styleFloat',
            "');return el.style[style] || ",
            f ? 'window.getComputedStyle(el, null)[style]' : 'el.currentStyle[style]',
            ' || null;'].join(''));
            //alert(getStyle(document.body, 'overflow'));
            //alert(MVP.d.getStyle($C('','div','main')[0], 'margin-left'))
            //console.log(MVP.d.getStyle($C('','div','main')[0], 'borderLeft'))
    }(),
    gDW: function() {//getDocumentWidth 页面宽度
        var b = (window.document.compatMode != "CSS1Compat" || MVP.b.isSaf) ? window.document.body.scrollWidth: window.document.documentElement.scrollWidth,
        a = Math.max(b, MVP.d.gVW());
        return a
    },
    gDH: function() {//getDocumentHeight 页面高度
        //var b = (aj[ax] != ah || al) ? aj.body.scrollHeight: z.scrollHeight,
        var b = (window.document.compatMode != "CSS1Compat" || MVP.b.isSaf) ? window.document.body.scrollHeight: window.document.documentElement.scrollHeight,
        //al = aE.webkit
        a = Math.max(b, MVP.d.gVH());
        return a
    },
    gVW: function() {//yh getViewportWidth 可视区width
        var a = self.innerWidth,b=window.document.compatMode;
        //b = aj[ax];//aj = window.document ax = compatMode //获取滚动条高度的方法 window.document.compatMode?
        if (b || MVP.b.isIE) {//if (b || aa) {//if (b || aa) {//aa = aE.ie;//YAHOO.env.ua.ie
            a = (b == "CSS1Compat") ? window.document.documentElement.clientWidth: documentElement.body.clientWidth
            //clientWidth = width + padding //    ah = "CSS1Compat",aO = "BackCompat",
            //aj = window.document,z = aj.documentElement,
            /*当文档有了标准声明时， document.compatMode 的值就等于 "CSS1compat"，
            当没声明的时候， document.compatMode 的值等于 "BackCompat"，所以想判断文档是否有声明，
            可以这么写：
            if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat'){
            }*/
        }
        return a
    },
    gVH: function() {//getViewportHeight 可视区height
        var a = self.innerHeight,b=window.document.compatMode;
        if ((b || MVP.b.isIE) && !MVP.b.isOpe) {//ap = aE.opera,//YAHOO.env.ua.opera
            a = (b == "CSS1Compat") ? window.document.documentElement.clientHeight: documentElement.body.clientHeight
        }
        return a
    }

};
var $G=G=MVP.d.G;/*$=*/
var $C=MVP.d.C;
MVP.nameSpace("e");//Extend 扩展 //Method 方法
MVP.e={
    addEvent:function(obj,type,fn){//obj(object), type(eventType) ,fn(function)
        if(obj.attachEvent){
            obj['e'+type+fn]=fn;
            obj[type+fn]=function(){obj['e'+type+fn](window.event)};
            obj.attachEvent('on'+type,obj[type+fn]);
        }else{
            obj.addEventListener(type,fn,false);
        }
    }
    ,removeEvent:function(obj,type,fn){
        if (obj.detachEvent){
            obj.detachEvent('on'+type,obj[type+fn]);
            obj[type+fn]=null;
        }else{
            obj.removeEventListener(type,fn,false);
        }
    }
}

MVP.nameSpace("t");
MVP.swap = {
	tab : function(N,T,C) {//Name,Total,Current
		for(var i=1;i<=T;i++){
			var curC=mvp.dom.$G(N+"_"+i);var curB=mvp.dom.$G(N+"_t"+i);
			if(C==i){curC.style.display="block";curB.className="active"}
			else
			{curC.style.display="none";curB.className="normal"}
		}
	},
	nTab : function(tabObj,obj){
		var tabList = mvp.dom.$G(tabObj).getElementsByTagName("li");
		for(var i=0,j; j=tabList[i]; i++)
		{
			if (j.id == obj.id)
			{
				mvp.dom.$G(tabObj+"_Title"+i).className = "active";
				mvp.dom.$G(tabObj+"_Content"+i).style.display = "block";
			}else{
				mvp.dom.$G(tabObj+"_Title"+i).className = "normal";
				mvp.dom.$G(tabObj+"_Content"+i).style.display = "none";
			}
		}
	}
	/*
	Usage Expale:
	<li onmouseover ="return swap_tab('tab',1,2)" id="tab_t1" class="active">1</li>
	<li onmouseover="return swap_tab('tab',2,2)" id="tab_t2">2</li>
	*/
}
function switchTab(identify,index,count)
{
    for(i=1;i<=count;i++) {
        var CurTabObj = G("Tab_"+identify+"_"+i) ;//Tab_news_0
        var CurListObj = G("List_"+identify+"_"+i) ;//List_news_0
        if (i != index) {
            MVP.d.removeClassName(CurTabObj,"active");
            //MVP.d.removeClassName(CurListObj,"up-list");
            CurListObj.style.display="none"
        }
    }
    MVP.d.addClassName(G("Tab_"+identify+"_"+index),"active");
    //MVP.d.addClassName(G("List_"+identify+"_"+index),"up-list");
    G("List_"+identify+"_"+index).style.display=""
}
var today=new Date();
function initArray(){
    this.length=initArray.arguments.length
    for(var i=0;i<this.length;i++)
    this[i+1]=initArray.arguments[i]
}
var week=new initArray("星期日","星期一","星期二","星期三","星期四","星期五","星期六");
document.getElementById('date').innerHTML=(today.getFullYear()+"年"+(today.getMonth()+1)+"月"+today.getDate()+"日"+week[today.getDay()+1]);