//gehört hier ja eigentlich nicht rein ... Aber trotzdem:
// AKTUELLES DATUM
function Jahr(){
    var datum = new Date();
    var jahr = datum.getFullYear();
    return jahr;
}


function TableOfContent(Topic)
	{
//*************************Topic 1 Home (leer)*****************************************


//*************************Topic 2 Was ist die Tellington Methode*****************************************
if (Topic == "Top02") {
//öffnen oder schließen
	if (document.getElementById(Topic).hasChildNodes()==true){fCloseAllChildNodes(Topic)}
		else 	{
//fTopic: Name, Ziel

		fTopic("Anwendungsbereiche","/was_ist_die_tellington_methode/anwendungsbereiche.html", Topic);
		fTopic("Ziele und Anwendungen","/was_ist_die_tellington_methode/ziele_anwendungen.html", Topic);
		fTopic("Geschichte","/was_ist_die_tellington_methode/geschichte.html", Topic);
		fTopic("Liste Publikationen","/was_ist_die_tellington_methode/liste_publikationen.html",Topic);
		fTopic("Presse","/was_ist_die_tellington_methode/presse.html",Topic);
	     		}
		}
//*************************Topic 3 Die Gilde****************************************
if (Topic == "Top03") {
//**********************öffnen oder schließen
	if (document.getElementById(Topic).hasChildNodes()==true){fCloseAllChildNodes(Topic)}
		else 	{

//**********************fTopic: Name, Ziel

			fTopic("Gilden Weltweit","/die_gilde/gilden_weltweit.html",Topic);
			fTopic("Der Verein","/die_gilde/der_verein.html",Topic);
			fTopic("Instruktorinnen","/die_gilde/instruktorinnen.html",Topic);

	     		}
		}

//*************************Topic 4 Pferde*****************************************
if (Topic == "Top04") {
//**********************öffnen oder schließen
	if (document.getElementById(Topic).hasChildNodes()==true){fCloseAllChildNodes(Topic)}
		else 	{

//**********************fTopic: Name, Ziel

			fTopic("Anwendung Pferd","/pferde/anwendung_pferd.html",Topic);
			fTopic("Kurse Pferd","/pferde/kurse_pferd.php",Topic);
			fTopic("Lehrer Pferd","/pferde/lehrer_pferd.php",Topic);
			fTopic("Ausbildung Pferd","/pferde/ausbildung_pferd.html",Topic);
			//fTopic("Bildergalerie Pferd","/pferde/bildergalerie_pferd.html",Topic);


	     		}
		}

//*************************Topic 5 Hund*****************************************
if (Topic == "Top05") {
//**********************öffnen oder schließen
	if (document.getElementById(Topic).hasChildNodes()==true){fCloseAllChildNodes(Topic)}
		else 	{

//**********************fTopic: Name, Ziel

			fTopic("Anwendung Hund","/hunde/anwendung_hund.html",Topic);
			fTopic("Kurse Hund","/hunde/kurse_hund.php",Topic);
			fTopic("Lehrer Hund","/hunde/lehrer_hund.php",Topic);
			fTopic("Ausbildung Hund","/hunde/ausbildung_hund.html",Topic);
			//fTopic("Bildergalerie Hund","/hunde/bildergalerie_hund.html",Topic);


	     		}
		}

//*************************Topic 6 Jugendarbeit *****************************************
if (Topic == "Top06") {
//**********************öffnen oder schließen
	if (document.getElementById(Topic).hasChildNodes()==true){fCloseAllChildNodes(Topic)}
		else 	{

//**********************fTopic: Name, Ziel

			fTopic("Angie Kurse","/jugendarbeit/angie_kurse.html",Topic);
			fTopic("Kurse-Kids","/jugendarbeit/kurse_kids.php",Topic);

	     		}
		}

//*************************Topic 7 TTouch for You*****************************************
if (Topic == "Top07") {
//**********************öffnen oder schließen
	if (document.getElementById(Topic).hasChildNodes()==true){fCloseAllChildNodes(Topic)}
		else 	{

//**********************fTopic: Name, Ziel

			fTopic("TTouch-for-You","http://www.ttouch-for-you.de/",Topic);

	     		}
		}

//*************************Topic 8 Termine*****************************************
if (Topic == "Top08") {
//**********************öffnen oder schließen
	if (document.getElementById(Topic).hasChildNodes()==true){fCloseAllChildNodes(Topic)}
		else 	{

//**********************fTopic: Name, Ziel

			fTopic("Kurse Pferd","/pferde/kurse_pferd.php",Topic);
			fTopic("Kurse Hund","/hunde/kurse_hund.php",Topic);
			fTopic("Kurse Kids","/jugendarbeit/kurse_kids.php",Topic);
			fTopic("Kurse zur Ausbildung","/termine/kurse_zur_ausbildung.php",Topic);

	     		}
		}

//*************************Topic 9 News*****************************************
if (Topic == "Top09") {
//**********************öffnen oder schließen
	if (document.getElementById(Topic).hasChildNodes()==true){fCloseAllChildNodes(Topic)}
		else 	{

//**********************fTopic: Name, Ziel

			fTopic("Newsletter-Abo","/news/newsletter-abo.html",Topic);
			fTopic("Mail-Info","/news/mail-info.html",Topic);

	     		}
		}


//*************************Topic 10 Links*****************************************
if (Topic == "Top10") {
//**********************öffnen oder schließen
	if (document.getElementById(Topic).hasChildNodes()==true){fCloseAllChildNodes(Topic)}
		else 	{

//**********************fTopic: Name, Ziel

			//fTopic("Tellington Anwender","/",Topic);

	     		}
		}

//*************************Topic 11 Kontakt Formales*****************************************
if (Topic == "Top11") {
//**********************öffnen oder schließen
	if (document.getElementById(Topic).hasChildNodes()==true){fCloseAllChildNodes(Topic)}
		else 	{

//**********************fTopic: Name, Ziel

			fTopic("Gilden Weltweit","/die_gilde/gilden_weltweit.html",Topic);
			fTopic("Disclaimer","/kontakt/disclaimer.html",Topic);
			fTopic("Impressum","/kontakt/impressum.html",Topic);

	     		}
		}



//*************************Topic 12 Sitemap (leer)*****************************************

//*************************Topic 13 Kontakt Formales*****************************************
if (Topic == "Top13") {
//**********************öffnen oder schließen
	if (document.getElementById(Topic).hasChildNodes()==true){fCloseAllChildNodes(Topic)}
		else 	{

//**********************fTopic: Name, Ziel

			fTopic("Pferd","/pferde/lehrer_pferd.php",Topic);
			fTopic("Hund","/hunde/lehrer_hund.php",Topic);
	     		}
		}



//++++++++++++++++++++++++Ende Table Of Content++++++++++++++++++++++++++++++++++
	}
function fTopic(name, direction,Topic)
	{
	var eleTop = document.createElement("a");
		atthref = document.createAttribute("href");
			atthref.nodeValue = direction;
	eleTop.setAttributeNode(atthref);
		attid = document.createAttribute("class");
			attid.nodeValue = ("lnk_SubTOC");
	eleTop.setAttributeNode(attid);
	var txtTop = document.createTextNode(name);
	eleTop.appendChild(txtTop);
	var eleTopBr = document.createElement("br");
	eleTop.appendChild(eleTopBr);
	var completeChild = document.getElementById(Topic);
	completeChild.appendChild(eleTop);
	}
function fCloseAllChildNodes(Topic)
	{
	while (document.getElementById(Topic).hasChildNodes()==true)
		{
		document.getElementById(Topic).removeChild(document.getElementById(Topic).firstChild);
		}
	}

/* ***********************************************************************
   ************************Maske Topic************************************

//*************************Topic *****************************************
if (Topic == ) {
//**********************öffnen oder schließen
	if (document.getElementById(Topic).hasChildNodes()==true){fCloseAllChildNodes(Topic)}
		else 	{

//**********************fTopic: Name, Ziel

			fTopic("","/",Topic);

	     		}
		}

*/

