function Colorizer(text,speed,bln,style){
	this.text=text;
	this.speed=speed || 200;
	this.colorizing = (typeof bln == "undefined")?true:bln;
	this.internalNumber = ++Colorizer.counter;
	this.style=style || "";
	this.colorTimer = null;
	this.writeSpans();
	if (this.colorizing)
		this.colorize();
}
Colorizer.counter = 0;
Colorizer.prototype.writeSpans = function(){
for (var i=0; i<this.text.length; i++){
	document.write("<span id = \"col" + Colorizer.counter + "" + i + "\" style = "+this.style+">" + this.text.charAt(i) + "</span>");
}
}
Colorizer.prototype.colorize = function(){
this.colorizing = true;
for (i=0; i<this.text.length; i++){
	k = Math.round(Math.random() * 16777215);
	k = this.toHex(k);
	while (k.length < 6){
		k = k + "0";
	}
document.getElementById("col" + this.internalNumber + "" + i).style.color = '#' + k;
}
var self=this;
this.colorTimer = window.setTimeout(function(){self.colorize()}, self.speed);
}
Colorizer.prototype.toHex = function(n){
	var hexChars = "0123456789ABCDEF";
	if (n == 0) return n;
	var j, k;
	var temp = "";
	while (n != 0){
		j = n % 16;
		n = (n - j)/16;
		temp = hexChars.charAt(j) + temp;
	}
	return temp;
}
Colorizer.prototype.stopColorize = function(){
	window.clearTimeout(this.colorTimer);
	this.colorizing=false;
	this.colorTimer = null;
}
Colorizer.prototype.setSpeed = function(speed){
	this.speed=speed;
}
Colorizer.prototype.setStyle = function(style){
	this.style=style;
}