var LANG_nachoben = "Nach oben";


//DHTML

// globale Var
// var lastTopicElem = "none";
//Zeigt das Erste element in einer DHTML Liste an, nicht mehr über xsl gelöst wegen Formatierungsproblemen, mk 11.05.06
function changeContentStart(strTarget, strTopic, aktiv)
{
// Create connection to select td element

if(aktiv == '1')
{
  // (gs)
	//objContainer = document.all[strTarget];
	objContainer = document.getElementById(strTarget);
	var elem= "tdbut" + strTopic;
	//alert("lasttopicElen=" + lastTopicElem);
	if (! (f=document.getElementById(elem)))
	{
		// do nothing
	}
	else
	{
		if (lastTopicElem != "none")
		{
			document.getElementById(lastTopicElem).className = "dhtml_normal";
		}
		document.getElementById(elem).className = "dhtml_actual";
		lastTopicElem = elem;
// Insert new content text
// make some replacements in case of wrong xsl-output
	}

	//objContainer.innerHTML = arrDhtml[strTopic];
	objContainer.innerHTML = document.getElementById(strTopic).innerHTML
}
// (gs)
//goModul(1);
}


function changeContent(strTarget, strTopic) {
// Create connection to select td element
//objContainer = document.all[strTarget];
objContainer = document.getElementById(strTarget);
var elem= "tdbut" + strTopic;
//alert("lasttopicElen=" + lastTopicElem);
//alert("changeContent mux : "+elem);
if (! (f=document.getElementById(elem))){
	// do nothing
} else {
//  alert("changeContent else part");
	if (lastTopicElem != "none") {
		document.getElementById(lastTopicElem).className = "dhtml_normal";
	}
	document.getElementById(elem).className = "dhtml_actual";
  lastTopicElem = elem;
// Insert new content text
// make some replacements in case of wrong xsl-output
}

//objContainer.innerHTML = arrDhtml[strTopic];
objContainer.innerHTML = document.getElementById(strTopic).innerHTML;
// (gs)
//goModul(1);
}

function setActiveListItem(strTopic){
//  alert("setActiveListItem("+strTopic+")");
  var i = 0;
  var elem = document.getElementById("dhtml_link_dhtml"+i);
  while(elem!=null)
  {
    if ( ("dhtml"+i) == strTopic )
      elem.className = "inSmall_highlighted";
    else
      elem.className = "inSmall";
    // incement i; and get elem at index i;
    i++;
    elem = document.getElementById("dhtml_link_dhtml"+i);
    //alert(elem);
  }
}

function manageTopButton(strRootPath) {
	var code; // HTML-code, der bei nachoben eingefuegt werden soll
	var cH;  // cH - Hoehe des content
	var cT;  // cT - TopOffset content

	code=' <table class="nachObenZelle" border="0" cellpadding="0" cellspacing="0">';
        /*
code+='     <tr>';
code+='       <td width="100%" valign="top">';
code+='         <table border="0" cellpadding="0" cellspacing="0">';
        */
code+='           <tr>';
code+='             <td colspan="3"><img src="' + strRootPath +'/media/global/blind.gif" width="1" height="10" /></td>';
code+='           </tr>';
code+='           <tr>';
// code+='             <td width="20" height="1"><img src="' +strRootPath +'/media/global/blind.gif" width="10" height="1" /></td>';
code+='             <td width="20" height="1" valign="middle" align="center"><a href="#top" ><img src="'+strRootPath+'/media/global/arrow_yellow-up.gif" border="0" height="5" /></a></td>';
code+='             <td class="txtcontentlink"><a href="#top" class="txtcontentlink">';
code+='             <text>'+ LANG_nachoben + '</text></a><br /></td>';
code+='             <td width="10" height="1"><img src="'+strRootPath+'/media/global/blind.gif" width="10" height="1" /></td>';
code+='           </tr>';
 code+='           <tr><td height="20"></td></tr>'; // Abstand zum besseren Klicken
code+='         </table>';
/*
code+='       </td>';
code+='       <td width="160" valign="top"><img src="'+strRootPath+'/media/global/picto_nachoben.gif" /></td>';
code+='     </tr>';
code+='   </table>';
*/





	if (! document.getElementById("tableMiddleCol")){
		return(0);
	}
	mcH = document.getElementById("tableMiddleCol").offsetHeight;
	bH = document.body.offsetHeight;

	if (mcH > bH){

	document.getElementById("place4topButton").innerHTML = code;
	} else {
	document.getElementById("place4topButton").innerHTML = '';
}
}

function markierung_up(a){
//	document.getElementById(a).style.visibility="visible";
}

function markierung_down(b){
	//document.getElementById(b).style.visibility="hidden";
}

