var buttonsLow = new Array();

buttonsLow["parent"] = new Image();
buttonsLow["parent"].src = "/cms/pix/buttons/button_parent.gif";

buttonsLow["image"]  = new Image();
buttonsLow["image"].src  = "/cms/pix/buttons/button_image.gif";

buttonsLow["editAttributes"]  = new Image();
buttonsLow["editAttributes"].src  = "/cms/pix/stripe/btn_fct_attribute_edit.gif";

buttonsLow["clear"]  = new Image();
buttonsLow["clear"].src  = "/cms/pix/stripe/btn_fct_clear.gif";

buttonsLow["abc"]    = new Image();
buttonsLow["abc"].src    = "/cms/pix/stripe/btn_fct_abc.gif";

buttonsLow["bold"]   = new Image();
buttonsLow["bold"].src   = "/cms/pix/stripe/btn_fct_bold.gif";

buttonsLow["link"]   = new Image();
buttonsLow["link"].src   = "/cms/pix/stripe/btn_fct_link.gif";

buttonsLow["linkpool"]   = new Image();
buttonsLow["linkpool"].src   = "/cms/pix/stripe/btn_fct_link_pool.gif";

buttonsLow["linkext"]   = new Image();
buttonsLow["linkext"].src   = "/cms/pix/stripe/btn_fct_link_ext.gif";

buttonsLow["scaledown"]   = new Image();
buttonsLow["scaledown"].src   = "/cms/pix/stripe/btn_fct_scaledown.gif";

buttonsLow["scaleup"]   = new Image();
buttonsLow["scaleup"].src   = "/cms/pix/stripe/btn_fct_scaleup.gif";

buttonsLow["acronym"]   = new Image();
buttonsLow["acronym"].src   = "/cms/pix/stripe/btn_fct_acronym.gif";

buttonsLow["list"]   = new Image();
buttonsLow["list"].src   = "/cms/pix/stripe/btn_fct_list.gif";

buttonsLow["list_unordered"]   = new Image();
buttonsLow["list_unordered"].src   = "/cms/pix/stripe/btn_fct_list_unordered.gif";

buttonsLow["list_alpha"]   = new Image();
buttonsLow["list_alpha"].src   = "/cms/pix/stripe/btn_fct_list_alpha.gif";

buttonsLow["list_numbered"]   = new Image();
buttonsLow["list_numbered"].src   = "/cms/pix/stripe/btn_fct_list_numbered.gif";

buttonsLow["headline"]   = new Image();
buttonsLow["headline"].src   = "/cms/pix/stripe/btn_fct_headline.gif";

buttonsLow["headline_1"]   = new Image();
buttonsLow["headline_1"].src   = "/cms/pix/stripe/btn_fct_headline_1.gif";

buttonsLow["headline_2"]   = new Image();
buttonsLow["headline_2"].src   = "/cms/pix/stripe/btn_fct_headline_2.gif";

buttonsLow["headline_3"]   = new Image();
buttonsLow["headline_3"].src   = "/cms/pix/stripe/btn_fct_headline_3.gif";


var buttonsHigh = new Array();

buttonsHigh["parent"] = new Image();
buttonsHigh["parent"].src = "/cms/pix/buttons/button_parent_hi.gif";

buttonsHigh["image"]  = new Image();
buttonsHigh["image"].src  = "/cms/pix/buttons/button_image_hi.gif";

buttonsHigh["editAttributes"]  = new Image();
buttonsHigh["editAttributes"].src  = "/cms/pix/stripe/btn_fct_attribute_edit_hi.gif";

buttonsHigh["clear"]  = new Image();
buttonsHigh["clear"].src  = "/cms/pix/stripe/btn_fct_clear_hi.gif";

buttonsHigh["abc"]    = new Image();
buttonsHigh["abc"].src    = "/cms/pix/stripe/btn_fct_abc_hi.gif";

buttonsHigh["bold"]   = new Image();
buttonsHigh["bold"].src   = "/cms/pix/stripe/btn_fct_bold_hi.gif";

buttonsHigh["link"]   = new Image();
buttonsHigh["link"].src   = "/cms/pix/stripe/btn_fct_link_hi.gif";

buttonsHigh["linkpool"]   = new Image();
buttonsHigh["linkpool"].src   = "/cms/pix/stripe/btn_fct_link_pool_hi.gif";

buttonsHigh["linkext"]   = new Image();
buttonsHigh["linkext"].src   = "/cms/pix/stripe/btn_fct_link_ext_hi.gif";

buttonsHigh["scaledown"]   = new Image();
buttonsHigh["scaledown"].src   = "/cms/pix/stripe/btn_fct_scaledown_hi.gif";

