var O = [];

function Cobj(xs, ys, css, html){
	this.xs = xs;
	this.ys = ys;
	this.m = 1;
	this.x = xs * 10000;
	this.y = ys * 10000;
	this.o = document.createElement("span");
	this.o.innerHTML = html;
	for(var i in css)this.o.style[i] = css[i];
	document.body.appendChild(this.o);
	this.mov = function () {
		with(this) {
			if(xs!=0){
				x += xs;
				o.style.left = x+'px';
				if(xs>0 && x>document.body.offsetWidth) x = -o.offsetWidth;
				else if(xs<0 && x<-o.offsetWidth) x = document.body.offsetWidth;
			}
			if(ys!=0){
				y += ys;
				o.style.top = y+'px';
				if(ys>0 && y>document.body.offsetHeight) y = -o.offsetHeight;
				else if(ys<0 && y<-o.offsetHeight) y = document.body.offsetHeight;
			}
		}
	}
}

function run(){
	for(var i in O)O[i].mov();
	setTimeout("run();", 32);
}

onload = function(){
	O.push(new Cobj(0,1,
		{
			'color':'#606060',
			'fontSize':'100pt',
			'letterSpacing':'-5px',
			'textAlign':'center'
		},
		"11:11"
	));

	O.push(new Cobj(0,-2,
		{
			'color':'#c0c0c0',
			'fontSize':'10pt',
			'left':'7%'
		},
		"#include <iostream.h><br>void main ()<br>{<br>   char * s;<br>   cout << ''Saludos…'' << endl<br>   << ''¿Desde el más allá? (S/N)'';<br>   cin >> s;<br>   cout << ''Vale, sé lo que tú creas...'' << endl;<br>}"
	));

	O.push(new Cobj(-1,0,
		{
			'color':'#888',
			'fontSize':'48pt',
			'top':'25%'
		},
		"Sé lo que tú crees."
	));

	O.push(new Cobj(3,0,
		{
			'color':'#ff0000',
			'fontSize':'44pt',
			'top':'5%'
		},
		"Inmensidad "
	));

	O.push(new Cobj(2,0,
		{
			'color':'#ff8000',
			'fontSize':'16pt',
			'top':'65%'
		},
		"Complejo de metadatos;<br>Te faltan neuronas..."
	));

	O.push(new Cobj(0,2,
		{
			'color':'#b0b0c0',
			'fontSize':'18pt',
			'left':'3%'
		},
		"No puedes asimilarlo,<br>no se trata de<br>una cuestión de fe."
	));

	O.push(new Cobj(0,-1,
		{
			'color':'#fff',
			'fontSize':'17pt',
			'width':'50%',
			'textAlign':'right'
		},
		"Sigue a los guías.<br>La hiper-realidad es asombrosa!"
	));

	O.push(new Cobj(1,0,
		{
			'color':'#9090f0',
			'fontSize':'22pt',
			'top':'10px'
		},
		"La avaricia de los esclavos."
	));

	O.push(new Cobj(-2,0,
		{
			'color':'#8080ff',
			'fontSize':'20pt',
			'top':'60%'
		},
		"Ingrávito, estéril, nauseabundo espacio."
	));

	run();

}