
          function recalculate()
   {
     var r=document.FarbForm.Rot.options[document.FarbForm.Rot.selectedIndex].text;
     var g=document.FarbForm.Gruen.options[document.FarbForm.Gruen.selectedIndex].text;
     var b=document.FarbForm.Blau.options[document.FarbForm.Blau.selectedIndex].text;
     var wert="#"+r+g+b;
     document.FarbForm.Farbwert.value=wert;
     if (document.getElementById) document.getElementById("Farbprobe").bgColor=wert;
   }

  function tabellenwert(wert)
  {
    var r=wert.substr(1,2);
    var g=wert.substr(3,2);
    var b=wert.substr(5,2);
    var r_val, g_val, b_val;
    if (r=="33") r_val=1;
    else if (r=="66") r_val=2;
    else if (r=="99") r_val=3;
    else if (r=="CC") r_val=4;
    else if (r=="FF") r_val=5;
    else r_val=0;
    if (g=="33") g_val=1;
    else if (g=="66") g_val=2;
    else if (g=="99") g_val=3;
    else if (g=="CC") g_val=4;
    else if (g=="FF") g_val=5;
    else g_val=0;
    if (b=="33") b_val=1;
    else if (b=="66") b_val=2;
    else if (b=="99") b_val=3;
    else if (b=="CC") b_val=4;
    else if (b=="FF") b_val=5;
    else b_val=0;
    document.FarbForm.Rot.selectedIndex=r_val;
    document.FarbForm.Gruen.selectedIndex=g_val;
    document.FarbForm.Blau.selectedIndex=b_val;
    recalculate();

  }
  function useVG()
  {
    document.FarbForm.Vordergrund.value=document.FarbForm.Farbwert.value;
    if (document.getElementById) document.getElementById("HTMLText").color=document.FarbForm.Farbwert.value;
  }
  function useHG()
  {
    document.FarbForm.Hintergrund.value=document.FarbForm.Farbwert.value;
    if (document.getElementById) document.getElementById("HTMLProbe").bgColor=document.FarbForm.Farbwert.value;
  }

