var alle=[];
var testI=0;
function matrix()
{
	//testI++;
	var cv1 = document.getElementById('bg');
	if (cv1.getContext)
	{
		document.body.style.backgroundColor="#000";
		cv1 = cv1.getContext('2d');
//		cv1.clearRect(0,0,fensterX,fensterY);

		var zeile=new Array(12+Math.round(Math.random()*8),Math.random()*fensterX,0,0,1,Math.pow(Math.random()*fensterY,3)/Math.pow(fensterY,2));
		alle.push(zeile);
		zeile=new Array(12+Math.round(Math.random()*8),Math.random()*fensterX,0,0,1,Math.pow(Math.random()*fensterY,3)/Math.pow(fensterY,2));
		alle.push(zeile);

		for(i=0;i<alle.length;i++)
		{
			alle[i][2]=String(Math.round(Math.random()*9));
			
			cv1.fillStyle = "rgb(200,255,200)";
			cv1.font = String(alle[i][0])+'px Courier';
			cv1.fillText(alle[i][2],alle[i][1], (alle[i][4]*alle[i][0]*0.8)+alle[i][5]);
			cv1.fill();
			
			cv1.fillStyle = "rgb(0,255,0)";
			cv1.font = String(alle[i][0])+'px Courier';
			cv1.fillText(alle[i][3],alle[i][1], ((alle[i][4]-1)*alle[i][0]*0.8)+alle[i][5]);
			cv1.fill();
			
			alle[i][3]=alle[i][2];
			alle[i][4]++;
		}
		cv1.fillStyle = "rgba(0,0,0,0.02)";
		cv1.fillRect( 0, 0, fensterX, fensterY );
		if(Math.random()<0.4||alle.length>100)
		{
			cv1.fillStyle = "rgb(200,255,200)";
			cv1.fillRect(alle[0][1], ((alle[0][4]-1)*alle[0][0]*0.8)+alle[0][5]+1,0.4*alle[0][0],0.8*alle[0][0]);
			cv1.fill();
			alle.shift();
			
			cv1.fillStyle = "rgb(200,255,200)";
			cv1.fillRect(alle[0][1], ((alle[0][4]-1)*alle[0][0]*0.8)+alle[0][5]+1,0.5*alle[0][0],0.8*alle[0][0]);
			cv1.fill();
			alle.shift();
		}
	}
	//if(testI<1000)
	setTimeout('matrix()',50);
}
function matrixd()
{
	document.body.style.color="#6F6";
	document.body.style.fontFamily="\"Courier New\", Courier, monospace";
	var cMlink=document.getElementsByName("mlink");
	for(i=0;i<cMlink.length;i++)
	{
		cMlink.item(i).style.backgroundColor="#0A0";
		cMlink.item(i).style.opacity=1;
	}
	j=0;
	while(j<7)
	{
		j++;
		var tagH=document.getElementsByTagName("h"+j);
		for(i=0;i<tagH.length;i++)
		{
			tagH.item(i).style.backgroundColor="#030";
			tagH.item(i).style.color="#6F6";
			tagH.item(i).style.paddingLeft="10px";
		}
	}
	var tagA=document.getElementsByTagName("a");
	for(i=0;i<tagA.length;i++)
	{
		tagA.item(i).style.color="#FFF";
	}
	
	idHdl.style.top="155px";
	cv2.width=700;//cvb;
	cv2.height=idIh.offsetHeight+280;
	if (cv2.getContext)
	{
		cv2 = cv2.getContext('2d');
//logo	
		cv2.fillStyle = "rgba(0,0,0,0.6)";
		cv2.fillRect(0,idLgt.offsetTop-1,idIh.offsetWidth+130,idLgt.offsetHeight+2);
		cv2.strokeStyle = "rgba(80,255,80,0.6)";
		cv2.strokeRect(-3,idLgt.offsetTop-1,idIh.offsetWidth+130,idLgt.offsetHeight+2);
//Hauptfeld Hintergrund
		cv2.fillStyle = "rgba(0,0,0,0.8)";
		cv2.fillRect(idIh.offsetLeft-40,idIh.offsetTop-40,idIh.offsetWidth+80,idIh.offsetHeight+80);
		cv2.strokeStyle = "rgba(80,255,80,0.6)";
		cv2.strokeRect(idIh.offsetLeft-40,idIh.offsetTop-40,idIh.offsetWidth+80,idIh.offsetHeight+80);
	}
}
