var layerRef,layerStyleRef,styleSwitch;
var targetY = new Array();
var actualY = new Array();
var homeY = new Array();
var targetX = new Array();
var targetName = new Array();
var actualX = new Array();
var homeX = new Array();
var layerStatus = new Array();
var interRupt = new Array();

if (navigator.appName == "Netscape")
	{ layerStyleRef="layer."; layerRef="document.layers"; styleSwitch=""; pxSwitch=""; }
	else
	{ layerStyleRef="layer.style."; layerRef="document.all"; styleSwitch=".style"; pxSwitch="px"; }
function oneStep(layerName)
	{
	if (interRupt[layerName] > 0)
		{
		interRupt[layerName] = 0;
		layerStatus[layerName] = 0;
		return;
		}
	var moving = 0;
	if (layerStatus[layerName] == -1)
		{
		layerStatus[layerName] = 0;
		return;
		}
	if (eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top != targetY[layerName]'))
		{
		mean = Math.round((targetY[layerName] - actualY[layerName])/9);
		actualY[layerName]+=mean;
		if (mean == 0) {actualY[layerName] = targetY[layerName];}
		eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top = actualY[layerName]');
		}
	if (eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.left != targetX[layerName]'))
		{
		mean = Math.round((targetX[layerName] - actualX[layerName])/9);
		actualX[layerName]+=mean;
		if (mean == 0) {actualX[layerName] = targetX[layerName];}

		eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.left = actualX[layerName]');
		}
	if ((actualY[layerName] != targetY[layerName]) || (actualX[layerName] != targetX[layerName]))
		{
		setTimeout('oneStep("'+layerName+'")',20);
		}
	else
		{
		layerStatus[layerName] = 0;
		}
	}
function defineLayer(layerName,xo,yo)
{
homeY[layerName] = yo;
homeX[layerName] = xo;
actualY[layerName] = yo;
actualX[layerName] = xo;
layerStatus[layerName] = 0;
interRupt[layerName] = 0;
}
function moveTo(layerName,xo,yo)
{
targetName[layerName] = "in";
moveToNow(layerName,xo,yo)
}
function moveToNow(layerName,xo,yo)
{
if (interRupt[layerName] > 0) {return;}
if (layerStatus[layerName] == 0)
	{
	targetY[layerName] = yo;
	targetX[layerName] = xo;
	layerStatus[layerName] = 1;
	oneStep(layerName);
	}
else
	{
	interRupt[layerName] = 1;
	setTimeout('moveToNow("'+layerName+'",'+xo+','+yo+')',100);
	}
}
function moveBack(layerName, delay)
{
if (interRupt[layerName] > 0) {return;}
if (layerStatus[layerName] > 0)
	{
	interRupt[layerName] = 1;
	setTimeout('moveBack("'+layerName+'",' + delay + ')',300);
	return;
	}
targetName[layerName] = "out";
interRupt[layerName] = 0;
setTimeout('moveBack2("'+layerName+'")',delay);
}

function moveBack2(layerName)
{
if (targetName[layerName] == "in") {return;}
moveToNow(layerName,homeX[layerName],homeY[layerName]);
}
var x0Pos, y0Pos, xDim, yDim, yDim3, yPos;
var txts = new Array();
function warnungPre()
{
yDim = document.body.clientHeight;
yDim3 = yDim / 3;
yPos = 2 * yDim3;
xDim = document.body.clientWidth;
x0Pos = 20 - xDim;
y0Pos = yDim - 20;
txts[0] = 'Bildschirmarbeit<br>kann Ihre sozialen Kontakte<br>gefährden';
txts[1] = 'Internet kann zu<br>erhöhten Telefonkosten führen';
txts[2] = 'Dieses Bildschirmfenster enthält<br>' + yDim*xDim + ' Bildpunkte';
}
function move2To()	{moveTo("antwort1",0,yPos);}
function move2Back()	{moveBack("antwort1",3000)}
function doWarnung()
{
warnungPre();
document.write ('<table id="antwort1" style="position:absolute; left:' + x0Pos + 'px; top:' + y0Pos + 'px; z-index:1" cellspacing=0 cellpadding=0 width="' + xDim + '" height="' + yDim3 + '">');
document.write ('<tr><td width="20" height="20"  bgColor="black"></td><td width="200"  bgColor="black"></td>');
document.write ('<td height="20" width="20"  bgColor="black"><a onClick="move2To()" onMouseOut="move2Back()"><font color="white">?</font></a></td></tr>');
document.write ('<tr><td width="20"  bgColor="black"></td><td  bgColor="white" align="center" valign="middle"><h1>');
jtxts = Math.round(txts.length*Math.random()-0.5);
document.write ("<font color='black'>" + txts[jtxts] + "</font>");
document.write ('</h1></td><td height="20" width="20"  bgColor="black"></td></tr><tr><td width="20"  bgColor="black"></td><td  bgColor="black">');
document.write ('</td><td height="20" width="20"  bgColor="black"></td></tr></table>');
defineLayer('antwort1',x0Pos,y0Pos);
}






