//FUNKTIONEN=================================================================================================================
//Netscape Resize Bug
//===========================================================================================================================

//Netscape Resize Bug
//---------------------------------------------------------------------------------------------------------------------------
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//---------------------------------------------------------------------------------------------------------------------------


//dynUrl muß auch noch im Bereich extras geändert werden
//dynUrl= 'http://localhost:8080/adtv';
dynUrl= 'http://jkbserv.de/adtv';


//Designvorgaben
//---------------------------------------------------------------------------------------------------------------------------
function initBody() {  //Erstelle oberen Bereich
var now = new Date();
currentDate = now.getDate()+ '. ' +monNames[now.getMonth()]+ ' ' +t4(now.getYear());

document.write('<table width="800" height="100%" cellspacing="0" cellpadding="0" border="0">');
document.write('<tr>');
document.write('<td width="200" background="' +rootUrl+ 'pix/bgd_bottom.gif" valign="top" class="m">');
document.write('<table background="' +rootUrl+ 'pix/bgd_nav.gif" width="200" cellspacing="0" cellpadding="0" border="0">');
document.write('<tr>');
document.write('<td class="m"><br>&nbsp;&nbsp;&nbsp;<font color="#FFFFFF"><b>Ausreden<br>');
document.write('&nbsp;&nbsp;&nbsp;die man(n) nicht braucht</b></font><br><br>');
//document.write('<img src="http://www.tanzschule-feil.de/html/pix/dia1.gif" name="anim_bild" width=130 height=144 alt="" border="0"><br><br>');
document.write('<img src="&{dia[0].bild.src};" name="anim_bild" width=130 height=144 alt="" border="0"><br><br>');
}

function beginMain() {  //Erstelle Tabelle für Hauptbereich
document.write('<td width="720" valign="top" style="white-space:nowrap;">');
document.write('<img src="' +rootUrl+ 'pix/headline.jpg" width="540" height="85" alt="" border="0" align="top"><img src="' +rootUrl+ 'pix/dot.gif" width="120" height="85" alt="" border="0" align="top"><a href="http://www.tanzen.de" target="_blank"><img src="' +rootUrl+ 'pix/adtvHead.gif" width="60" height="55" alt="" border="0"></a>');

if (navigator.appName == "Microsoft Internet Explorer") {
	document.writeln('<marquee style="font-family:Arial, Helvetica, sans-serif; font-size:10pt; color:#0000ff; font-weight:bold; text-align:top; float:none; padding-top:2px; padding-bottom:2px"; scrolldelay=100 scrollamount=4 align=top width=720 height=20>'+message+'</marquee>');
	}
}

function endMain() {  //Beendet Tabelle für Hauptbereich
document.write('</td>');
document.write('</tr>');
document.write('</table>');
}
//---------------------------------------------------------------------------------------------------------------------------


//Navigation
//---------------------------------------------------------------------------------------------------------------------------
function chgImg(name, objekt){
window.document.images[name].src = objekt.src;
}

function makeTopLevelButton(status, bereich, altText, altUrl) { //TopLevel Buttons erstellen
var eigenschaften = '';
var bildButton = bereich+ 'On'; 
var myLink = altUrl;

if (myLink == '' || myLink == null) {
	myLink = rootUrl + bereich+ '.html';
	}

else {
	myLink = altUrl;
	}

if (status != 'on') {
	eigenschaften = 'onMouseOver="chgImg(\'' +bereich+ '\',' +bereich+ 'On)" onMouseOut="chgImg(\'' +bereich+ '\',' +bereich+ 'Off)"';
	if (myLink == 'http://www.tanzschule-feil.spreadshirt.de/') {
		eigenschaften = eigenschaften + " target='_blank'";
	}
	bildButton = bereich+ 'Off';
	}

document.write('<img src="' +rootUrl+ 'pix/dot.gif" width="1" height="5" alt="" border="0"><br>');
document.write('<a href="' +myLink+ '" ' +eigenschaften+ '>');
document.write('<img src="' +rootUrl+ 'pix/nav/' +bildButton+ '.gif" name="' +bereich+ '" alt="' +altText+ '" border="0"></a><br>');
}

function makeMenu(bereich)
{
makeTopLevelMenu(bereich);
document.write('</td>');
document.write('</tr>');
document.write('</table></td>');
}

//Navigation Text
//---------------------------------------------------------------------------------------------------------------------------
function navText()
{
document.write('<br><br><table width="570" cellspacing=0 cellpadding=0 border=0>');
document.write('<tr>');
document.write('<td align="center"><p class="link">');
document.write('[<a href="'+ rootUrl +'uns.html" target="_top">&uuml;ber uns</a>] ');
document.write('[<a href="'+ dynUrl +'/tanzschule/feil/jsp/kurse.jsp?tanzId=feil" target="_top">kurse</a>] ');
document.write('[<a href="'+ dynUrl +'/tanzschule/feil/jsp/parties.jsp?tanzId=feil" target="_top">parties</a>] ');
document.write('[<a href="'+ rootUrl +'tanzpartner.html" target="_top">tanzpartnerbörse</a>] ');
document.write('[<a href="'+ dynUrl +'/tanzschule/feil/jsp/bildergalerie.jsp?tanzId=feil" target="_top">galerie</a>] ');
document.write('[<a href="'+ rootUrl +'extras.html" target="_top">extras</a>] ');
document.write('[<a href="'+ dynUrl +'/tanzschule/feil/jsp/downloads.jsp?tanzId=feil" target="_top">downloads</a>] ');
document.write('[<a href="'+ dynUrl +'/tanzschule/feil/jsp/home.jsp?tanzId=feil" target="_top">home</a>]');
document.write('</p></td>');
document.write('</tr>');
document.write('</table>');
}
//---------------------------------------------------------------------------------------------------------------------------


// Diashow
//---------------------------------------------------------------------------------------------------------------------------
var dia = new Array();
dia[0] = new diabild(rootUrl + "pix/dia1.gif");
dia[1] = new diabild(rootUrl + "pix/dia2.gif");
dia[2] = new diabild(rootUrl + "pix/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
}
//---------------------------------------------------------------------------------------------------------------------------



//allgemeine Funktionen
//---------------------------------------------------------------------------------------------------------------------------
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';
}

function t4(y)
{
	return (y < 1000 ? y+1900 : y);
}

// Anmeldung Fenster
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();
}

//Link
//---------------------------------------------------------------------------------------------------------------------------
function goToLink(url)
{
	window.location.href = dynUrl + url;
}
//---------------------------------------------------------------------------------------------------------------------------

function teamWindow()
{
	var teamWindow=window.open("","popup","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=500,height=350");
	teamWindow.focus();
}

