var  PopupW;
/*
function TopMenu(Art) {
   if (PopupW) {
      if (!PopupW.closed) {
         PopupW.close();
         window.setTimeout("TopMenu("+Art+")",10);
         return;
      }
   }
   if (Art == 1) {
      window.location = "news.php?" + SIDParm;
   } else {
      if (Art == 2) {
         window.location = "veranstaltungen.php?" + SIDParm;
      } else {
         if (Art == 3) {
            PopupW = window.open("http://www.badischertennisverband.de/ed/default.asp?smid=2&vid=2339&modus=2","TCW_Popup");
         }    
      }  
   }
}
*/
function FamDaten(FamPtr,MitTitel) {
   document.forms[0].ScriptCommand.value = "";
   document.forms[0].FamPtr.value = FamPtr;
   document.forms[0].MitTitel.value = MitTitel;
   document.forms[0].submit();
}

function SetOptions(Art) {
   if (Art == 1) {
      document.forms[0].ScriptCommand.value = "SaveInfo";
      if (!document.forms[0].F_Info.checked) {
         if (!confirm("Soll die Zusendung der Tennisinfos per E-Mail wirklich eingestellt werden?"))
            document.forms[0].F_Info.checked = true;
      } else {
         if (document.forms[0].F_Mail.value == "")
            alert("ACHTUNG: Es ist noch keine E-Mail-Adresse angegeben!\r\n\r\nBitte unter 'Name - Anschrift - Kontakt' eintragen.");
      }
   }
   if (Art == 2) {
      document.forms[0].ScriptCommand.value = "SaveNews";
      if (!document.forms[0].F_News.checked) {
         if (!confirm("Soll die Zusendung des Newsletters per E-Mail wirklich eingestellt werden?"))
            document.forms[0].F_News.checked = true;
      } else {
         if (document.forms[0].F_Mail.value == "")
            alert("ACHTUNG: Es ist noch keine E-Mail-Adresse angegeben!\r\n\r\nBitte unter 'Name - Anschrift - Kontakt' eintragen.");
      }
   }
   document.forms[0].submit();
}

function MitListe(Sex,Start,Ende,Titel) {
   if (PopupW) {
      if (!PopupW.closed) {
         PopupW.close();
         window.setTimeout("MitListe("+Sex+","+Start+","+Ende+",'"+Titel+"')",10);
         return;
      }
   }
   Sex = "x"+Sex; P = Sex.length-1; Sex = Sex.substr(P,1);
   Start = "x00"+Start; P = Start.length-3; Start = Start.substr(P,3);
   Ende = "x00"+Ende; P = Ende.length-3; Ende = Ende.substr(P,3);
   PopupW = window.open("showmitglieder.php?info=I"+Sex+Start+Ende+Titel,"TCW_Popup","left=50,top=50,width=600,height=500,scrollbars=yes,resizable=yes,status=no");
}

function MitAction(Action) {
   if (Action == "Print") { parent.TCW_Popup_Body.focus(); parent.TCW_Popup_Body.print(); }
   if (Action == "Close") parent.close();
}

function Werbung(Id) {
   if (PopupW) {
      if (!PopupW.closed) {
         PopupW.close();
         window.setTimeout("Werbung("+Id+")",10);
         return;
      }
   }
   PopupW = window.open("showwerbung.php?Id="+Id,"TCW_Popup","left=400,top=50,width=300,height=350,scrollbars=no,resizable=no,status=yes");
}

function Gallery() {
   document.gallery.username.value = "Mitglied des TC Wollbach";
   document.gallery.password.value = "3wT5ab";
   document.gallery.submit();
}

function EMCaller(Name,Server,Domain) {
   window.location = "mailto:"+Name+"@"+Server+"."+Domain;
}

function Closer() {
   if (PopupW) if (!PopupW.closed) PopupW.close();
}