        function fLogin()
                {
                    spspopup();
                        xajax_processLogin(xajax.getFormValues("login"));
                        return false;
                }
        function fChangeLogin(n)
                {
                    spspopup();
                        xajax_processChangeLogin(n);
                }
        function fLogout(id)
                {
                    spspopup();
                        xajax_processLogout(id);
                        return false;
                }

        function fSpielerAendernForm(id)
                {
                  spspopup();
                  xajax_processSpielerAendernForm(id);
                }
        function fSpielerKopierenForm(id)
                {
                  spspopup();
                  xajax_processSpielerKopierenForm(id);
                }
        function fNeuerSpieler()
                {
                  spspopup();
                  xajax_processSpielerNeuForm();
                }

        function fHelp(help_id)
                {
                  spspopup();
                  xajax_processHelp(help_id);
                }

        function fTZAuswahl(t)
        {

          xajax_processTZAuswahl(t);
          }

        function fTeamAuswahl(i)
        {
          xajax_processTeamAuswahl(i);
        }

        function fShowTeam(i)
        {
          spspopup();
          xajax_processShowTeam(i);
        }

        spielerauswahl = new Object();
        function fSpielerAuswahl(id)
        {
                 var a = new Array();
                 var tauswahl = new Array();
                 var jauswahl = new Array();
//alert(id);
                 if (spielerauswahl[id] == 1)
                 {
                   spielerauswahl[id] = 0;
                   $(id).className='button'; om_class[id] = 'button';
//alert('spielerauswahl: '+spielerauswahl[id]+' om_class: '+om_class[id]);
                 }
                 else
                 {
                   spielerauswahl[id] = 1;
                   $(id).className='buttonhover'; om_class[id] = 'buttonhover';
//alert('spielerauswahl: '+spielerauswahl[id]+' om_class: '+om_class[id]);
                 }
                 for (var te in spielerauswahl)
                 {
                         if ((spielerauswahl[te] == 1) && (te.substr(0,1) == 't'))
                         {
                           team = te.substr(5,te.length);
                           t = tauswahl.push(team);
                         }
                         else
                         {
                           if ((spielerauswahl[te] == 1) && (te.substr(0,1) == 'j'))
                          {
                             jg = te.substr(9,te.length);
                             t = jauswahl.push(jg);
                          }
                         }
                 }
                 a[0] = tauswahl;
                 a[1] = jauswahl;

                 xajax_processSpielerAuswahl(a);
        }

    var spielauswahl = new Object();
    function fSpielAuswahl(id,f,m)
                {

                 $('tas').innerHTML = "<img class='l-img' src='images/ajax-loader.gif' />";
                 var a = new Array();
                 var mauswahl = new Array();
                 var sauswahl = new Array();
                 if (id != '')
                 {
                   if (spielauswahl[id] == 1)
                   {
                     spielauswahl[id] = 0;
                     $(id).className='button'; om_class[id] = 'button';
                   }
                   else
                   {
                     spielauswahl[id] = 1;
                     $(id).className='buttonhover'; om_class[id] = 'buttonhover';
                   }
                 }
                 for (var te in spielauswahl)
                 {
                         if ((spielauswahl[te] == 1) && (te.substr(0,2) == 't_'))
                         {
                           team = te.substr(2,te.length);
                           t = mauswahl.push(team);
                         }
                 }
                 a[0] = mauswahl;
                 if (spielauswahl['heim'] == 1)
                 {
                          sauswahl[0] = 'heim';
                 }
                 if (spielauswahl['auswaerts'] == 1)
                 {
                          sauswahl[1] = 'auswaerts';
                 }
                 if (spielauswahl['am'] == 1)
                 {
                          sauswahl[2] = 'am';
                          sauswahl[3] = $('am').value;
                 }
                 if (spielauswahl['ab'] == 1)
                 {
                          sauswahl[4] = 'ab';
                          sauswahl[5] = document.spielauswahl.spiele_auswahl_ab.options[document.spielauswahl.spiele_auswahl_ab.selectedIndex].text;
                 }
                 if (spielauswahl['saison'] == 1)
                 {
                          sauswahl[6] = 'saison';
                          sauswahl[7] = document.spielauswahl.spiele_auswahl_saison.options[document.spielauswahl.spiele_auswahl_saison.selectedIndex].text;
                 }
                 if (spielauswahl['gegner'] == 1)
                 {
                          sauswahl[8] = 'gegner';
                          sauswahl[9] = document.spielauswahl.spiele_auswahl_gegner.options[document.spielauswahl.spiele_auswahl_gegner.selectedIndex].text;
                 }
                 if (spielauswahl['fahrer'] == 1)
                 {
                          sauswahl[10] = 'fahrer';
                 }
                 sauswahl[0] = 'heim';
                 a[1] = sauswahl;
                 xajax_processSpielAuswahl(a);
           }

    
    function fSpielAuswahlnextSpieltag(datum)
    {  	
        var a = new Array();
        var mauswahl = new Array();
        var sauswahl = new Array();
        a[0] = mauswahl;
                 sauswahl[0] = 'heim';
                 sauswahl[1] = 'auswaerts';
                 sauswahl[2] = 'am';
                 sauswahl[3] = datum;
                 sauswahl[4] = '';
                 sauswahl[5] = '';
                 sauswahl[6] = '';
                 sauswahl[7] = '';
                 sauswahl[8] = '';
                 sauswahl[9] = '';
                 sauswahl[10] = '';
        a[1] = sauswahl;
        xajax_processSpielAuswahl(a);
    }
  
    function fSpielAuswahlHeim(id,f,m)
    {

     $('tas').innerHTML = "<img class='l-img' src='images/ajax-loader.gif' />";
     var a = new Array();
     var mauswahl = new Array();
     var sauswahl = new Array();
     if (id != '')
     {
       if (spielauswahl[id] == 1)
       {
         spielauswahl[id] = 0;
         $(id).className='button'; om_class[id] = 'button';
       }
       else
       {
         spielauswahl[id] = 1;
         $(id).className='buttonhover'; om_class[id] = 'buttonhover';
       }
     }
     for (var te in spielauswahl)
     {
             if ((spielauswahl[te] == 1) && (te.substr(0,2) == 't_'))
             {
               team = te.substr(2,te.length);
               t = mauswahl.push(team);
             }
     }
     a[0] = mauswahl;
     if (spielauswahl['heim'] == 1)
     {
              sauswahl[0] = 'heim';
     }
     if (spielauswahl['auswaerts'] == 1)
     {
              sauswahl[1] = 'auswaerts';
     }
     if (spielauswahl['am'] == 1)
     {
              sauswahl[2] = 'am';
              sauswahl[3] = $('am').value;
     }
     if (spielauswahl['ab'] == 1)
     {
              sauswahl[4] = 'ab';
              sauswahl[5] = document.spielauswahl.spiele_auswahl_ab.options[document.spielauswahl.spiele_auswahl_ab.selectedIndex].text;
     }
     if (spielauswahl['saison'] == 1)
     {
              sauswahl[6] = 'saison';
              sauswahl[7] = document.spielauswahl.spiele_auswahl_saison.options[document.spielauswahl.spiele_auswahl_saison.selectedIndex].text;
     }
     if (spielauswahl['gegner'] == 1)
     {
              sauswahl[8] = 'gegner';
              sauswahl[9] = document.spielauswahl.spiele_auswahl_gegner.options[document.spielauswahl.spiele_auswahl_gegner.selectedIndex].text;
     }
     if (spielauswahl['fahrer'] == 1)
     {
              sauswahl[10] = 'fahrer';
     }
     sauswahl[0] = 'heim';
     a[1] = sauswahl;
     xajax_processSpielAuswahl(a);
}    
    
    function fSpielAuswahlAuswaerts(id,f,m)
    {

     $('tas').innerHTML = "<img class='l-img' src='images/ajax-loader.gif' />";
     var a = new Array();
     var mauswahl = new Array();
     var sauswahl = new Array();
     if (id != '')
     {
       if (spielauswahl[id] == 1)
       {
         spielauswahl[id] = 0;
         $(id).className='button'; om_class[id] = 'button';
       }
       else
       {
         spielauswahl[id] = 1;
         $(id).className='buttonhover'; om_class[id] = 'buttonhover';
       }
     }
     for (var te in spielauswahl)
     {
             if ((spielauswahl[te] == 1) && (te.substr(0,2) == 't_'))
             {
               team = te.substr(2,te.length);
               t = mauswahl.push(team);
             }
     }
     a[0] = mauswahl;
     if (spielauswahl['heim'] == 1)
     {
              sauswahl[0] = 'heim';
     }
     if (spielauswahl['auswaerts'] == 1)
     {
              sauswahl[1] = 'auswaerts';
     }
     if (spielauswahl['am'] == 1)
     {
              sauswahl[2] = 'am';
              sauswahl[3] = $('am').value;
     }
     if (spielauswahl['ab'] == 1)
     {
              sauswahl[4] = 'ab';
              sauswahl[5] = document.spielauswahl.spiele_auswahl_ab.options[document.spielauswahl.spiele_auswahl_ab.selectedIndex].text;
     }
     if (spielauswahl['saison'] == 1)
     {
              sauswahl[6] = 'saison';
              sauswahl[7] = document.spielauswahl.spiele_auswahl_saison.options[document.spielauswahl.spiele_auswahl_saison.selectedIndex].text;
     }
     if (spielauswahl['gegner'] == 1)
     {
              sauswahl[8] = 'gegner';
              sauswahl[9] = document.spielauswahl.spiele_auswahl_gegner.options[document.spielauswahl.spiele_auswahl_gegner.selectedIndex].text;
     }
     if (spielauswahl['fahrer'] == 1)
     {
              sauswahl[10] = 'fahrer';
     }
     sauswahl[1] = 'auswaerts';
     a[1] = sauswahl;
     xajax_processSpielAuswahl(a);
}    
    
        function fSpielerSeite(id)
                 {
            spspopup();
                         xajax_processSpielerSeite(id);
            }

        function fTZNeu()
                 {
            spspopup();
                         xajax_processTZNeuForm();
            }

        function fTZAendernForm(id)
                 {
            spspopup();
                         xajax_processTZAendernForm(id);
            }

        function fTeamNeu()
                 {
            spspopup();
                         xajax_processTeamNeuForm();
            }

        function fTeamAendernForm(id)
                 {
            spspopup();
                          xajax_processTeamAendernForm(id);
            }

        function fNews()
                {
                  //alert('Shownews');
                  xajax_processShowNews(0,12,12,'');
                }

        function fShowPic(id)
            {
                          if (BrowserDetect.browser == "Explorer")
                                {
                                                y = document.documentElement.scrollTop -40;
                                }
                        else
                                {
                                                 y = window.pageYOffset -60;
                                }
                        np = document.getElementById("news-popup");
                        np.style.top = y + "px";
                         xajax_processShowPic(id);
                }

        function fNewsPopup(id)
            {
                         spspopup();
                         xajax_processNewsPopup(id);
                }


        function fNewsAendern(id,c)
                 {
            spspopup();
                         xajax_processNewsAendernForm(id,c);
            }

    var newsauswahl = new Object();
        function fNewsAuswahl(id,start,end,delta)
                {
                 $('st').innerHTML = "<img class='l-img' src='images/ajax-loader.gif' />";
                 var a = new Array();
                 var mauswahl = new Array();
                 var sauswahl = new Array();
                 if (id != '')
                 {
                   if (newsauswahl[id] == 1)
                   {
                     newsauswahl[id] = 0;
                     $(id).className='button'; om_class[id] = 'button';
                   }
                   else
                   {
                     newsauswahl[id] = 1;
                     $(id).className='buttonhover'; om_class[id] = 'buttonhover';
                   }
                 }
                 for (var te in newsauswahl)
                 {
                         if ((newsauswahl[te] == 1) && (te.substr(0,2) == 't_'))
                         {
                           team = te.substr(2,te.length);
                           t = mauswahl.push(team);
                         }
                 }
                 a[0] = mauswahl;
                 if (newsauswahl['berichte'] == 1)
                 {
                          sauswahl[0] = 'b';
                 }
                 if (newsauswahl['organisation'] == 1)
                 {
                          sauswahl[1] = 'o';
                 }
                 a[1] = sauswahl;
                 xajax_processNewsAuswahl(start,end,delta,a);
           }

    var hintsauswahl = new Object();
        function fHintsAuswahl(id,start,end,delta)
                {
                 $('hintsauswahl').innerHTML = "<img class='l-img' src='images/ajax-loader.gif' />";
                 var a = new Array();
                 var mauswahl = new Array();
                 var sauswahl = new Array();
                 if (id != '')
                 {
                   if (hintsauswahl[id] == 1)
                   {
                     hintsauswahl[id] = 0;
                     $(id).className='button'; om_class[id] = 'button';
                   }
                   else
                   {
                     hintsauswahl[id] = 1;
                     $(id).className='buttonhover'; om_class[id] = 'buttonhover';
                   }
                 }
                 for (var te in hintsauswahl)
                 {
                         if ((hintsauswahl[te] == 1) && (te.substr(0,2) == 't_'))
                         {
                           team = te.substr(2,te.length);
                           t = mauswahl.push(team);
                         }
                 }
                 a[0] = mauswahl;
                 if (hintsauswahl['berichte'] == 1)
                 {
                          sauswahl[0] = 'b';
                 }
                 if (hintsauswahl['organisation'] == 1)
                 {
                          sauswahl[1] = 'o';
                 }
                 a[1] = sauswahl;
                 xajax_processHintsAuswahl(start,end,delta,a);
           }

        function fNewsNeu(A)
                 {
            spspopup();
                         xajax_processNewsNeuForm(A);
            }

        function fBugsAendern(id)
                 {
            spspopup();
                         xajax_processBugtrackerAendernForm(id);
            }

        function fBugsAuswahl()
        {
                         xajax_processBugtrackerAuswahl();
         }

        function fBugsNeu()
                 {
            spspopup();
                         xajax_processBugtrackerNeuForm();
            }

        function fEffortsAendern(id)
                 {
            spspopup();
                         xajax_processEffortsAendernForm(id);
            }

        function fEffortsAuswahl()
        {
                         xajax_processEffortsAuswahl();
         }

        function fEffortsNeu()
                 {
            spspopup();
                         xajax_processEffortsNeuForm();
            }


        function fSpielAendern(s)
                 {
            spspopup();
                         xajax_processSpielAendernForm(s);
            }

        function fEinSpiel(s)
                 {
            spspopup();
                         xajax_processEinSpiel(s);
            }

        function fCateringAendern(s)
                 {
            spspopup();
                         xajax_processCateringAendernForm(s);
            }

        function fShowCalendar()
        {
                  var today  = new Date();
                    var month = today.getMonth() + 1;
                    var year  = today.getFullYear();
                   xajax_processShowCalendar(month,year);
         }

        CalShowActive = false;
        function fCalPopup(d)
        {
           //ds = replaceIt(d,'.',''); alert(ds);
           if (!CalShowActive)
           {
             //spspopup();
            /*
                   if (BrowserDetect.browser == "Explorer")
            {
               wce = "cwce"+ds;
             //  alert(wce);
                  // w = document.getElementById(wce);
                  // w.className = "c-weekday-ce-hover";
            }*/

             xajax_processCalPopup(d);
             CalShowActive = true;
           }
        }
        function CalShowFalse(d)
        {
          CalShowActive = false;
          /*
          ds = replaceIt(d,'.','');
          if (BrowserDetect.browser == "Explorer")
            {
               wce = "cwce"+ds;
                   w = document.getElementById(wce);
                   w.className = "c-weekday-ce";
            }*/
        }

        function fCalNeu(d)
        {
           spspopup();
           xajax_processCalNeuForm(d);
        }

        function fCalAendern(id)
        {
           spspopup();
           xajax_processCalAendernForm(id);
        }

        function fFunctionsAuswahl()
        {
                spspopup();
                         xajax_processFunctionsAuswahl();
        }

        function fFunctionsNeu()
                 {
            spspopup();
                         xajax_processFunctionsNeuForm();
            }

        function fFunctionsAendern(s)
                 {
            spspopup();
                         xajax_processFunctionsAendernForm(s);
            }

        function fTabelleZeigen(s)
                 {
            spspopup();
                         xajax_processTabelleZeigen(s);
            }

        function fBilderUpload()
                 {
                         xajax_processBilderUploadForm();
            }

        function fBilderAendern(i)
                 {
                         xajax_processBilderAendernForm(i);
            }

        function fBilderRotate(d,i)
                 {
                         xajax_processBilderRotate(d,i);
            }

        function fThemaAendern(i)
                 {
            spspopup();
                         xajax_processThemaAendernForm(i);
            }

        function fThemaNeu()
                 {
            spspopup();
                         xajax_processThemaNeuForm();
            }

        function fThemenAuswahl()
                 {
                         xajax_processThemenAuswahl();
            }

        function fSaisonAuswahl()
                 {
                         xajax_processSaisonAuswahl();
            }

        function fSaisonAendern(i)
                 {
            spspopup();
                         xajax_processSaisonAendernForm(i);
            }

        function fSaisonNeu()
                 {
            spspopup();
                         xajax_processSaisonNeuForm();
            }

