/////////////////////////////////////////////////////////////////////////////////////////////////////

// ->	Hier beginnt der Teil für das Seitenlayout und das laden der Seiten (Hintergrundbilder) <- //

/////////////////////////////////////////////////////////////////////////////////////////////////////

function newlayout(numlink,id)		{
window.name="bam";
switch (numlink)	{
case 1:
document.getElementsByTagName("table")[0].style.backgroundImage="url(images/home_oben.gif)";
document.getElementsByTagName("table")[1].style.backgroundImage="url(images/home_unten.gif)";
document.getElementsByTagName("iframe")[0].src="cgi-bin/index.php?numlink=1";
break;
case 2:
document.getElementsByTagName("table")[0].style.backgroundImage="url(images/ueber_oben.gif)";
document.getElementsByTagName("table")[1].style.backgroundImage="url(images/ueber_unten.gif)";
document.getElementsByTagName("iframe")[0].src="cgi-bin/index.php?numlink=2";
break;
case 3:
document.getElementsByTagName("table")[0].style.backgroundImage="url(images/forum_oben.gif)";
document.getElementsByTagName("table")[1].style.backgroundImage="url(images/forum_unten.gif)";
document.getElementsByTagName("iframe")[0].src="forum/cgi-bin/index.php";
break;
case 4:
document.getElementsByTagName("table")[0].style.backgroundImage="url(images/treff_oben.gif)";
document.getElementsByTagName("table")[1].style.backgroundImage="url(images/treff_unten.gif)";
document.getElementsByTagName("iframe")[0].src="cgi-bin/index.php?numlink=4";
break;
case 5:
document.getElementsByTagName("table")[0].style.backgroundImage="url(images/termine_oben.gif)";
document.getElementsByTagName("table")[1].style.backgroundImage="url(images/termine_unten.gif)";
document.getElementsByTagName("iframe")[0].src="cgi-bin/index.php?numlink=5";
break;
case 6:
document.getElementsByTagName("table")[0].style.backgroundImage="url(images/chronik_oben.gif)";
document.getElementsByTagName("table")[1].style.backgroundImage="url(images/chronik_unten.gif)";
document.getElementsByTagName("iframe")[0].src="cgi-bin/index.php?numlink=6";
break;
case 7:
document.getElementsByTagName("table")[0].style.backgroundImage="url(images/links_oben.gif)";
document.getElementsByTagName("table")[1].style.backgroundImage="url(images/links_unten.gif)";
document.getElementsByTagName("iframe")[0].src="cgi-bin/index.php?numlink=7";
break;
case 8:
document.getElementsByTagName("table")[0].style.backgroundImage="url(images/verein_oben.gif)";
document.getElementsByTagName("table")[1].style.backgroundImage="url(images/verein_unten.gif)";
document.getElementsByTagName("iframe")[0].src="cgi-bin/index.php?numlink=8";
break;
case 9:
document.getElementsByTagName("table")[0].style.backgroundImage="url(images/kontakt_oben.gif)";
document.getElementsByTagName("table")[1].style.backgroundImage="url(images/kontakt_unten.gif)";
document.getElementsByTagName("iframe")[0].src="cgi-bin/index.php?numlink=9";
break;
case 10:
parent.document.getElementsByTagName("table")[0].style.backgroundImage="url(images/termine_oben.gif)";
parent.document.getElementsByTagName("table")[1].style.backgroundImage="url(images/termine_unten.gif)";
parent.document.getElementsByTagName("iframe")[0].src="http://www.bamboule-halle.de/cgi-bin/index.php?numlink=10&id=" + id;
break;
case 11:
parent.document.getElementsByTagName("table")[0].style.backgroundImage="url(images/forum_oben.gif)";
parent.document.getElementsByTagName("table")[1].style.backgroundImage="url(images/forum_unten.gif)";
parent.document.getElementsByTagName("iframe")[0].src="http://www.bamboule-halle.de/forum/cgi-bin/index.php";
break;
case 12:
parent.document.getElementsByTagName("table")[0].style.backgroundImage="url(images/forum_oben.gif)";
parent.document.getElementsByTagName("table")[1].style.backgroundImage="url(images/forum_unten.gif)";
parent.document.getElementsByTagName("iframe")[0].src="http://www.bamboule-halle.de/cgi-bin/a.php";
break;
}
}

/////////////////////////////////////////////////////////////////////////////////////////////////////
// ->	Ende.																				    <- //
/////////////////////////////////////////////////////////////////////////////////////////////////////

function centerwindow(width,height)		{
		 //alert('"' + "width=" + width + ",height=" + height + ",left=" + ((screen.width - width) / 4) + ",top=" + ((screen.height - height) / 2) + "" + '"');		 
		 return '"' + "width=" + width + ",height=" + height + ",left=" + ((screen.width - width) / 4) + ",top=" + ((screen.height - height) / 2) + "" + '"';
}

function create_erg_tab(z,s)	{
//alert (z);
//alert (s);

for (var i = 1; i <= z; i++)	{
	for	(var j = 1; j <= s; j++)	{
	   document.write('<input type="text">');
	}
	   document.write('<br>');
} 
}