buttonsHigh["scaleup"]   = new Image();
buttonsHigh["scaleup"].src   = "/cms/pix/stripe/btn_fct_scaleup_hi.gif";

buttonsHigh["acronym"]   = new Image();
buttonsHigh["acronym"].src   = "/cms/pix/stripe/btn_fct_acronym_hi.gif";

buttonsHigh["list"]   = new Image();
buttonsHigh["list"].src   = "/cms/pix/stripe/btn_fct_list_hi.gif";

buttonsHigh["list_unordered"]   = new Image();
buttonsHigh["list_unordered"].src   = "/cms/pix/stripe/btn_fct_list_unordered.gif";

buttonsHigh["list_alpha"]   = new Image();
buttonsHigh["list_alpha"].src   = "/cms/pix/stripe/btn_fct_list_alpha.gif";

buttonsHigh["list_numbered"]   = new Image();
buttonsHigh["list_numbered"].src   = "/cms/pix/stripe/btn_fct_list_numbered.gif";

buttonsHigh["headline"]   = new Image();
buttonsHigh["headline"].src   = "/cms/pix/stripe/btn_fct_headline_hi.gif";

buttonsHigh["headline_1"]   = new Image();
buttonsHigh["headline_1"].src   = "/cms/pix/stripe/btn_fct_headline_1_hi.gif";

buttonsHigh["headline_2"]   = new Image();
buttonsHigh["headline_2"].src   = "/cms/pix/stripe/btn_fct_headline_2_hi.gif";

buttonsHigh["headline_3"]   = new Image();
buttonsHigh["headline_3"].src   = "/cms/pix/stripe/btn_fct_headline_3_hi.gif";


// image changing function for mouseOver effects
// only for button which are not in the 'SQL-LIST'
function imgCh(imageName, imageType, mode)
{
	if(document.images)
	{
		if(mode=="lo")
		{
			document.images["img"+imageName].src = buttonsLow[imageType].src;
		}
		else if(mode=="hi")
		{
			document.images["img"+imageName].src = buttonsHigh[imageType].src;
		}
		else
		{
			alert("ERROR: Please check the mouseOver-Function!");
		}
	}
}



function viewVersion(url)
{
	top.location.href = url;
}





function wxwSwitchUserList(userRight)
{
	document.getElementById("userList1").style.display = "none";
	document.getElementById("userList2").style.display = "none";
	document.getElementById("userList3").style.display = "none";
	document.getElementById("userList"+userRight).style.display = "block";
}



function imgCh2(imageName, imagePath, mode)
{
	if(mode=="lo")
	{
		mode = "";
	}
	else
	{
		mode = "_hi";
	}
	var imgName = imagePath.replace(/([^\/]*)\.gif/, "$1");
	if(document.images)
	{
		document.images[imageName].src = imgName + mode + ".gif";
	}
}


function wxwTDLight(column, setColor)
{
	var elmAttr = column.getAttribute('className');

	if(elmAttr=="wxwFolderDummy") {
		var tds = column.getElementsByTagName("td");
		for(i=0; i<tds.length; i++) {
			tds[i].style.backgroundColor = setColor;
		}
	}
	else {
		column.style.backgroundColor = setColor;
	}
}




function sC(theRow, theRowNum, theColor)
{
	var theCells = theRow.cells;
	var	rowCellsCnt	 = theCells.length;

	if (typeof(window.opera) ==	'undefined' && typeof(theCells[0].style.getAttribute) != 'undefined')
	{
		domDetect = true;
	}
	else
	{
		domDetect = false;
	}

	if(domDetect)
	{
		for(c=0; c<rowCellsCnt; c++)
		{
			if(theColor!='0')
			{
				tmpCol = theCells[c].style.getAttribute('backgroundColor');
				theCells[c].style.setAttribute('tmpCol', tmpCol, 0);
				theCells[c].style.setAttribute('backgroundColor', theColor, 0);
			}
			else
			{
				tmpCol = theCells[c].style.getAttribute('tmpCol');
				theCells[c].style.setAttribute('backgroundColor', tmpCol, 0);
			}
			//alert(theCells[c].style.getAttribute('backgroundColor', false));
			//theCells[c].style.setAttribute('backgroundColor', theColor, 0);

		}
	}
	else
	{
		for(c=0; c<rowCellsCnt; c++)
		{
			if(theColor!='0')
			{
				tmpCol = theCells[c].style.backgroundColor;
				theCells[c].style.tmpCol = tmpCol;
				theCells[c].style.backgroundColor = theColor;
			}
			else
			{
				tmpCol = theCells[c].style.tmpCol;
				theCells[c].style.backgroundColor = tmpCol;
			}
			//theCells[c].style.backgroundColor =	theColor;
		}
	}
}




