var services = new Array (
							"<a href='news.php?id=0'>Credit companies squeeze borrowers</a>",
							"<a href='news.php?id=1'>Redundancy cover costs up 70%</a>",
							"<a href='news.php?id=2'>FSA concerned over MPPI sales</a>"
						)
	ticker_idx = 1, ticker_interval_id = 0, scroller_interval_id = 0, scroll_y = 0,	ticker_tape = '';

function show_login()
{
	var login_box = document.getElementById('login_box');
	if (login_box.style.display == 'block') login_box.style.display = 'none';
	else login_box.style.display = 'block';	
	return true;
}

function initialise_scroller()
{	
	ticker_tape = document.getElementById('ticker_tape');
	
	if (ticker_idx == services.length) ticker_idx = 0;
	ticker_idx_previous = ticker_idx - 1;
	
	if (ticker_idx_previous == -1) {ticker_idx_previous = (services.length - 1);}
	
	ticker_tape.innerHTML = services[ticker_idx_previous] + '<br /><br />' + services[ticker_idx]; 
	ticker_tape.style.top = '-1px'; scroll_y = -1;
	scroller_interval_id = setInterval ( 'scroller()', 40 );
	return true;
}

function scroller()
{
	ticker_tape.style.top = scroll_y + 'px'; 
	if (scroll_y == -30)
	{
		scroll_y = 0;
		ticker_idx++;
		clearInterval(scroller_interval_id);
		setTimeout( 'initialise_scroller()', 5000);
	}
	else scroll_y--;
}

function MM_jumpMenu(targ,selObj,restore){
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
