//id einblenden

function show(what) {
		target = document.getElementById(what);
		if (target) {
		target.style.display = 'block';
		}
	}
	
function hide(what) {
		target = document.getElementById(what);
		if (target) {
		target.style.display = 'none';
		}
	}

//link umschreiben
function changeLink(what) {
  var value = document.getElementById(what).href;
  var target = document.getElementById(what);
  var up = value.split('show');
  var there = up.length;
    //alert (""+there+"");
	if (there >= "2") {
	that=value.replace(/show/g, "hide");
	target.className= 'up';
	}
	else {
	that=value.replace(/hide/g, "show");
	target.className= '';
	}
	document.getElementById(what).href = ''+that+'';
}



//id langsam einblenden

function fade (element, from, to, current) {
  if (typeof current == 'undefined') {
    current = from;
  }
  if (typeof element.style.opacity != 'undefined') {
    element.style.opacity = current;
  }
  else if (typeof element.style.filter != 'undefined') {
    element.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + (current * 100) + ')';
  }
  if (from > to) {
    current -= 0.1;
    current = Math.round(current * 100) / 100;
    if (current >= to) {
      setTimeout(function () { fade(element, from, to, current); }, 10);
    }
  }
  else {
    current += 0.1;
    current = Math.round(current * 100) / 100;
    if (current <= to) {
      setTimeout(function () { fade(element, from, to, current); }, 10);
    }
  }
}






