function popup_win(url,win_width,win_height)
{
    var x;
	x = window.open(url,"_blank","height="+win_height+",width="+win_width+",toolbar=no,statusbar=no,resizable=yes,titlebar=no,scrollbars=yes,location=no");
	//x.moveTo(50,25);
	//alert(x.length);
    x.focus();
}

function cursor_hand(i)
{
    i.style.cursor = 'hand';
}

function cursor_reg(i)
{
    i.style.cursor = 'default';
    i.style.cursor = 'normal';
}

var interval = 0;
var scrollInterval;
function start_scroller()
{
	if(document.getElementById('scroller'))
	{
		scrollInterval = window.setInterval('scrolldiv()',50);
	}else
		{
			alert('not found');
		}
}

function scrolldiv()
{
	var prevy = document.getElementById('scroller').scrollTop;
	document.getElementById('scroller').scrollTop += 1;
	if(parseInt(document.getElementById('scroller').scrollTop) == parseInt((document.getElementById('scroller').scrollHeight - document.getElementById('scroller').style.height)))
	{
		alert('equals');
		document.getElementById('scroller').scrollTop = 0;
	}else
		{
				//alert('top: ' + document.getElementById('scroller').scrollTop);
	//alert('height: ' + (document.getElementById('scroller').scrollHeight - document.getElementById('scroller').style.height));
		}
}

function stop_scroller()
{
	window.clearInterval(scrollInterval);
}