function decimal(dec)
{
	this.dec=dec;
	this.toBinary=function() { return this.dec.toString(2); }
	this.toHex=function() { return this.dec.toString(16).toUpperCase(); }
	this.toOctal=function() { return this.dec.toString(8); }
}function binary(bin){	this.bin=bin;	this.toDecimal=function() { return parseInt(this.bin, 2); }	this.toHex=function() { return this.toDecimal().toString(16).toUpperCase(); }	this.toOctal=function() { return this.toDecimal().toString(8); }}function hex(hex){	this.hex=hex;	this.toDecimal=function() { return parseInt(this.hex, 16); }	this.toBinary=function() { return this.toDecimal().toString(2); }	this.toOctal=function() { return this.toDecimal().toString(8); }}function octal(oct){	this.oct=oct;	this.toDecimal=function() { return parseInt(this.oct, 8); }	this.toBinary=function() { return this.toDecimal().toString(2); }	this.toHex=function() { return this.toDecimal().toString(16).toUpperCase(); }}

//Startfarbe hier festlegen (nchste drei Zeilen):r=255;
g=255;b=255;flag=0;t=new Array;o=new Array;d=new Array;
random.m=714025; random.a=4096; random.c=150889; random.seed = (new Date()).getTime()%random.m;

function random() {   random.seed = (random.seed*random.a + random.c) % random.m;   return random.seed / random.m; }

function hex(a,c) //cambia t[a] y o[a] dependiendo de la denominada c	{	t[a]=Math.floor(c/16);	o[a]=c%16;
	t[a]=new decimal(t[a]).toHex();
	o[a]=new decimal(o[a]).toHex();
	}

function ran(a,c) //cambia c y d[a] otra vez en funcion de la mentada c	{	if ((random()>2/3||c==0)&&c<255)		{		c++		d[a]=2;		}	else		{		if ((random()<=1/2||c==255)&&c>0)			{			c--			d[a]=1;		}		else d[a]=0;		}	return c	}

function do_it(a,c)	{	if ((d[a]==2&&c<255)||c==0)		{		c++		d[a]=2		}	else	{	if ((d[a]==1&&c>0)||c==255)		{		c--;		d[a]=1;		}	if (a==3)		{		if (d[1]==0&&d[2]==0&&d[3]==0)		flag=1		}	}return c}

function disco()	{	if (flag==0)		{		r=ran(1, r);		hex(1,r)		document.bgColor="#"+t[1]+o[1]+t[1]+o[1]+t[1]+o[1]		flag=50		}	else		{		r=do_it(1, r)		hex(1,r)		document.bgColor="#"+t[1]+o[1]+t[1]+o[1]+t[1]+o[1]		flag--		}
setTimeout('disco()',50)}