function openImpressum()
{
	fenster = window.open("../impressum/index.html","Impressum","width=270,height=300,left=0,top=0,location=no,menubar=no,scrollbars=no,resizable=yes,status=no,toolbar=no");

	}

	
function isRequired()
{
	theMail = document.forms[0].email.value;
	
	if (theMail != "")
	{
		if (theMail.search(/@/) == -1)
		{
			alert("Bitte geben Sie Ihre korrekte eMail-Adresse an");
		}
		else
		{
			document.forms[0].submit();
		}
	}
	else
	{
		alert("Bitte geben Sie Ihre eMail-Adresse an");
	}
}


thecounter = 1;
aktiv = "";

function changeImage_home()
{

if (document.images)
{
	if (thecounter < 8)
	{
		if (define == "l")
		{
			thenewname = "img/start/l"+thecounter+"a.gif";
			//alert(thenewname);
			eval("document.l"+thecounter+".src = thenewname");
			define = "b";
		}
		else
		{
			thenewname = "";
			thenewname = "img/start/b"+thecounter+"a.gif";
			//alert(thenewname);
			eval("document.b"+thecounter+".src = thenewname");
			thecounter++;
			define = "l";
		}
	}
	else
	{
		thecounter++;
		if (thecounter == 10)
		{
			window.location.href = "veranstaltungen/index.html";
			window.clearInterval(aktiv);
		}
	}
}
}

function intervall_home()
{
// preload images
	if (document.images)
	{
		thelimages = new Array(7);
		thebimages = new Array(7);
		for (var i = 0; i < 7; i++)
		{
		 thebimages[i] = new Image();
		 thebimages[i].src = "img/start/b"+(i+1)+"a.gif";
 		 thelimages[i] = new Image();
		 thelimages[i].src = "img/start/l"+(i+1)+"a.gif";
		}
	}
	define = "l";
	thecounter = 1;
	aktiv = window.setInterval("changeImage_home()",1200);
}


function sLI(ort, pic)
{

	thesource = "ansichten/an_"+ort+pic+".html";
	
	fenster = window.open(thesource,"Impressionen","width=500,height=500,left=0,top=0,location=no,menubar=no,scrollbars=no,resizable=no,status=no,toolbar=no");
	fenster.focus();
}

function changeImage(ort)
{
	if (document.images)
	{
		{
			if (thename == 12)
			{
				thename = 0;
			}
			else
			{
				thename++;
				thenewfilename = "../img/impressionen/leiste/on.gif";
				theoldfilename = "../img/impressionen/leiste/off.gif";
				thebildname = "../img/impressionen/"+ort+"/kl/"+ort+"bild"+thename+"k.jpg";
				eval("document.l"+thename+".src = thenewfilename");
				if (thename == 1)
				{
					//thename = 0;
					eval("document.l"+12+".src = theoldfilename");
				}
				else
				{
					eval("document.l"+(thename-1)+".src = theoldfilename");
				}
				document.bild.src = thebildname;
			}		
		}
	}
}




function intervall(ort)
{
//preload Images
	if (document.images)
	{
		theimages = new Array(12);
		for (var i = 0; i < 12; i++)
		{
			theimages[i] = new Image(241,120);
			theimages[i].src =  "../img/impressionen/"+ort+"/kl/"+ort+"bild"+(i+1)+"k.jpg";
		}
	}
		 
	thename = 0;
	if (ort == "wg")
	{
		var aktiv = window.setInterval("changeImage('wg')",3000);
	}
	else
	{
		var aktiv = window.setInterval("changeImage('pf')",3000);
	}
	

}



function changeImage_idee()
{
	if (document.images)
	{
		{
			if (thename == 5)
			{
				thename = 0;
			}
			else
			{
				thename++;
				thebildname = "../img/idee/ibild"+thename+"k.jpg";
				document.bild.src = thebildname;
			}		
		}
	}
}

function intervall_idee()
{
//preload Images
	if (document.images)
	{
		theimages = new Array(5);
		for (var i = 0; i < 5; i++)
		{
			theimages[i] = new Image(241,120);
			theimages[i].src =  "../img/idee/ibild"+(i+1)+"k.jpg";
		}
	}
	thename = 0;
	var aktiv = window.setInterval("changeImage_idee()",3000);
}

