
var maintimer;
var containerdiv = null;
var picindex = -1;
var changeheight = -310;
function turnshow(index) {
    clearTimeout(maintimer);
    if (containerdiv != null) {
        containerdiv.style.top = changeheight * index;
        maintimer = setTimeout(nextbg, 3000);
    }
}

function picmousein() {
    clearTimeout(maintimer);
}

function picmouseout() {
    maintimer = setTimeout(nextbg, 5000);
}

function initturn() {
    containerdiv = document.getElementById("hoTransContainer");
    if (containerdiv != null) {
        var lis = containerdiv.getElementsByTagName("li");
        nextbg();
    }
}

function nextbg() {
    if (containerdiv != null) {
        var ul = document.getElementById("topimglist");
        var ulist = ul.getElementsByTagName("a");
        if (ulist != null && ulist.length > 0) {
            var moveheight = ulist[0].offsetHeight;
            picindex = picindex + 1;
            ul.scrollTop = moveheight * picindex;
            if (picindex >= ulist.length) {
                ul.scrollTop = 0;
                picindex = 0;
            }
            turnshow(picindex);
        }
        
    }
}


function scroll(n)
{
	temp=n;
	topimglist.scrollTop=topimglist.scrollTop+temp;
	if (temp==0) return;
	setTimeout("scroll(temp)",20);
}



function proimgshow(url)
{
	document.getElementById("showbigImg").src=url;
}

function scrollPro(n)
{
	temp=n;
	probigimg.scrollTop=probigimg.scrollTop+temp;
	if (temp==0) return;
	setTimeout("scrollPro(temp)",20);
}



////////////管理地址///////////////////////

function HJWebMaster()
{
	var W = 850;
	var H = 550;
	var X = (window.screen.width-W)/2;
	var Y = (window.screen.height-H)/2-50;
	var newwin = window.open ("Webmaster/Include/Admin_Login.asp", "newwindow", "width=" + W + ", height=" + H + ",top=" + Y + ", left=" + X + ",toolbar=no,menubar=no,scrollbars=no,resizable=yes,location=no");
	
	if(newwin == null)
	{
		location.href="Webmaster/Include/Admin_Login.asp";
		//alert("系统提示: 您的浏览器阻止了一个弹出窗口");
	}
	
	//window.history.go();
}

