//create onDomReady Event
      window.onDomReady = initReady;
 
      // Initialize event depending on browser
      function initReady(fn)
      {
      	//W3C-compliant browser
      	if(document.addEventListener) {
          document.addEventListener("DOMContentLoaded", fn, false);
        }
      	//IE
      	else {
          document.onreadystatechange = function(){readyState(fn)}
        }
      }
 
      //IE execute function
      function readyState(func)
      {
      	// DOM is ready
      	if(document.readyState == "interactive" || document.readyState == "complete")
      	{
      		func();
      	}
      }

//navi

function width(what, change) {
	width = (document.getElementById(what).offsetWidth);
	newwidth = 634 - width;
	target = document.getElementById(change);
	if (target) {
		target.style.width= ''+newwidth+'px';
		}
	}

//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';
		}
	}

//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);
    }
  }
}







