/* Defines für boxx24 */
function GetKonstanten() {
  SPALTE_MITTE_GROSS = 803;  /* Breite der Spaltenmitte bei Auflösungen > 800x600 */
}

function InitialisiereWindow()
{
  window.location.replace('http://www.org-sys.de/')
}

/* Bildschirmauflösung prüfen für Werbespalte */
function hideColumn (colIndex) {
  var table = document.all ? document.all.MainTable :
              document.getElementById('MainTable');
  for (var r = 0; r < table.rows.length; r++)
    table.rows[r].cells[colIndex].style.display = 'none';
}

function showColumn (colIndex) {
  var table = document.all ? document.all.MainTable :
              document.getElementById('MainTable');
  for (var r = 0; r < table.rows.length; r++)
    table.rows[r].cells[colIndex].style.display = 'inline';
}

function showTable () {
  var table = document.all ? document.all.MainTable :
              document.getElementById('MainTable');
  table.style.visibility = 'visible';
}

function setColumnWidth (colIndex) {
  var table = document.all ? document.all.MainTable :
              document.getElementById('MainTable');
  for (var r = 0; r < table.rows.length; r++)
    table.rows[r].cells[colIndex].style.width = SPALTE_MITTE_GROSS;
}

function CheckAufloesung() 
{
  if (screen.width<=1024) {
    hideColumn(2);
  }
  else {
    setColumnWidth(1);
  }  
  showTable();
}

/* Reset des Kontaktformulares */
function fReset()
{
  return window.confirm("Wollen Sie den Inhalt des Formulars wirklich löschen ?");
}

/* Kontrolle der Eingabefelder des Kontaktformulares */
function fKontrolle()
{
  var text=document.kFormular.email.value;
  if ((document.kFormular.name.value=="")&&(document.kFormular.firma1.value=="")&&(document.kFormular.firma2.value=="")){
    alert("Bitte füllen Sie das Feld 'Name' oder das Feld 'Firma' aus !");
    return false;
  }
  else {
    if (document.kFormular.strasse.value==""){
      alert("Bitte füllen Sie das Feld 'Strasse' aus !");
      return false;
    }  
    else {
      if (document.kFormular.plz.value==""){
        alert("Bitte füllen Sie das Feld 'PLZ' aus !");
        return false;
      }
      else {
        if (document.kFormular.ort.value==""){
          alert("Bitte füllen Sie das Feld 'Ort' aus !");
          return false;
        }
        else {  
          if (document.kFormular.telefon.value==""){
            alert("Bitte füllen Sie das Feld 'Telefon' aus !");
            return false;
          }
          else {
            if (document.kFormular.email.value==""){
              alert("Bitte füllen Sie das Feld 'Email' aus !");
              return false;
            }
            else {
              if (text.search("@")=="-1"){
                alert("Das Feld 'Email' enthält keine gültige Email-Adresse !");
                return false;
              }           
              else {
       		if ((document.kFormular.info_caq.checked==false)&&(document.kFormular.info_med.checked==false)&&(document.kFormular.info_sonst.checked==false)&&(document.kFormular.kommentar.value=="")){
                  alert("Bitte füllen Sie das Feld 'Interesse an' oder 'Kommentar' aus !");
                  return false;
                }
                else {        
     	          return true;
     	        }
     	      }  
     	    }   
          }
        }
      } 
    }
  }
}

/* Bildbreite der Submenus kleiner machen bei Bildschirmauflösungen <= 800*600 */
function SubMenuBilderGroesse() 
{
  if (screen.height<=768) {
    document.images[0].width=803;
  }  
}

function SubMenuTabellenBreite(TabId) 
{
  if (screen.height<=768) {
    document.getElementById(TabId).style.width=803;
  }  
}

/* Resfresh des php-Menüs bei Seitenwechsel im Haupt-Frame */
function RefreshMenu() 
{
  if(parent.frames[0]&&parent.frames['menu'].Go)parent.frames['menu'].Go()
}

/* Resfresh des php-Sub-Menüs bei Seitenwechsel im Haupt-Frame */
function RefreshSubMenu() 
{
  if(parent.frames[0]&&parent.frames['submenu'].Go)parent.frames['submenu'].Go()
}

/* Zusammenfassung von Bildergroesse und RefreshMenu für main.htm */
function MainAnpassungen() 
{
  RefreshMenu();
  MainBilderGroesse();
}  

/* Zwei Frames gleichzeitig durch einen link ändern */
function ZweiFramesAendern(URL1,F1,URL2,F2)
{  
  parent.frames[F1].location.href=URL1;
  parent.frames[F2].location.href=URL2;
}


