function openWindowOnUrl_Named(url, name) {
	options = 'toolbar=no,menubar=yes,directories=no,status=no,location=no,scrollbars=yes,resizable=yes';
	return this.open(url,name,options);
}
function bereichBreiteGroesserAls(width) {
   var x;
   x = 0;
   if (self.innerWidth) {
       // all except Explorer
       x = self.innerWidth;
   }
   else if (document.documentElement && document.documentElement.clientWidth) {
       // Explorer 6 Strict Mode 
       x = document.documentElement.clientWidth;
   }
   else if (document.body) {
       // other Explorers
       x = document.body.clientWidth;
   }
   return  x > width
}
function aufloesungGroesserAls(width, height) {
   // gibt zurueck, ob die Auflösung des Bildschirms relativ gross ist
   return  (screen.availWidth > width) && (screen.availHeight > height)
}
function setStatus(text) {
   // setzt die Statuszeile
   window.status=text;
   return true;
}
function getReferrer() {
   // gibt den Verweis aus, von dem aus man auf diese Seite gekommen ist
   return top.document.referrer;
}
function setLineBreak(width, height) {
   // vergrößert den Zeilenumbruch, wenn die Auflösung größer als angegeben ist.
   // Bedingung: Dieses Skript nur innerhalb eines Paragraphen nutzen (p).
   if (aufloesungGroesserAls(width, height)) {
       document.writeln("</p>\n<p>");
   } else {
       document.writeln("<br>");
   }
}
function setBigLineBreak(width, height) {
   // vergrößert den Zeilenumbruch, wenn die Auflösung größer als angegeben ist.
   // Bedingung: Dieses Skript nur innerhalb eines Paragraphen nutzen (p).
   if (aufloesungGroesserAls(width, height)) {
       document.writeln("</p>\n<hr noshade>\n<p>");
   } else {
       document.writeln("</p>\n<p>");
   }
}
function setParagraphConditional(width, height) {
   // vergrößert den Zeilenumbruch, wenn die Auflösung größer als angegeben ist.
   // Bedingung: Dieses Skript nur innerhalb eines Paragraphen nutzen (p).
   if (aufloesungGroesserAls(width, height)) {
       document.writeln("<p>&nbsp;\n</p>");
   } else {
       // keinen Absatz setzen
   }
}

function bold(id) {
  unboldAll();
  if (document.getElementById) {
    if (document.getElementById(id)) {
      document.getElementById(id).style.fontWeight = 'bold';
      return true;
    }
    // else the id doesn't exist
  }
  else if (document.all) {
    if (document.all[id]) {
      document.all[id].style.fontWeight = 'bold';
      return true;
    }
    // else the id doesn't exist
  }
  return false;
}

function unbold(frameName, id) {
  aFrame = parent.frames[frameName]; 
  if (aFrame.document.getElementById) {
    if (aFrame.document.getElementById(id)) {
      aFrame.document.getElementById(id).style.fontWeight = '';
      return true;
    }
    // else the id doesn't exist
  }
  else if (aFrame.document.all) {
    if (aFrame.document.all[id]) {
      aFrame.document.all[id].style.fontWeight = '';
      return true;
    }
    // else the id doesn't exist
  }
  return false;
}

function unboldAll() {
  unbold('RechterKopf', 'thema01');
  unbold('RechterKopf', 'thema02');
  unbold('RechterKopf', 'thema03');
  unbold('RechterKopf', 'thema04');
  unbold('RechterKopf', 'thema05');  
  unbold('RechterKopf', 'thema06');
  unbold('Menu', 'montagesysteme'); // thema08
  unbold('Menu', 'kontakt');  
  unbold('Menu', 'partner');
  unbold('Menu', 'links');
  unbold('Menu', 'aktuelles');
  unbold('Menu', 'presse');
  unbold('Menu', 'impressum');
  unbold('Menu', 'agb');
  unbold('Menu', 'thema07'); // image-film
  // unbold('Menu', 'bedienhilfe');  
}

// experimental code, doesn't work correctly, because losing focus resets the font weight
// function bold(id) {  
//   boldFrame(window.name, id);
// }

function boldFrame(frameName, id) {
  aFrame = parent.frames[frameName];
  unboldAll();
  if (aFrame.document.getElementById) {
    aFrame.document.getElementById(id).style.fontWeight = 'bold';
  }
  else if (document.all) {
    aFrame.document.all[id].style.fontWeight = 'bold';
  }
}
