<!--
function insert_up (path, add_image_name)
{
	var abstand = 640;
	if (document.all)
	{
		abstand = document.body.offsetHeight;
	}
	else
	{
		abstand = window.innerHeight;
	}
	abstand = abstand - 20;

	if (DOM)
	{
		layer = layer_get ('layerbottom');
		var y = 0;
		y = layer.offsetTop;
		counter = Math.floor ((y - 20) / abstand);
		var text = '';
		for (var a = 0; a < counter; a++)
		{
			py = (a + 1) * abstand - 20;
			if (a == 0)
			{
				l = "top";
				l2 = 0;
			}
			else
			{
				l = a - 1;
				l2 = l + 1;
			}
			text = text + "<div id=\"layerup" + a + "\" style=\"position:absolute; left:4px; top:" + py + "px; visibility:visible;\"><a name=\"page" + a + "\"></a><br>";
			text = text + "<a href=\"#page" + l2 + "\"><img src=\"" + path + "static/bullet_down" + add_image_name + ".gif\" border=\"0\"></a>";
			text = text + "</div>";
		} // for
		if (a > 0)
		{
			text = text + "<div id=\"layerup" + a + "\" style=\"position:absolute; left:4px; top:" + y + "px; visibility:visible;\"><a href=\"#pagetop\"><img src=\"" + path + "static/bullet_up" + add_image_name + ".gif\" border=\"0\"></a><br><br><a name=\"page" + a + "\"></a></div>";
			layer_write ("layerallup", text)
		}
	}
}

function statusbar_message (message_text)
{
	window.status = message_text;
}

function openwin (winname, location, winwidth, winheight, scrollbars)
{
	openwin_xy (winname, location, winwidth, winheight, scrollbars, screen.width/2-(winwidth/2), screen.height/2-(winheight/2))
}

function openwin_xy (winname, location, winwidth, winheight, scrollbars, x, y)
{
	if (scrollbars == "") { scrollbars = ",scrollbars=no," } else { scrollbars = "," + scrollbars + "," }
	fenster = window.open ('', winname, 'width=' + winwidth + ',height=' + winheight + scrollbars + 'resizable=yes,toolbar=no,status=no,directories=no,menubar=no,location=no');
	fenster.moveTo (x, y);
	fenster.location.href = location;
	fenster.focus ();
}

function checkTextObj (textobj, minlen)
{
	var str = new String (textobj.value);

	if (textobj.name.indexOf("email") >= 0) {
		if ((str.indexOf("@") < 1) || (str.lastIndexOf(".") < str.lastIndexOf("@"))) return (-2)
	}

	if (textobj.name.indexOf("fon") >= 0 || textobj.name.indexOf("fax") >= 0 || textobj.name.indexOf("mobil") >= 0 || textobj.name.indexOf("plz") >= 0) {
		z = 0;
		for(i = 0; i < textobj.value.length; ++i) {
			if ((textobj.value.charAt(i) < "0" || textobj.value.charAt(i) > "9") || (textobj.name.indexOf("plz") < 0 && textobj.value.charAt(i) != " ")) z = -2;
		}
		if (z < 0) return z
	}

	if (str.length < minlen) return (-1);
	return (0);
}

function dm (msgStr)
{
	if (msgStr != "") statusTextOn(msgStr); else statusTextOff()
}

function statusTextNS6 ()
{
	window.status = linkTxt;
	return true
}

function statusTextOn (msg)
{
	linkTxt = msg;
	if (NS6) document.addEventListener("mousemove", statusTextNS6, false);
	window.status = linkTxt;
	return true
}

function statusTextOff ()
{
	linkTxt = "";
	if (NS6) document.removeEventListener("mousemove", statusTextNS6,false);
	window.status = linkTxt;
	return true
}
//-->
