// function MM_openBrWindow(theURL,winName,features) { //v2.0
function open_function(url,width,height,options) {
  self.name = "myOpener";
  self.msgWindow = open(url, "Window", "width=" + width + ",height=" + height
    + ",screenX=" + (screen.width-width)/2
    + ",screenY=" + (screen.height-height)/2
    + ",dependent=yes"
    + ",left=" + (screen.width-width)/2
    + ",top=" + (screen.height-height)/2
    + options
    );
  if (self.msgWindow) {
    self.msgWindow.focus();
    if (self.msgWindow.opener == null) self.msgWindow.opener = self;
  }
}

// Nachtplaner Popup

function popUp(theURL,winName,features) {
  remote = window.open(theURL,winName,features);
  if (remote.opener == null)
    remote.opener = window;
    remote.opener.name = "frContent";
  remote.focus;
}



// Elemente ein- oder ausblenden
function toggleDisplay(id) {
  el = document.getElementById(id);
  var display = el.style.display ? '' : 'none';
  el.style.display = display; 
}

//get Window height for explorer
function getWindowHeight(win) { if (win == undefined) win = window; if (win.innerHeight) { return win.innerHeight; } else { if (win.document.documentElement && win.document.documentElement.clientHeight) { return win.document.documentElement.clientHeight; } return win.document.body.offsetHeight; } }


// set height of inner content element
function setContentHeight() {

	if(document.getElementById('body')) {
    	//get sizes
        if (document.all) { 
			var window_height = getWindowHeight();
			var delta = 305;
		} else { 
			var window_height = window.innerHeight;
			var delta = 325;
		}
		document.getElementById('body').style.height= (window_height - delta)+'px'; //338
	}
}

// register window events
	window.onresize = setContentHeight;
	//window.addEventListener?window.addEventListener("load",setContentHeight,false):window.attachEvent("onload",setContentHeight);




