﻿	var instance_id = 1; 
	function blinkText(text,speed){
		this.id		= "blinkText_" + (instance_id++);
		this.speed	= (speed) ? speed : 700;
		//var tmp ="<span id='" +this.id+ "'>" +text+ "<span>";
		document.writeln("<span id='" +this.id+ "'>" +text+ "<span>")
		
		setTimeout("_blinkText('" +this.id+ "'," +this.speed+ ")", this.speed)
	}
	
	function _blinkText(obj_id,speed){
		this.obj=document.getElementById? document.getElementById(obj_id) : document.all? eval("document.all." +obj_id) : ""
		if (this.obj){
				this.obj.style.color=randomColor();
		}

		setTimeout("_blinkText('" +obj_id+ "'," +speed+ ")", speed)
	}
	
	function ran(upperbound, lowerbound){
	  return(parseInt((upperbound - lowerbound + 1) * Math.random() + lowerbound));
	}
	function randomColor(){
	  var R=ran(255,0);
	  var G=ran(255,0);
	  var B=ran(255,0);
	  R=R.toString(16);
	  G=G.toString(16);
	  B=B.toString(16);
	  if (R.length==1)  R="0"+R;
	  if (G.length==1)  G="0"+G;
	  if (B.length==1)  B="0"+B;
	  return("#"+R+G+B);
	}
