function wopen(theURL,winName,features) {
  window.open(theURL,winName,features);
}


/* fuer navi */
function arrowON (theID, theTYPE)
{
	if(theTYPE > 1)
	{
		document.getElementById(theID).src = $arrow_vertical.src;
	}
	else
	{
		document.getElementById(theID).src = $arrow_horizon.src;
	}
}

function arrowOFF (theID)
{
	document.getElementById(theID).src = $arrow_none.src;
}

/* fuer die aufklapp-inhalte */
function digitON (theID)
{
	document.getElementById(theID).src = $digit_on.src;
}

function digitOFF (theID)
{
	document.getElementById(theID).src = $digit_off.src;
}


/* fuer sonstige bildwechsel */
function swapimage(theID, image)
{
	$image_on = new Image(); $image_on.src = image;
	document.getElementById(theID).src = $image_on.src;
}


/* fuer download-vorschau */
function getRealLeft(el) {
	xPos = el.offsetLeft;
	tempEl = el.offsetParent;
/* brauchen wir nicht mehr in der vollen tiefe, weil wir jetzt alles absolut positioniert haben */
/*
	while (tempEl != null) {
		xPos += tempEl.offsetLeft;
		tempEl = tempEl.offsetParent;
	}
*/
	return xPos;
}


function getRealTop(el) {
	yPos = el.offsetTop;
	tempEl = el.offsetParent;
	while (tempEl != null) {
		yPos += tempEl.offsetTop;
		tempEl = tempEl.offsetParent;
	}
	return yPos;
}


function previewshow(thediv, imgid, col)
{
	/* mouse-position */
	/* die position der spalte war mal wichtig - ist es nicht mehr */
	var realX = getRealLeft(imgid) + (4 * 40) + 360;
	var realY = getRealTop(imgid) - 342;
	document.getElementById(thediv).style.left = realX + 'px';
	document.getElementById(thediv).style.top = realY + 'px';
	document.getElementById(thediv).style.display = 'block';
	return true;
}

function previewhide (thediv)
{
	document.getElementById(thediv).style.display = 'none';
	return true;
}



function toggle(ref)
{
	var e = document.getElementById(ref);
	var visi = (e.style.display == 'block') ? 'none' : 'block';
	e.style.display = visi;
}
