//首页特效函数
////闪烁效果
function initArray() {
this.length = initArray.arguments.length;
for (var i = 0; i < this.length; i++) {
this[i] = initArray.arguments[i];
}
}
var speed = 1000;
var x = 0;
var color = new initArray(
"#000000",
"#0000FF",
"#80FFFF",
"#80FF80",
"#FFFF00",
"#FF8000",
"#FF00FF",
"#FF0000"
);
var alltext;
function chcolor()
{ 
   if (navigator.appVersion.indexOf("MSIE") != -1)
   {
    alltext = document.getElementsByName("theFlashText");
    //alert(alltext.length);
    for(var i = 0;i < alltext.length;i++)
       alltext[i].style.color = color[x];
	}
	(x < color.length-1) ? x++ : x = 0;
}

function flashtext()
{
	setInterval("chcolor()",100);
}

//荧光效果
var from = 1;
var to = 4;
var delay = 40; //闪的速度
//var glowColor = "red";//颜色
var i = to;
var j = 0;

function textPulseUp()
{
	if (!document.all)
		return
	if (i < to)
	{
		document.all.theSparkText.style.filter = "Glow(Color=red, Strength=" + i + ")";
		i++;
		theTimeout = setTimeout("textPulseUp()",delay);
	return 0;
	}

	if (i = to)
	{
		theTimeout = setTimeout("textPulseDown()",delay);
		return 0;
	}
}

function textPulseDown()
{
	if (!document.all)
		return
	if (i > from)
	{
		document.all.theSparkText.style.filter = "Glow(Color=red, Strength=" + i + ")";
		i--;
		theTimeout = setTimeout("textPulseDown()",delay);
		return 0;
	}

	if (i = from)
	{
		theTimeout = setTimeout("textPulseUp()",delay);
		return 0;
	}
}

function chcolor2()//短消息闪烁
{ 
   if (navigator.appVersion.indexOf("MSIE") != -1)
   {
    alltext = document.getElementsByName("theFlashpm");
    //alert(alltext.length);
    for(var i = 0;i < alltext.length;i++)
       alltext[i].style.color = color[x];
	}
	(x < color.length-1) ? x++ : x = 0;
}

function flashpm()//短消息闪烁
{
	setInterval("chcolor2()",100);
}


function trend(id,id2)//话题浏览收缩特效
{
var status,widthfor;
status=document.getElementById(id).style.display;
widthfor=document.getElementById(id2).style.width;
if (status=="none")
{
document.getElementById(id).style.display ="";
document.getElementById(id2).style.width =467;
//document.getElementById(id2).innerText="展 开";
}
else
{
document.getElementById(id).style.display ="none";
document.getElementById(id2).style.width ="100%";
//document.getElementById(id2).innerText="关 闭";
}
}
