﻿function HostNewsItem_Over(itemId, index)
{
	var jCurHotNews = $("#aHotNews" + itemId);

	if (jCurHotNews.hasClass("phunudep_link_3_active"))
		return;
	
	jCurHotNews.parent().find(".phunudep_link_3_active").removeClass("phunudep_link_3_active");
	jCurHotNews.addClass("phunudep_link_3_active");

	hotNewsIndex = index;
	
	hotNewsCurZIndex += 1;
	$("#divHotNews" + itemId).css("display", "none").css("z-index", hotNewsCurZIndex).fadeIn();
}

function HotNews_AutoRun()
{
	if (hotNewsIsAutoRun)
	{
		if (hotNewsIndex < hotNewsMaxIndex)
			hotNewsIndex += 1;
		else
			hotNewsIndex = 1;
		HostNewsItem_Over(hotNewsIdList[hotNewsIndex], hotNewsIndex);
	}
	setTimeout("HotNews_AutoRun()", 5000);
}