function fShowBild(i)
{
var x,y;
if (self.pageYOffset) // all except Explorer
{
        x = self.pageXOffset;
        y = self.pageYOffset;
}
else if (document.documentElement && document.documentElement.scrollTop)
        // Explorer 6 Strict
{
        x = document.documentElement.scrollLeft;
        y = document.documentElement.scrollTop;
}
else if (document.body) // all other Explorers
{
        x = document.body.scrollLeft;
        y = document.body.scrollTop;
}

gp = document.getElementById("bild-popup");
gp.style.display = 'none';
gp.style.top = y + 68 + "px";
xajax_processShowBild(i);
}

function stop_fShowBild(e)
{
  if (e)
  {
    bp = document.getElementById("bild-popup");
    bp.style.display = "none";
    e.style.borderColor = sl_bordercolor;

  }
}

        function fMassPics()
                 {
                         xajax_processMassPicsForm();
            }

        function fMail(a)
                 {
                        xajax_processMail(a);
            }

        addLoadEvent(digitalclock);
//        addLoadEvent(init_spspopup);

//        addLoadEvent(setFooter);
//        window.onresize = function() {setFooter();}

        function fLogoUpload()
                 {
            spspopup();
                         xajax_processLogoUploadForm();
            }

        function fLogoAendern(i)
                 {
            spspopup();
                         xajax_processLogoAendernForm(i);
            }

        function fLogoRotate(i,opt)
                 {
                         thema = 'test';
                         //        thema = opt.options[opt.selectedIndex].value;
    alert(thema);
        xajax_processBilderCheckThemaAendern(i,thema);

                         //xajax_processLogoRotate(d,i);
            }

        function fMessageNeu(i)
                 {
            spspopup();
                         xajax_processMessageNeuForm(i);
            }
        function fMessageAendern(i)
                 {
            spspopup();
                         xajax_processMessageAendern(i);
            }
        function fShowMessage(i)
                 {
            spspopup();
                         xajax_processShowMessage(i);
            }
        function fShowBilderNicht()
                 {
            spspopup();
                         xajax_processShowBilderNicht();
            }
        function fShowTeam(i)
                 {
            spspopup();
                         xajax_processShowTeam(i);
            }

function fBCTA(i,o)
{
        thema = o.options[o.selectedIndex].value;
    alert(thema);
        xajax_processBilderCheckThemaAendern(i,thema);
}

function fShowLg(i)
{
var x,y;
if (self.pageYOffset) // all except Explorer
{
        x = self.pageXOffset;
        y = self.pageYOffset;
}
else if (document.documentElement && document.documentElement.scrollTop)
        // Explorer 6 Strict
{
        x = document.documentElement.scrollLeft;
        y = document.documentElement.scrollTop;
}
else if (document.body) // all other Explorers
{
        x = document.body.scrollLeft;
        y = document.body.scrollTop;
}

gp = document.getElementById("bild-popup");g
gp.style.display = 'block';
gp.style.top = y + 68 + "px";
xajax_processShowLg(i);
}