/* Beschreibung der Module erst Verstecken */
function FlipBeschreibungen()
{
  if (document.getElementById("STD").style.display == "none") {
    document.getElementById("STD").style.display = "inline";
    document.getElementById("KCH").style.display = "inline";
    document.getElementById("ZE").style.display = "inline";
    document.getElementById("KABR").style.display = "inline";
    document.getElementById("PABR").style.display = "inline";
    document.getElementById("STAT").style.display = "inline";
    document.getElementById("REC").style.display = "inline";
    document.getElementById("ROE").style.display = "inline";
    document.getElementById("WALI").style.display = "inline";
    document.getElementById("KAS").style.display = "inline";
    document.getElementById("ADR").style.display = "inline";
    document.getElementById("PA").style.display = "inline";
    document.getElementById("KBR").style.display = "inline";
    document.getElementById("KFO").style.display = "inline";
    document.getElementById("aSTD").style.display = "inline";
    document.getElementById("aKCH").style.display = "inline";
    document.getElementById("aZE").style.display = "inline";
    document.getElementById("aKABR").style.display = "inline";
    document.getElementById("aPABR").style.display = "inline";
    document.getElementById("aSTAT").style.display = "inline";
    document.getElementById("aREC").style.display = "inline";
    document.getElementById("aROE").style.display = "inline";
    document.getElementById("aWALI").style.display = "inline";
    document.getElementById("aKAS").style.display = "inline";
    document.getElementById("aADR").style.display = "inline";
    document.getElementById("aPA").style.display = "inline";
    document.getElementById("aKBR").style.display = "inline";
    document.getElementById("aKFO").style.display = "inline";
    document.getElementById("SeitenAnfang").style.display = "inline";
    document.getElementById("WechselText").firstChild.nodeValue = "Übersicht der Module";
  } 
  else { 
    document.getElementById("STD").style.display = "none";
    document.getElementById("KCH").style.display = "none";
    document.getElementById("ZE").style.display = "none";
    document.getElementById("KABR").style.display = "none";
    document.getElementById("PABR").style.display = "none";
    document.getElementById("STAT").style.display = "none";
    document.getElementById("REC").style.display = "none";
    document.getElementById("ROE").style.display = "none";
    document.getElementById("WALI").style.display = "none";
    document.getElementById("KAS").style.display = "none";
    document.getElementById("ADR").style.display = "none";
    document.getElementById("PA").style.display = "none";
    document.getElementById("KBR").style.display = "none";
    document.getElementById("KFO").style.display = "none";
    document.getElementById("aSTD").style.display = "none";
    document.getElementById("aKCH").style.display = "none";
    document.getElementById("aZE").style.display = "none";
    document.getElementById("aKABR").style.display = "none";
    document.getElementById("aPABR").style.display = "none";
    document.getElementById("aSTAT").style.display = "none";
    document.getElementById("aREC").style.display = "none";
    document.getElementById("aROE").style.display = "none";
    document.getElementById("aWALI").style.display = "none";
    document.getElementById("aKAS").style.display = "none";
    document.getElementById("aADR").style.display = "none";
    document.getElementById("aPA").style.display = "none";
    document.getElementById("aKBR").style.display = "none";
    document.getElementById("aKFO").style.display = "none";
    document.getElementById("SeitenAnfang").style.display = "none";
    document.getElementById("WechselText").firstChild.nodeValue = "Beschreibungen anzeigen";
  }
}

/* Kontrolle der Eingabefelder des Downloadformulares */
function fKontrolle()
{
  if (document.dFormular.freischaltcode.value=="4bmge6sa") {
    document.getElementById("DLL1").style.display="inline";
    document.getElementById("DLL2").style.display="inline";
    return true;
  }
  else {
    alert('Falscher Freischaltcode !');
    return false;
  }
}


/* Kontrolle der Eingabefelder des Infoformulares */
function fInfoKontrolle()
{
  if ((document.fInfo.Firma.value=="")&&(document.fInfo.Name.value=="")) {
    alert("Bitte füllen Sie das Feld 'Name' oder das Feld 'Firma' aus !");
    return false;
  }
  else {
    if ((document.fInfo.Email.value=="")&&(document.fInfo.Telefon.value=="")) {
      alert("Bitte füllen Sie das Feld 'Telefon' oder das Feld 'Email' aus !");
      return false;
    }
    else {        
      return true;
    }
  }
}


