<!--
var speed=2, amount=120, flag=false, temp=0;
function jjscroll( param, id ) 
{
	if(flag)
	{
		temp++;
		tmp = document.getElementById(id);
	
		if( param=='left' ) 
		{
			tmp.style.left = (parseInt(tmp.style.left)+speed)  + "px";
			if(parseInt(tmp.style.left) >=0)
				tmp.style.left = 0 +"px";
		}
		else if( param=='right' ) 
		{
			tmp.style.left = (parseInt(tmp.style.left)-speed) + "px";

			if(parseInt(tmp.style.width) + parseInt(tmp.style.left) <= 0)
				tmp.style.left = 0 +"px";
		}

		if( temp >= amount ) 
		{ 
			flag=false; 
			temp=0;
		}

		window.setTimeout("jjscroll('"+param+"', '"+id+"')", 1);	
	}
}

var _recom_ch;
function fade(num)
{
	if(!_recom_ch) _recom_ch = homediv[0];

	var nowobj = document.getElementById('nh_'+_recom_ch);
	var nextobj = document.getElementById('nh_'+num);

	if(nextobj.style.display == "none")
	{
		nowobj.style.display='none';
		nextobj.style.display='';
		_recom_ch = num;
	}
}

var _next;
var idx=0;
function show_new_home()
{
	if(homediv.length <= 1) return;

	if(!_next) _next = homediv[0];

	if(_recom_flag)
	{
		fade(_next);

		if(_next == homediv[homediv.length-1])
		{
			idx = 0;
			_next = homediv[0];
		}
		else
		{
			idx++;
			_next =  homediv[idx];
		}
	}
	window.setTimeout(show_new_home, 3000);
}

function view_home(mode, nowno)
{
	var nowobj = $('nh_'+homediv[nowno]);
	
	// next
	if(mode == "n")
	{		
		if(homediv[nowno] == homediv[homediv.length-1])
			_next = homediv[0];
		else _next = homediv[(nowno+1)];		
	}
	else if(mode == "p")
	{
		if(homediv[nowno] == homediv[0])
			_next = homediv[homediv.length-1];
		else _next = homediv[(nowno-1)];
	}

	var nextobj = $('nh_'+_next);

	nowobj.hide();
	nextobj.show();

	_recom_ch = _next;
}
-->