var iCurrentStory = 0;
var iCurrentChar = 0;	
function newsTick () {
	if ( ! document.getElementById ) return;
	var nNewsTicker = document.getElementById ( 'newsticker' );
	if ( iCurrentChar == 0 ) nNewsTicker.href = aNews [ iCurrentStory ][ 1 ];
	nNewsTicker.innerHTML = aNews [ iCurrentStory ][ 0 ].substring ( 0, iCurrentChar ) + ( aNews [ iCurrentStory ][ 0 ].length > iCurrentChar ? ( iCurrentChar % 2 ? '_' : '-') : '' );
	iCurrentChar ++;
	if ( iCurrentChar > aNews [ iCurrentStory ][ 0 ].length ) {
		if ( ++ iCurrentStory >= aNews.length ) iCurrentStory = 0;
		iCurrentChar = 0;
		setTimeout ( 'newsTick ();', 5000 );
	} else {
		setTimeout ( 'newsTick ();', 50 );
	}
}
window.onload = newsTick;
