var button_angeklickt = "";
var marked_performance = 0;





function loc_clear_button(button)
{
 window.top.document.getElementById(button).style.backgroundColor="#e5e5e5";
 window.top.document.getElementById(button).style.color="#333333";
}



function touch_button(button)
{
 window.top.document.getElementById(button).style.backgroundColor="#888888";
 window.top.document.getElementById(button).style.color="#dddddd";
}



function untouch_button(button)
{
 if (button_angeklickt!=button)
   {
    window.top.document.getElementById(button).style.backgroundColor="#e5e5e5";
    window.top.document.getElementById(button).style.color="#333333";
   }
  else
   {
    window.top.document.getElementById(button).style.backgroundColor="#000077";
    window.top.document.getElementById(button).style.color="#dddddd";
   }
}



function click_on_button(button)
{
 loc_clear_button('home');
 loc_clear_button('ueber_uns');
 loc_clear_button('dienste');
 loc_clear_button('branchen');
 loc_clear_button('nutzen');
 loc_clear_button('aufwand');
 loc_clear_button('hilfe');
 loc_clear_button('kontakt');
 loc_clear_button('impressum');

 window.top.document.getElementById(button).style.backgroundColor="#000077";
 window.top.document.getElementById(button).style.color="#dddddd";
 button_angeklickt = button;

 if (button=="kundencenter")
   {
    window.top.location.href = "/cgi-src/onlineservices/phplib/ctr.php?back&gro";
   }
  else
   {
    window.top.document.getElementById('info').src = "/cgi-src/groneberg_qualitaetsmanagement/neu/htmllib/"+button+".htm";
   }
}



function mark_performance(what)
{
 document.getElementById('leistungspunkt_'+what).style.backgroundColor  = "#888888";
 document.getElementById('leistungspunkt_'+what).style.color            = "#ffffff";
 document.getElementById('leistungstexte_'+what).style.backgroundColor  = "#888888";
 document.getElementById('leistungstexte_'+what).style.color            = "#ffffff";
}



function hide_performance(what)
{
 if (what!=marked_performance)
   {
    document.getElementById('leistungspunkt_'+what).style.backgroundColor  = "#f2f2f2";
    document.getElementById('leistungspunkt_'+what).style.color            = "#333333";
    document.getElementById('leistungstexte_'+what).style.backgroundColor  = "#f2f2f2";
    document.getElementById('leistungstexte_'+what).style.color            = "#333333";
   }
  else
   {
    document.getElementById('leistungspunkt_'+what).style.backgroundColor  = "#000077";
    document.getElementById('leistungspunkt_'+what).style.color            = "#ffffff";
    document.getElementById('leistungstexte_'+what).style.backgroundColor  = "#000077";
    document.getElementById('leistungstexte_'+what).style.color            = "#ffffff";
   }
}



function get_performance(what)
{
 for (i=1;i<=5;i++)
    {
     document.getElementById('leistungspunkt_'+i).style.backgroundColor  = "#f2f2f2";
     document.getElementById('leistungspunkt_'+i).style.color            = "#333333";
     document.getElementById('leistungstexte_'+i).style.backgroundColor  = "#f2f2f2";
     document.getElementById('leistungstexte_'+i).style.color            = "#333333";
    }

 document.getElementById('leistungspunkt_'+what).style.backgroundColor  = "#000077";
 document.getElementById('leistungspunkt_'+what).style.color            = "#ffffff";
 document.getElementById('leistungstexte_'+what).style.backgroundColor  = "#000077";
 document.getElementById('leistungstexte_'+what).style.color            = "#ffffff";

 marked_performance = what;

 page = "dienste_rechts_text_"+what+".htm";
 window.top.info.dienste_rechts.dienste_rechts_text.document.location.href = "/cgi-src/groneberg_qualitaetsmanagement/neu/htmllib/"+page;
}



function check_form()
{
 if (document.formular.vorname.value=="")
   {
    alert('Bitte füllen Sie das Feld "Vorname" aus !');
    document.formular.vorname.focus();
    return false;
   }
  else
   {
    if (document.formular.nachname.value=="")
      {
       alert('Bitte füllen Sie das Feld "Nachname" aus !');
       document.formular.nachname.focus();
       return false;
      }
     else
      {
       if (document.formular.firma.value=="")
         {
          alert('Bitte füllen Sie das Feld "Firma/Organisation" aus !');
          document.formular.firma.focus();
          return false;
         }
        else
         {
          if (document.formular.email.value=="")
            {
             alert('Bitte füllen Sie das Feld "Email" aus !');
             document.formular.email.focus();
             return false;
            }
           else
            {
             if (document.formular.anfragetext.value=="")
               {
                alert('Bitte füllen Sie das Feld "Ihre Anfrage" aus !');
                document.formular.anfragetext.focus();
                return false;
               }
              else
               {
                return true;
               }
            }
         }
      }
   }
}

