hex=new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","z");
function preload(){
	for (i=0;i<hex.length;i++){
		eval("gif" + hex[i] + "=new Image; gif" + hex[i] + ".src='" + hex[i] + ".gif'");
	}
}
function top(){
	document.write("<table width='99%' height='90%'><tr><td>&nbsp;</td></tr><tr><td align='center'>");
}
function bottom(){
	document.write("</td></tr><tr><td>&nbsp;</td></tr></table>");
}
function show(url,name,wide,high){
	window.open(url, name, "width=" + wide + ",height=" + high + ",top=10,left=10,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes");
}

var a="go";
var c=0;
var e=0;
var d1;
function squares(){
	if (a=="go"){
		b1=Math.round(Math.random()*255);
		b2=Math.round(Math.random()*15);
		eval("document.images[b1].src='" + hex[b2] + ".gif'");
		setTimeout("squares()",40);
		c++;
		if (c>127) clear1();
	}
}
function clear1(){
	a="stop";
	d1=new Array(15,16,17);
	d2=d1[Math.round(Math.random()*2)];
	setTimeout("clear2()",100);
}
function clear2(){
	if (e<17){
		for (f=e; f<256; f=f+d2){
			eval("document.images[f].src='f.gif'");
		}
		e++;
		setTimeout("clear2()",40);
	}
	else{
		a="go";
		c=0;
		e=0;
		setTimeout("squares()",100);
	}
}
m=31;
n=0;
o=1;
function lines(){
	if (m<=-16){
		m=31;
		o=-o;
	}
	if (m<0) {
		m=m+31;
		n=n+o;
	}
	if (m>=0){
		eval("document.images[m].src='" + hex[n] + ".gif'");
		m=m-16;
		setTimeout ("lines()",40);
	}
}
