// JavaScript Document

function stringreplace(str,srchfor,rplwith){
	while (str.indexOf(srchfor)>-1) {
		pos= str.indexOf(srchfor);
		str = "" + (str.substring(0, pos) + rplwith + str.substring((pos + srchfor.length), str.length));
	}
	return str;
}

// News Bridge
var newslist=new Array();
var count=0; // item actual
var actual = "";
var definitive = ""
var i=-1; // letra que se esta tipeando

var goodcharacters = new Array('�', '�', '�', '�', '�', '�', '�','�', '�', '"', '�', '�','�', '�', '�');
var badcharacters = new Array('�', '�', '�', '�', '�', '�', '�','�', '�', '"', '�', '�','�', '�', '�');

function newsticker(){

	// next character in the current item
	for (var x = 0; x <= goodcharacters.length; x++){
		newslist[0][count] = stringreplace(newslist[0][count],badcharacters[x],goodcharacters[x]);
	}

	if (i < newslist[0][count].length - 1){
		i++;
		temp1 = newslist[0][count];
		temp1 = temp1.split('');
		actual = actual + temp1[i];
		temp2 = newslist[0][count+1];
		document.getElementById('newstext').innerHTML = "<span class=rj><a href=\"../BujinkanNews.html\">"+actual+"</a></span><span class=t07a> &raquo;</span>"; 
		setTimeout('newsticker()',50)
		return;
	}
	
	// new item
	i = -1;
	actual = "";

	if (count<newslist[0].length-1) {
		count++;
		setTimeout('newsticker()',6000)
	} else {
		count=0;
		setTimeout('newsticker()',6000)
	}
}

var ii = 0;

