function hoch() {
  
	zaehler = ((position+1) > anzahlpanels()) ? anzahlpanels() : position+1 ;
	zaehlerrunter = ((position-1) == 0 ) ? 1 : position-1;


	inhalt = '#panel-' + zaehler;
	inhaltrunter = '#panel-'+zaehlerrunter;
  document.getElementById('hochbutton').setAttribute('rel', inhalt);
	document.getElementById('runterbutton').setAttribute('rel', inhaltrunter);
	//alert(position);
	if (position < anzahlpanels()) {position++} else {
    position = 1;
    
		var maxinhalt = '#panel-'+ anzahlpanels();
		var mininhalt = '#panel-'+ position;
		document.getElementById('hochbutton').setAttribute('rel', mininhalt );
		document.getElementById('runterbutton').setAttribute('rel', maxinhalt);
	};		
}


function runter() {
  zaehler = ((position+1) > anzahlpanels()) ? anzahlpanels() : position+1 ;
	zaehlerrunter = ((position-1) == 0 ) ? 1 : position-1 ;

//alert(position);

	inhalt = '#panel-'+zaehler;	
	inhaltrunter = '#panel-'+zaehlerrunter;

	document.getElementById('hochbutton').setAttribute('rel', inhalt);
	document.getElementById('runterbutton').setAttribute('rel', inhaltrunter);

	if (position > 1) {position--;} else {
		position=anzahlpanels();
		
		var maxinhalt = '#panel-' + anzahlpanels();
		var mininhalt = '#panel-1';
		document.getElementById('hochbutton').setAttribute('rel', mininhalt);
		document.getElementById('runterbutton').setAttribute('rel', maxinhalt);
	};
}
	
function anzahlpanels() {

	var counter = 1;
	var dername = 'panel-'+counter;	
	var dieanzahl = 0;
	var i = false;
	
	while (i != true) {
	if (document.getElementById(dername)) {
		counter++;
		dername = 'panel-'+counter;	
		dieanzahl = counter;	
	} else {
	dieanzahl--;
	i = true;
	};
	}
	return dieanzahl;
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function changeClass(inId, inClass) {
	document.getElementById(inId).className = inClass; 
}

function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
