// Functionen zum Oeffnen von Hilfsfenstern
function get_x(val) {
  if(window.screenX) {
    return window.screenX+val+220;
  } else {
    return window.screenLeft+val;
  }
}
function get_y(val) {
  if(window.screenY) {
    return window.screenY+val+205;
  } else {
    return window.screenTop+val;
  }
}
function show_notes_window() {
	F1=window.open('bila_template.cgi?template=note','note','height=300,width=488,left='+get_x(150)+',top='+get_x(80)+',status=no,toolbar=no,scrollbars=no,menubar=no,location=no,resizable=no');
	F1.focus();
}
function show_note(id,res_flg) {
	F1=window.open('bila_note.cgi?id='+id+'&res='+res_flg,'note','height=300,width=488,left='+get_x(150)+',top='+get_y(80)+',status=no,toolbar=no,scrollbars=no,menubar=no,location=no,resizable=yes');
	F1.focus();
}
function show_help(page,weite,hoehe) {
	F1=window.open(page, 'help', "width="+weite+",height="+hoehe+",left=0,top=0, status=no,toolbar=no,scrollbars=yes,menubar=no,location=no,resizable=yes");
	F1.focus();
}
function print_notes_window(id) {
	F2=window.open('bila_drucken_note.cgi?template=drucken_note&id='+id,'notes');
	F2.focus();
}
function show_selection() {
	F1=window.open('bila_template.cgi?template=saveselection','saveselection','height=300,width=488,left='+get_x(150)+',top='+get_x(80)+',status=no,toolbar=no,scrollbars=no,menubar=no,location=no,resizable=no');
	F1.focus();
}
function show_window(site) {
	F1=window.open('/f.cgi?f='+site,'Window','height=600,width=565,left='+get_x(150)+',top='+get_x(80)+',status=no,toolbar=no,scrollbars=yes,menubar=no,location=no,resizable=no');
	F1.focus();
}
function uploads_popup(maske) {
  if (maske == "plz") {url = 'bila_plz_auswahl.cgi?w=1';}
  else {url = 'bila_nace_auswahl.cgi?open=&art=baum&w=1';}
  F1=window.open(url,'popup','width=548,height=400,left='+get_x(300)+',top='+get_y(0)+',status=yes,toolbar=no,scrollbars=no,menubar=no,location=no,resizable=no,dependent=yes');
  F1.focus();
}
function num_sort(a,b) {
    return a-b;
}
function equal_height() {
    if (document.getElementById('content').offsetHeight < 660) {
    	  document.getElementById('bottom').style.marginTop = (713-document.getElementById('content').offsetHeight) + 'px';
        document.getElementById('content').style.height = 660 + 'px';
    }
}
function del(url) {
	if(confirm("Auswahl löschen?")) { location.href=url; }
}
function close_lookup_window() {
  if (window.F1) try { window.F1.close(); } catch (e) { ;}
}
