//Navigationsbuttons in Cache laden
//---------------------------------------------------------------------------------
u_uns_off = new Image(); u_uns_off.src = "../img/u_uns_0.gif";
u_uns_on = new Image(); u_uns_on.src = "../img/u_uns_1.gif";
unterrichtsinhalte_off = new Image(); unterrichtsinhalte_off.src = "../img/unterrichtsinhalte_0.gif";
unterrichtsinhalte_on = new Image(); unterrichtsinhalte_on.src = "../img/unterrichtsinhalte_1.gif";
g_buch_off = new Image(); g_buch_off.src = "../img/g_buch_0.gif";
g_buch_on = new Image(); g_buch_on.src = "../img/g_buch_1.gif";
tanzkurse_off = new Image(); tanzkurse_off.src = "../img/tanzkurse_0.gif";
tanzkurse_on = new Image(); tanzkurse_on.src = "../img/tanzkurse_1.gif";
aktuelles_off = new Image(); aktuelles_off.src = "../img/aktuelles_0.gif";
aktuelles_on = new Image(); aktuelles_on.src = "../img/aktuelles_1.gif";
forum_off = new Image(); forum_off.src = "../img/forum_0.gif";
forum_on = new Image(); forum_on.src = "../img/forum_1.gif";
home_off = new Image(); home_off.src = "../img/home_0.gif";
home_on = new Image(); home_on.src = "../img/home_1.gif";
jugendseite_off = new Image(); jugendseite_off.src = "../img/jugendseite_0.gif";
jugendseite_on = new Image(); jugendseite_on.src = "../img/jugendseite_1.gif";

//---------------------------------------------------------------------------------

//Navigation Oben
//---------------------------------------------------------------------------------

function navOben()
{
document.write('<table cellspacing="0" cellpadding="0" border="0">');
document.write('<tr>');
document.write('<td><p></p>');
document.write('</td>');
document.write('</tr>');
}
//links Oben
//---------------------------------------------------------------------------------
function navTop()
{
document.write('<table cellspacing="0" cellpadding="0" border="0">');
document.write('<tr>');
document.write('<td><p class="whiteB">');
document.write('<br><br>');
document.write('<img src="../img/dot.gif" width=1 height=144 alt="" border="0"><br><br></p></td>');
document.write('</tr>');
}
//---------------------------------------------------------------------------------

//Navigation Button
//---------------------------------------------------------------------------------
function navItem(name,alt,status)
{
document.write('<tr>');
document.write('<td  height="24" valign="middle">');

if (status == "0")
	{
	if (name == "forum")
	{
		document.write('<a href="http://31211.rapidforum.com/" onClick="windowUnterrichtsinhalte()" target="unterrichtsinhalte" ');
	}
	else if (name == "jugendseite")
	{
		document.write('<a href="http://www.m-cu.de.vu/" onClick="windowUnterrichtsinhalte()" target="unterrichtsinhalte" ');
	}
	else
	{
		document.write('<a href="../f_' +name+ '.html" target="_top" ');
	}
	document.write('onMouseOver="chgImg(\'' +name+ '\',' +name+ '_on)" ');
	document.write('onMouseOut="chgImg(\'' +name+ '\',' +name+ '_off)">');
	document.write('<img src="../img/' + name + '_0.gif" width=120 height=20 ');
	document.write('name="' + name + '" alt="' + alt + '" border="0"></a>');
	}
else
	{
	document.write('<a href="../f_' +name+ '.html" target="_top">');
	document.write('<img src="../img/' + name + '_1.gif" width=120 height=20 ');
	document.write('name="' + name + '" alt="' + alt + '" border="0"></a>');
	}

document.write('</td>');
document.write('</tr>');
}
//---------------------------------------------------------------------------------

//Navigation Unten
//---------------------------------------------------------------------------------
function navBottom()
{
document.write('</table>');
}
//---------------------------------------------------------------------------------

