function HD_pre_changeItem(opcode)
{
	if (navigator.appName != "Netscape" && navigator.appName != "Opera")
	{
		imageElement_pre.style.filter = 'blendTrans(duration = 0)';
		imageElement_pre.filters.blendTrans.Apply();
		imageElement_pre.filters.blendTrans.Play();
		
		titleElement_pre.style.filter = 'blendTrans(duration = 0)';
		titleElement_pre.filters.blendTrans.Apply();
		titleElement_pre.filters.blendTrans.Play();
	}

	HD_pre_clearTimeout();

	HD_pre_curIndex += opcode;

	if(HD_pre_curIndex >= HD_pre_imageList.length)
		HD_pre_curIndex = 0;
	else if (HD_pre_curIndex < 0)
		HD_pre_curIndex = HD_pre_imageList.length - 1;

	imageElement_pre.src = "./images/news/" + HD_pre_imageList[HD_pre_curIndex] + ".jpg";
	linkElement_pre.href = HD_pre_seoList[HD_pre_curIndex];

	if (HD_pre_headlineList[HD_pre_curIndex])
	{
		titleElement_pre.style.display = 'block';
		spotElement_pre.style.display = 'block';
		transparentElement_pre.style.display = 'block';
		titleElement_pre.innerHTML = HD_pre_headlineList[HD_pre_curIndex];
		spotElement_pre.innerHTML = HD_pre_spotList[HD_pre_curIndex];
	}
	else
	{
		titleElement_pre.style.display = 'none';
		spotElement_pre.style.display = 'none';
		transparentElement_pre.style.display = 'none';
	}

	document.getElementById("news_arrow_pre_1").style.top = (8 + (HD_pre_curIndex * 24)) + "px";

	if (HD_pre_prevItem > -1)
	{
		document.getElementById("pre_item_title_" + HD_pre_prevItem).className = 'item';
	}

	document.getElementById("pre_item_title_" + HD_pre_curIndex).className = 'item active';

	HD_pre_prevItem = HD_pre_curIndex;

	if(HD_pre_isChangeable)
		HD_pre_timeoutIndex = setTimeout(HD_pre_timeoutFunction, 8000);
}

function HD_pre_clearTimeout()
{
	if(HD_pre_timeoutIndex != "")
	{
		clearTimeout(HD_pre_timeoutIndex);
		HD_pre_timeoutIndex = "";
	}
}

function HD_pre_jumpTo(idx)
{
	if(idx == HD_pre_prevItem)
		return;
	HD_pre_isChangeable = 0;
	HD_pre_clearTimeout();
	HD_pre_changeItem(idx - HD_pre_prevItem);
}

function HD_pre_forwClick()
{
	HD_pre_isChangeable = 1;

	timeoutFunction = "HD_pre_changeItem(1)";

	if(HD_pre_curIndex == -1)
	{
		HD_pre_changeItem(1);
		return;
	}

	HD_pre_clearTimeout();

	HD_pre_timeoutIndex = setTimeout(timeoutFunction, 8000);
}

function HD_pre_backClick()
{
	HD_pre_isChangeable = 1;
	HD_pre_timeoutFunction = "HD_pre_changeItem(-1)";
	HD_pre_changeItem(-1);
}