// used only in advanced lists (category-browser etc.)
function sCadv(theRow, theRowNum, theColor)
{
	if (typeof(window.opera) ==	'undefined' && typeof(theRow.style.getAttribute) != 'undefined')
	{
		theRow.style.setAttribute('backgroundColor', theColor, 0);
	}
	else
	{
		theRow.style.backgroundColor = theColor;
	}
}




// used only in the diff-mode
function showInfo(displayMode)
{
	var pBox = document.getElementById("previewBox");
	var fBox = document.getElementById("frameBox");

	if(displayMode=="slide")
	{
		if(fBox.style.display == "none")
		{
			fBox.style.display = "block";
			fBox.style.width = "1000px";
			pBox.style.display = "none";
		}
		else
		{
			pBox.style.display = "block";
			pBox.style.width = "1000px";
			fBox.style.display = "none";
		}
	}
	else
	{
		pBox.style.width = "500";
		fBox.style.width = "500";
		pBox.style.display = "block";
		fBox.style.display = "block";
	}
}








var	marked_row = new Array;

/**
 * Sets/unsets the pointer and marker in browse	mode
 * @param	object	  the table	row
 * @param	interger  the row number
 * @param	string	  the action calling this script (over,	out	or click)
 * @param	string	  the default background color
 * @param	string	  the color	to use for mouseover
 * @param	string	  the color	to use for marking a row
 * @return	boolean	 whether pointer is	set	or not
 */
function setColumn(theRow, theRowNum, theAction, theDefaultColor, thePointerColor, theMarkColor)
{
	var	theCells = null;

	// 1. Pointer and mark feature are disabled	or the browser can't get the row -> exits
	if ((thePointerColor=='' && theMarkColor=='') || typeof(theRow.style)=='undefined')
	{
		return false;
	}

	// 2. Gets the current row and exits if	the	browser	can't get it
	if (typeof(document.getElementsByTagName)!='undefined')
	{
		theCells = theRow.getElementsByTagName('td');
	}
	else if	(typeof(theRow.cells)!='undefined')
	{
		theCells = theRow.cells;
	}
	else
	{
		return false;
	}

	// Gets the current color
	var	rowCellsCnt	 = theCells.length;
	var	domDetect	 = null;
	var	currentColor = null;
	var	newColor	 = null;

	// with	DOM	compatible browsers	except Opera that does not return valid values with "getAttribute"
	if (typeof(window.opera) ==	'undefined'
		&& typeof(theCells[0].style.getAttribute) != 'undefined')
		{
			currentColor = theCells[0].style.getAttribute('backgroundColor');
			domDetect = true;
	}

	// 3.2 ... with	other browsers
	else
	{
		currentColor = theCells[0].style.backgroundColor;
		domDetect = false;
	}

	// 4.1 Current color is	the	default	one
	if (currentColor=='' || currentColor.toLowerCase() == theDefaultColor.toLowerCase())
	{
		if (theAction=='over' && thePointerColor!='')
		{
			newColor = thePointerColor;
		}
		else if	(theAction=='click' && theMarkColor!='')
		{
			newColor = theMarkColor;
			marked_row[theRowNum] = true;
		}
	}

	// 4.1.2 Current color is the pointer one
	else if	(currentColor.toLowerCase())
	{
		if(theAction=='out')
		{
			newColor = theDefaultColor;
		}
		else if(theAction=='click' && theMarkColor!='')
		{
			newColor = theMarkColor;
			marked_row[theRowNum] = true;
		}
	}



	// 4.1.3 Current color is the marker one
	else if	((currentColor.toLowerCase())==(theMarkColor.toLowerCase()))
	{
		if (theAction == 'click')
		{
			newColor			  =	(thePointerColor !=	'')
								  ?	thePointerColor
								  :	theDefaultColor;
			marked_row[theRowNum] =	(typeof(marked_row[theRowNum]) == 'undefined' || !marked_row[theRowNum])
								  ?	true
								  :	null;
		}
	}



	// sets the new color
	if (newColor)
	{
		var	c =	null;
		// with	DOM	compatible browsers	except Opera
		if(domDetect)
		{
			for(c=0; c<rowCellsCnt; c++)
			{
				theCells[c].style.setAttribute('backgroundColor', newColor,	"false");
			}
		}
		// with other browsers
		else
		{
			for(c=0; c<rowCellsCnt; c++)
			{
				theCells[c].style.backgroundColor =	newColor;
			}
		}
	}
	return true;
}




function setAnker(area, pos)
{
	document.forms[0].action = document.forms[0].action + '#anker' + area + '_' + pos;
}
