
var O = [];
var P,T;
/////////////////////////////////////////////////////////////////////////////////
var car = "1 + 2 I x 9 0  x x F F x 0 x 0 x 0 x 0 x";
var tag = "h2";
/////////////////////////////////////////////////////////////////////////////////
var L = car.length;

function Olink(o){
	this.o = o;
	this.txt = P[o].innerHTML;
	P[o].innerHTML = "";
	this.obj = P[o];
	this.len = this.txt.length;
	this.txa = "";
	this.txo = "";
	this.run = false;
	this.stop = false;
	this.cp = [];
	P[o].onmouseover=new Function("O["+o+"].over();return false;");
	P[o].onmousedown=new Function("O["+o+"].stop=true;setTimeout('P["+o+"].innerHTML=O["+o+"].txt;O["+o+"].stop=false;',1000);return false;");
	this.display = function(){
		with(this){
			

			
			if(!stop){
				run = false;
				for(i=0;i<len;i++){
					c = txa.charAt(i);
					d = txt.charAt(i);
					if(c != d){
						cp[i]++;
						run = true;
						c = car.charAt(cp[i]);
						if(cp[i] >= L) c=d;
						txa = txa.substring(0,i)+c+txa.substring(i+1,999);
					}
				}

				obj.childNodes[0].nodeValue = txa;
				if(run) setTimeout("O["+o+"].display()", 32);
			} else {
				run = false;
				txa = txt;
			}
		}
	}

	this.over = function(){
		with(this){
			txa="";
			for(i=0;i<len;i++){
				cp[i] = Math.round(Math.random()*20);
				txa += car.charAt(cp[i]);
			}
			obj.innerHTML = txa;
			if(!run) display();
		}
	}	
	
//
	
}


onload = function(){
	P = document.body.getElementsByTagName(tag);
	T = P.length;
	for (var i=0;i<T;i++) O[i] = new Olink(i);	
	for (var i=0;i<T;i++) setTimeout("O["+i+"].over();", i*16);

}
