// JavaScript Document

function gE(id){
	return document.getElementById(id);
}

//Kalender im kleinen PopUp
function OpenDate(DURL) {
  var sw = 180;
  var sh = 200;
  var sy = (screen.availHeight - sh - 30) / 2;
  var sx = (screen.availWidth - sw) / 2;

  if(screen.availWidth < sw){
    sh = screen.availHeight - 50;
    sw = screen.availWidth;
    sy = 0;
    sx = 0;
  }
  var sa = "height="+sh+",width="+sw+",screenX="+sx+",left="+sx+",screenY="+sy+",top="+sy;
  var wi=window.open("","Preview",sa+",channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0");

    	if(wi != null) {
    		if (wi.opener == null) wi.opener=self;
    		wi.location.href=DURL;
                wi.focus();
    	}
}

// Seite im PopUp
function OpenFenster(DURL) {
  var sw = 520;
  var sh = 600;
  var sy = (screen.availHeight - sh - 30) / 2;
  var sx = (screen.availWidth - sw) / 2;

  if(screen.availWidth < sw){
    sh = screen.availHeight - 50;
    sw = screen.availWidth;
    sy = 0;
    sx = 0;
  }
  var sa = "height="+sh+",width="+sw+",screenX="+sx+",left="+sx+",screenY="+sy+",top="+sy;
  var wi=window.open("","Preview",sa+",channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0");

    	if(wi != null) {
    		if (wi.opener == null) wi.opener=self;
    		wi.location.href=DURL;
                wi.focus();
    	}
}

// Seite im PopUp
function OpenInfo(DURL) {
  var sw = 430;
  var sh = 300;
  var sy = (screen.availHeight - sh - 30) / 2;
  var sx = (screen.availWidth - sw) / 2;

  if(screen.availWidth < sw){
    sh = screen.availHeight - 50;
    sw = screen.availWidth;
    sy = 0;
    sx = 0;
  }
  var sa = "height="+sh+",width="+sw+",screenX="+sx+",left="+sx+",screenY="+sy+",top="+sy;
  var wi=window.open("","Preview",sa+",channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0");

    	if(wi != null) {
    		if (wi.opener == null) wi.opener=self;
    		wi.location.href=DURL;
                wi.focus();
    	}
}

function OpenEditor(DURL) {
  Ysize = 650;
  Xsize = 650;
  w=window.open("","Window0","height="+Ysize+",width="+Xsize+",screenX=50,left=50,screenY=50,top=50,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=no,status=0,toolbar=0");
    	if(w != null) {
    		if (w.opener == null) w.opener=self;
    		w.location.href=DURL;
                w.focus();
    	}
}
