// written by Ulrich Szagun, 2000
<!--

function distance(x1, y1, x2, y2){
	xwert = Math.abs(x1-x2);
	ywert = Math.abs(y1-y2);
	distwert = Math.sqrt (xwert*xwert+ywert*ywert);
	return distwert;
}

function angle(x1, y1, x2, y2){
	xinc2 = Math.round(x1-x2);
	yinc2 = Math.round(y1-y2);
	winkel2 = Math.atan(yinc2/xinc2)/(Math.PI/180);
	if (xinc2 < 0) winkel2 += 180;
	return winkel2;
}

function moveangle(obj, winkel, pix) {
	xinc = pix*Math.cos(winkel*Math.PI/180);
	yinc = pix*Math.sin(winkel*Math.PI/180);
	moveby (obj, xinc, yinc);
}

function moveto(obj, xo, yo){
	obj.xpos = xo;
	obj.ypos = yo;
	obj.left = obj.xpos;
	obj.top  = obj.ypos;
}
function moveby(obj, xo, yo){
	obj.xpos += xo;
	obj.ypos += yo;
	obj.left = obj.xpos;
	obj.top  = obj.ypos;
}

function MouseMove (e) {
	x = (ns4) ? e.pageX : document.body.scrollLeft+event.x
	y = (ns4) ? e.pageY : document.body.scrollTop+event.y
	return true;
}


function showObject(obj){
if (ns4) obj.visibility = "show";
else if ((ie4)||(ns5)) obj.visibility = "visible";
}

function hideObject(obj){
if (ns4) obj.visibility = "hide";
else if (ie4) obj.visibility = "hidden";
}

function preload(imgObj, imgSrc){
	if (document.images)
	{
	 eval(imgObj + ' = new Image()');
	 eval(imgObj + '.src = "' + imgSrc + '"');
	}
}

function writeLayer (id, nested, text){
if (ns4) {
	var lyr = (nested) ? eval("document." + nested + ".document." + id + ".document"): document.layers[id].document;
	lyr.open();
	lyr.write(text);
	lyr.close();
}
else if (ie4)
{
	document.all[id].innerHTML = text;
}
else if (ns5)
{
	document.getElementById(id).innerHTML = text;
}
}

function changeImage(layer,imgName,imgObj){
	if (document.layers && layer!= null) 
	{
	eval ('document.'+layer+'.document["' + imgName + '"].src = "'+imgObj+'"');
	//window.alert ("hier");
	}
	else 
	{
	document.images[imgName].src = imgObj;
	//window.alert ("dort");
	}
}

//-->