function activateTerminal(T){
	var oT=(T==1)?2:1;
	var id1h='info_link'+T;
	var id2h='info_link'+oT;
	var id1c='info_content'+T;
	var id2c='info_content'+oT;
	var bgimage=(T==1)?'url(./media/pixel/bg/infoterminalheada.png) no-repeat transparent':'url(./media/pixel/bg/infoterminalheadb.png) no-repeat transparent';
	var topClass='info_terminaltop'+T;
	var taClass='infoterminal_link'+T;
	var tiClass='infoterminal_link'+oT+' inactive';
	var tClass2=(T==1)?'infoterminal_link2':'infoterminal_link2 inactive';
	document.getElementById(id1h).className=taClass;
	document.getElementById(id2h).className=tiClass;
	document.getElementById(id1c).style.display='';
	document.getElementById(id2c).style.display='none';
	document.getElementById('terminal_top').className=topClass;
}

/**
 *
 * @access public
 * @return void
 **/
function printview(){
//	window.print();
//alert('druck läuft... ');
	printContent(document.getElementById('main_content'));
}

function printContent(ctrl){
	var DocumentContainer = ctrl;
	var WindowObject = window.open('', "Print",
	"width=630,height=800,top=100,left=345,toolbars=no,scrollbars=no,status=no,resizable=no");
	WindowObject.document.write("<link href='./fileadmin/css/main_pr.css' rel='stylesheet' type='text/css' />");
	WindowObject.document.write("<link href='./fileadmin/css/rss.css' rel='stylesheet' type='text/css' />");
	WindowObject.document.write("<img width='80' style='margin-left:15px;' src='./fileadmin/media/pixel/bg/headlogo.png' />");
	WindowObject.document.write(DocumentContainer.innerHTML);
	WindowObject.document.close();
	WindowObject.focus();
	WindowObject.print();
	WindowObject.close();
}

/**
 *
 * @access public
 * @return void
 **/
function search(){
	alert('Diese Funktion ist noch nicht implementiert');
}
/**
 *
 * @access public
 * @return void
 **/
function login(){
	alert('Diese Funktion ist noch nicht implementiert');
}
/**
 *
 * @access public
 * @return void
 **/
function translate(){
	alert('Diese Funktion ist noch nicht implementiert');
}


/**
 * ermittelt die zu setzende zentrale position eines Layers
 * abh. von layergröße, Fenstergröße und scrollversatz des browsers
 **/
function setCenterPos(element, elwidth, elheight){
	var msd_ns6=document.getElementById && !document.all;
	var ie=document.getElementById && document.all;
	ScrollversatzY=getScrollTop()/2;
	if(ie){

	}
	ScrollversatzX=getScrollLeft();
	var iw=getInnerWidth();
	var ih=getInnerHeight();

	var x=0;
	var y=0;
	//var coordsContent = getCoords('content');
	if(varCon=document.getElementById('content')){
		var coordsContent =  get_Position(varCon);
		x=coordsContent.x;
		y=coordsContent.y;
		//alert(y);
	}
	else{
		x=0;
		y=0;
	}
	//x=0;
	iw=iw/2;
	ih=ih/2;

	x=iw-(elwidth/2)-x+ScrollversatzX;

	if(ie){
		y=50+y+ScrollversatzY;
		x-=50;
	}
	else{
		y=ih-elheight-y+ScrollversatzY;
	}
	//das Fenster muss vollständig zu sehen sein.
	x=Math.max(ScrollversatzX+40,x*(-1),x);
	y=Math.max(ScrollversatzY+y,y);
	element.style.position='absolute';
	element.style.margin='0';
	element.style.left=x+'px';
	element.style.top=y+'px';
}


function get_Position(element){
  var elem=element,tagname="",x=0,y=0;
  while ((typeof(elem)=="object")&&(typeof(elem.tagName)!="undefined")){
    y+=elem.offsetTop;
    x+=elem.offsetLeft;
    tagname=elem.tagName.toUpperCase();
    if (tagname=="BODY"){elem=0;}
    if (typeof(elem)=="object"){
		if (typeof(elem.offsetParent)=="object"){
			elem=elem.offsetParent;
		}
	}
  }
  position=new Object();
  position.x=x;
  position.y=y;
  return position;
}


function getScrollTop(){
	var scrollPos;
	if (typeof window.pageYOffset != 'undefined') {
	   scrollPos = window.pageYOffset;
	}
	else if (typeof document.compatMode != 'undefined' &&
		 document.compatMode != 'BackCompat') {
	   scrollPos = document.documentElement.scrollTop;
	}
	else if (typeof document.body != 'undefined') {
	   scrollPos = document.body.scrollTop;
	}
	return scrollPos;
}

function getScrollLeft(){
	var scrollPos;
	if (typeof window.pageYOffset != 'undefined') {
	   scrollPos = window.pageXOffset;
	}
	else if (typeof document.compatMode != 'undefined' &&
		 document.compatMode != 'BackCompat') {
	   scrollPos = document.documentElement.scrollLeft;
	}
	else if (typeof document.body != 'undefined') {
	   scrollLeft = document.body.scrollLeft;
	}
	return scrollPos;
}

//gibt die innere fensterhöhe des Browsers wieder
function getInnerHeight() {
	if (window.innerHeight) // NS
	return window.innerHeight;
	else if (document.body && document.body.clientHeight) // IE
	return document.body.clientHeight;
	else return 0; // beide Funktionen unbekannt
}
//gibt die innere fensterbreite des Browsers wieder
function getInnerWidth() {
	if (window.innerWidth) // NS
	return window.innerWidth;
	else if (document.body && document.body.clientWidth) // IE
	return document.body.clientWidth;
	else return 0; // beide Funktionen unbekannt
}