function RemoveLink(LID)		{
         antw	=	confirm("Soll dieser Link wirklich gelöscht werden?");
         if (antw==true) {
             location.href="modify.php?area=links&LID=" + LID + "&action=1";
         }
}

function RemoveKat(KID)		{
         antw	=	confirm("Soll diese Kategorie und alle Links wirklich gelöscht werden?");
         if (antw==true) {
             location.href="modify.php?area=links&KID=" + KID + "&action=2";
         }
}

function ChangeKatName(KID,KName)		{
		antw	=	prompt("Aktuellen Kategorienamen ändern!",KName);
		alert(antw);
		if	(antw==false)	{
			alert("Es wurde nichts eingegeben!");
		}	else	{
			location.href="modify.php?area=links&KID=" + KID + "&KatBez=" + antw + "&action=3";
		}
}

function NewKat()		{
		antw	=	prompt("Kategoriebezeichnung eingeben!");
		if	(antw==false)	{
			alert("Es wurde nichts eingegeben!");
		}	else	{
			location.href="modify.php?area=links&KatBez=" + antw + "&action=4";
		}
}

// Hier werden die CMS-Seiten geladen

function cmshome()		{
	popup	=	window.open("../cgi-bin/cmshome.php","Fenster1","width=867,height=530,left=100,top=100,scrollbars=yes");
	popup.focus();
}

function cmsverein()		{
	popup	=	window.open("../cgi-bin/cmsverein.php","Fenster1","width=867,height=530,left=100,top=100,scrollbars=yes");
	popup.focus();
}

function cmsaboutt()		{
	// Fenster zum erfassen der Überschrift un der Seite "über Boule"
	popup	=	window.open("../cgi-bin/cmsabouttitle.php","Fenster1","width=440,height=180,left=100,top=100,scrollbars=no");
	popup.focus();
}

function cmsaboutnew()		{
	popup	=	window.open("../cgi-bin/cmsabout.php","Fenster1","width=867,height=530,left=100,top=100,scrollbars=yes");
	popup.focus();
}

function cmsaboutadd(id)		{
	fenster	=	"../cgi-bin/cmsabout.php?id=" + id;
	popup	=	window.open(fenster,"Fenster1","width=867,height=530,left=100,top=100,scrollbars=yes");
	popup.focus();
}

function cmsaboutdel(id)		{
         antw	=	confirm("Soll dieser Artikel wirklich gelöscht werden?");
         if (antw==true) {
             location.href="modify.php?area=aboutsitedel&id=" + id;
         }
}

function cmstermin()		{
	popup	=	window.open("../cgi-bin/cmstermin.php","Fenster1","width=880,height=640,left=100,top=100,scrollbars=yes");
	popup.focus();
}

function cmsterminadd(id)		{
	fenster	=	"../cgi-bin/cmstermin.php?id=" + id;
	popup	=	window.open(fenster,"Fenster1","width=880,height=640,left=100,top=100,scrollbars=yes");
	popup.focus();
}

function cmstermindel(id)		{
         antw	=	confirm("Soll dieser Termin wirklich gelöscht werden?");
         if (antw==true) {
             location.href="modify.php?area=terminsitedel&id=" + id;
         }
}

function cmsmeetingt()		{
	popup	=	window.open("../cgi-bin/cmsmeetingtitle.php","Fenster1",centerwindow(450,120));
	popup.focus();
}

function cmsmeetingadd(id)	{
	fenster	=	"../cgi-bin/cmsmeeting.php?id=" + id;
	popup	=	window.open(fenster,"Fenster1","width=867,height=530,left=100,top=100,scrollbars=yes");
	popup.focus();
}

function cmsmeetingnew()	{
	popup	=	window.open("../cgi-bin/cmsmeeting.php","Fenster1","width=867,height=530,left=100,top=100,scrollbars=yes");
	popup.focus();
}

function cmsmeetingdel(id)		{
         antw	=	confirm("Soll dieser Artikel wirklich gelöscht werden?");
         if (antw==true) {
             location.href="modify.php?area=meetingdel&id=" + id;
         }
}

function cmschronik()	{
	popup	=	window.open("../cgi-bin/cmschronik.php","Fenster1","width=867,height=650,left=100,top=100,scrollbars=yes");
	popup.focus();
}

function cmschronikadd(id)	{
	fenster	=	"../cgi-bin/cmschronik.php?id=" + id;
	popup	=	window.open(fenster,"Fenster1","width=867,height=650,left=100,top=100,scrollbars=yes");
	popup.focus();
}

function cmschronikdel(id)		{
         antw	=	confirm("Soll dieser Artikel wirklich gelöscht werden?");
         if (antw==true) {
             location.href="modify.php?area=chronikdel&id=" + id;
         }
}

function Upload_Fenster()	{
popup	=	window.open("../cgi-bin/upload.php","UploadFenster","width=310,height=120,left=100,top=100");
popup.focus();
}
