//滚动公告
function BulletinScrollup(o,d,c){ 
    if(d<=c){ 
    var t=o.firstChild.cloneNode(true); 
    o.removeChild(o.firstChild); 
    o.appendChild(t); 
    t.style.marginTop=o.firstChild.style.marginTop='0px'; 
    } 
    else{ 
    var s=3,c=c+s,l=(c>=d?c-d:0); 
    o.firstChild.style.marginTop=-c+l+'px'; 
    window.setTimeout(function(){BulletinScrollup(o,d,c-l)},100); 
    } 
} 
function BulletinScrollup_Flink(o,d,c){ 
    if(d<=c){ 
    var t=o.firstChild.cloneNode(true); 
    o.removeChild(o.firstChild); 
    o.appendChild(t); 
    t.style.marginTop=o.firstChild.style.marginTop='0px'; 
    } 
    else{ 
    var s=3,c=c+s,l=(c>=d?c-d:0); 
    o.firstChild.style.marginTop=-c+l+'px'; 
    window.setTimeout(function(){BulletinScrollup_Flink(o,d,c-l)},100); 
    } 
} 

//锦程快讯,职涯资讯标签切换
function SwitchNewsTag(id,num,count)
{
	//tab项标题的长度是固定的,不长于5个字
	ClearTagClass(id,count);
    document.getElementById("tagname_" + id + num).className = "newsTabFocus";
	document.getElementById(id + num).style.display = "";
}
function ClearTagClass(id,count)
{
	for(i=1;i<=count;i++)
	{
        document.getElementById("tagname_" + id + i).className = "newsTabDefault";
		document.getElementById(id + i).style.display = "none";
	}
}

function SwitchNewsTag_VarTxtLen(txtLen,id,num,count)
{
	//tab项标题的长度是变的
	ClearTagClass_Test(txtLen,id,count);
	if(txtLen[num-1]<=5)
    {
        document.getElementById("tagname_" + id + num).className = "newsTabFocus";
    }
    else
    {
        document.getElementById("tagname_" + id + num).className = "newsTabFocus_6";
    }
	document.getElementById(id + num).style.display = "";
}
function ClearTagClass_Test(txtLen,id,count)
{
	for(i=1;i<=count;i++)
	{
        if(txtLen[i-1]<=5)
        {
            document.getElementById("tagname_" + id + i).className = "newsTabDefault";
        }
        else
        {
            document.getElementById("tagname_" + id + i).className = "newsTabDefault_6";
        }    
		document.getElementById(id + i).style.display = "none";
	}
}
