// JavaScript Document
<!-- VarSubWindow  -->
function OpenScreenXY(DURL,Xsize,Ysize) {

  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=yes,status=0,toolbar=0");
    	if(w != null) {
    		if (w.opener == null) w.opener=self;
    		w.location.href=DURL;
                w.focus();
    	}
}

function OpenEditor(DURL) {
  Ysize = 600;
  Xsize = 600;
  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();
    	}
}

function openAGB(tree){
	var sw = 400;
  	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='../popup.php?id=7&tree=' + tree;
                wi.focus();
    	}
}