//OnMouseOwer, OnMouseOut
//---------------------------------------------------------------------------------
function chgImg(imgname, objekt)
{
	window.document.images[imgname].src = objekt.src;
}
//---------------------------------------------------------------------------------

// Diashow
//---------------------------------------------------------------------------------
var dia = new Array();
dia[0] = new diabild("../img/10jahre.gif");
//dia[0] = new diabild("../img/dia1.gif");
//dia[1] = new diabild("../img/dia2.gif");
//dia[2] = new diabild("../img/dia3.gif");

function diabild(bildurl)
{
this.bild = new Image();
this.bild.src = bildurl;
}

function diashow(einblendung)
{
if (einblendung>dia.length-1)
	einblendung = 0;
self.document.anim_bild.src = dia[einblendung].bild.src;
timeOutString = "diashow("+(einblendung+1).toString()+")"; // function diashow als string
timerID = setTimeout(timeOutString,3000); // Intervall 3s
}
//--------------------------------------------------------------------------------

//Team
//---------------------------------------------------------------------------------------------------------------------------
function showBild(verzeichniss, bild, txt) 
{
	var refWindow = window.open("","referenzen","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,dependent=1, width=500,height=350");
	with(refWindow.document)
	{
	open("text/html");
    writeln('<html><head><title>Team</title><link rel="STYLESHEET" type="text/css" href="../adtv.css"><body bgcolor="#FF8E00" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">');
	writeln('<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">');
	writeln('<tr><td align="center" valign="middle">');
	writeln('<table cellspacing="0" cellpadding="5" border="0"><tr><td bgcolor="#FFFFFF">');
	writeln('<img src="'+verzeichniss+'/' +bild+ '.jpg" border=0">');
	writeln('</td><td bgcolor="#FFFFFF"><p>'+txt+'</p></td></tr></table></td></tr></table>');
    writeln('</body></html>');
	close();
	}
	refWindow.focus()
}
//---------------------------------------------------------------------------------------------------------------------------

//--PDF-Window
function newWindow() 
{
	var newWindow = window.open("","referenzen","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,dependent=1, width=500,height=350");
	newWindow.focus();

}

//--PDF-Window
function windowUnterrichtsinhalte() 
{
	var newWindow = window.open("","unterrichtsinhalte","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,dependent=1");
	newWindow.focus();
}

function date() {  
var now = new Date();
currentDate = dayNames[now.getDay()] + ', ' + now.getDate()+ '. ' +monNames[now.getMonth()]+ ' ' +t4(now.getYear());
}
var monNames = new gMon();
var monNames = new Array('Januar', 'Februar', 'M&auml;rz', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember');

function gMon()
{
	this[0] = 'Januar';
	this[1] = 'Februar';
	this[2] = 'M&auml;rz';
	this[3] = 'April';
	this[4] = 'Mai';
	this[5] = 'Juni';
	this[6] = 'Juli';
	this[7] = 'August';
	this[8] = 'September';
	this[9] = 'Oktober';
	this[10] = 'November';
	this[11] = 'Dezember';
}

var dayNames = new dMon();
var dayNames = new Array('Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag');

function dMon()
{
	this[0] = 'Sonntag';
	this[1] = 'Montag';
	this[2] = 'Dienstag';
	this[3] = 'Mittwoch';
	this[4] = 'Donnerstag';
	this[5] = 'Freitag';
	this[6] = 'Samstag';
}

function t4(y)
{
	return (y < 1000 ? y+1900 : y);
}


//---------------------------------------------------------------------------------------------------------------------------
function goToLink(url)
{
	window.location.href = dynUrl + url;
}
//---------------------------------------------------------------------------------------------------------------------------

function windowAnmeldung() 
{
var anmeldung=window.open("","anmeldung","toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1,width=450,height=500");
anmeldung.focus();
}

function windowForum() 
{
var forum=window.open("","forum","toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1");
forum.focus();
}


