/*************************************************************************
  This code is from Dynamic Web Coding at http://www.dyn-web.com/
  See Terms of Use at http://www.dyn-web.com/bus/terms.html
  Permission granted to use this code
  as long as this entire notice is included.
*************************************************************************/

function changeContent(id,shtml) {
   if (document.getElementById || document.all) {
      var el = document.getElementById? document.getElementById(id): document.all[id];
      if (el && typeof el.innerHTML != "undefined") el.innerHTML = shtml;
   }
}

function openDialog(filename,title,width,height) {
  var options = "width="+width+",height="+height+",location=no,menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no";
  dialogWindow = window.open(filename,title,options);
  dialogWindow.focus();
}

function openImage(filename,width,height) {
  var options = "width="+width+",height="+height+",location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no";
  dialogWindow = window.open(filename,'Abbildung',options);
  dialogWindow.focus();
}

function loadOpener(url) {
  opener.location.href = url;
  window.close();
}

function selectBoxes(formname,boxlist) {
  for(i=0;i<boxlist.length;i++) {
    document.forms[formname].elements[boxlist[i]].checked = true;
  }
}

function unselectBoxes(formname,boxlist) {
  for(i=0;i<boxlist.length;i++) {
    document.forms[formname].elements[boxlist[i]].checked = true;
  }
}