function oeffne(dateiname,winname,breite,hoehe,x,y,mitte,scroll, dependent)
{
	if (scroll == '1') scroll = "yes";
	if (scroll == '0') scroll = "no";
	
	if (dependent == '1') dependent = "yes";
	if (dependent == '0') dependent = "no";
	
	if (mitte != 1 && x == '') x = 0;
	if (mitte != 1 && y == '') y = 0;
	
	if (mitte == 1) {
		x = (screen.availWidth - breite)/2;
		y = (screen.availHeight - hoehe)/2;
		}
	
	var win = window.open(dateiname, winname,"screenX=" + x + ",screenY=" + y + ",left=" + x + ",top=" + y + ",status=no,toolbar=no,menubar=no,scrolling=" + scroll + ",dependent=" + dependent + ",scrollbars=" + scroll + ",width=" + breite + ",height=" + hoehe);
	if (win.focus) win.focus();
	if (navigator.appName != "Microsoft Internet Explorer") win.focus();
}

function highlightObj(obj, color)
{
	if (obj.tagName == "TD")
	{
		obj.bgColor ='#' + color;
	}
	else if (obj.tagName == "TR")
	{
		size = obj.cells.length;
		for (i=0; i<size; i++)
		{
			if (!obj.cells[i].background)
				obj.cells[i].bgColor = '#' + color;
		}
	}
	else
		obj.style.background = '#' + color;
}

function getObject(node, parent)
{
	obj = document.getElementById(node);

	if (parent && obj.form.name != parent)
		alert('Objekt-ID ' + node +  ' und Parent ' + parent + ' nicht eindeutig');
	else
		return obj;
}

function getObjectByNameAndIndex(node, index)
{
	objs = document.getElementsByName(node);

	return objs[index];
}

function setObjectValue(node, parent, value)
{
	objs = document.getElementsByName(node);

	for(i=0; i<objs.length;i++)
	{
		if (objs[i].parentNode.name == parent)
			objs[i].value = value;
	}
	
	return null;
}

function hideObj(objID)
{
	document.getElementById(objID).style.visibility = 'hidden';
	document.getElementById(objID).style.overflow = 'hidden';
}

function showObj(objID)
{
	document.getElementById(objID).style.visibility = 'visible';
	document.getElementById(objID).style.overflow = 'auto';
}

function showhideDiv(objID, value)
{
	if(value)
	{
		document.getElementById(objID).style.height = '100%';
		showObj(objID);
	}
	else
	{
		document.getElementById(objID).style.height = 1;
		hideObj(objID);
	}
}

function disableObj(objID)
{
	document.getElementById(objID).disabled = true;
}

function enableObj(objID)
{
	document.getElementById(objID).disabled = false;
}

function enablediableObj(objID, value)
{
	if (value)
		enableObj(objID);
	else
		disableObj(objID);
}

function highlightMenu(obj)
{
	obj.className = 'naviColored';
}

function dehighlightMenu(obj)
{
	obj.className = 'naviNormal';
}

function highlight(obj)
{
	size = obj.cells.length;
	for (i=0; i<size; i++)
	{
		if (!obj.cells[i].background)
			obj.cells[i].bgColor = '#D6E660';
	}
}

function dehighlight(obj)
{
	size = obj.cells.length;
	for (i=0; i<size; i++)
	{
		if (!obj.cells[i].background)
			obj.cells[i].bgColor = '#FFFFFF';
	}
}

function highlightObj(obj, color)
{
	obj.style.background = '#' + color;
}

function dehighlightObj(obj, color)
{
	obj.style.background = '#' + color;
}
