﻿function topScroll(top_Roll, top_Roll1, top_Roll2, rollspeed) {
    top_Roll2.innerHTML = top_Roll1.innerHTML
    function Marquee() {
        if (top_Roll2.offsetTop - top_Roll.scrollTop <= 0)
            top_Roll.scrollTop -= top_Roll1.offsetHeight
        else {
            top_Roll.scrollTop++
        }
    }
    var MyMar = setInterval(Marquee, rollspeed)
    top_Roll.onmouseover = function() { clearInterval(MyMar) }
    top_Roll.onmouseout = function() { MyMar = setInterval(Marquee, rollspeed) }
}

function bottomScroll(bottom_Roll, bottom_Roll1, bottom_Roll2, rollspeed) {
    bottom_Roll2.innerHTML = bottom_Roll1.innerHTML
    bottom_Roll.scrollTop = bottom_Roll.scrollHeight
    function Marquee() {
        if (bottom_Roll1.offsetTop - bottom_Roll.scrollTop >= 0)
            bottom_Roll.scrollTop += bottom_Roll2.offsetHeight
        else {
            bottom_Roll.scrollTop--
        }
    }
    var MyMar = setInterval(Marquee, rollspeed)
    bottom_Roll.onmouseover = function() { clearInterval(MyMar) }
    bottom_Roll.onmouseout = function() { MyMar = setInterval(Marquee, rollspeed) }
}

function leftScroll(left_Roll, left_Roll1, left_Roll2, rollspeed) {
    left_Roll2.innerHTML = left_Roll1.innerHTML
    function Marquee() {
        if (left_Roll2.offsetWidth - left_Roll.scrollLeft <= 0)
            left_Roll.scrollLeft -= left_Roll1.offsetWidth
        else {
            left_Roll.scrollLeft++
        }
    }
    var MyMar = setInterval(Marquee, rollspeed)
    left_Roll.onmouseover = function() { clearInterval(MyMar) }
    left_Roll.onmouseout = function() { MyMar = setInterval(Marquee, rollspeed) }

}

function rightScroll(right_Roll, right_Roll1, right_Roll2, rollspeed) {
    right_Roll2.innerHTML = right_Roll1.innerHTML
    right_Roll.scrollLeft = right_Roll.scrollWidth
    function Marquee() {
        if (right_Roll.scrollLeft <= 0)
            right_Roll.scrollLeft += right_Roll2.offsetWidth
        else {
            right_Roll.scrollLeft--
        }
    }
    var MyMar = setInterval(Marquee, rollspeed)
    right_Roll.onmouseover = function() { clearInterval(MyMar) }
    right_Roll.onmouseout = function() { MyMar = setInterval(Marquee, rollspeed) }

}

<!--

function swap_zgd3(n,flag){
	if(!flag){
		clearTimeout(p_zgd);
	}
	for(var i=1;i<=3;i++){
		var curB=document.getElementById("index_hyxw"+i);
		var tag=curB.getElementsByTagName("a"); 
		var curC=document.getElementById("index_hyxw_"+i);
		if(n==i){
			curC.style.display="block";
            curB.style.backgroundImage="url(/images/new_0"+i+"_1.gif)";
            tag[0].style.color="#2d9dc2";
            tag[0].style.fontSize=13+"px";
            tag[0].style.fontWeight="bold";
			//curB.background="/images/new_01_1.gif";
		}else{
			curC.style.display="none";
//			curB.bgColor="#fff3d7"
			//curB.background="/images/new_01_2.gif";
			curB.style.backgroundImage="url(/images/new_0"+i+"_2.gif)";
			tag[0].style.color="#8c8c8c";
            tag[0].style.fontSize=12+"px";
            tag[0].style.fontWeight="normal";
		}
	}
}

var cur_zgd=0;


function autoPlay_zgd(){
	cur_zgd++;
	if(cur_zgd>3){
		cur_zgd=1;
	}
	swap_zgd3(cur_zgd,true);
	p_zgd=setTimeout(autoPlay_zgd,5000);
}


-->