// ----------------------------------------------------------------------------
// java script functions c) 1999-2003 by www.nxc.de
// ----------------------------------------------------------------------------

function dummy()
{
	// dummies for nothing ;-)
}

function statusbar(text)
{
	// Zeigt den uebergeben Text in der Statuszeile des Browsers an.
    status=text;
}

function sendfile(source)
{
	if ( source == -1 ) {
		alert('Bitte zuerst einen Eintrag auswählen.');
	} 
	else
	if ( source == null ) {
		alert('Bitte zuerst einen Eintrag auswählen.');
	}
	else {
		alert(source);
	}
}

function popup(URL,s,w,h,x,y)
{
	// Oeffnet eine HTML Seite (URL) in einem neuen Browser Fenster mit den
	// Parametern (w)idth, (h)eight und (s)crollbars yes/no.
	// Das Fenster wird automatisch zentriert, wenn fuer die obere
	// linke Ecke (x,y) keine Parameter uebergeben werden.
	if ( s == null ) s = "no";
	if ( h == null ) h = w;
	if ( x == null ) x = ( screen.availWidth - w ) / 2;
	if ( y == null ) y = ( screen.availHeight - h ) / 2;
	win = window.open( URL,"","scrollbars="+s+",width="+w+",height="+h+",left="+x+",top="+y );
	win.focus();
}

function showpic(URL)
{	
	// Oeffnet eine fest vorgegebene HTML Seite (showpic.htm) in einem neuen
	// Browser Fenster mit der Groesse 400x400 in der Bildschrim Mitte. Das
	// angegebene Bild (URL) wird innerhalb einer Tabelle horizontal und vertikal
	// im Fenster zentriert. Die Angabe einer Hintergrundfarbe ist optional.
	x = ( screen.availWidth - 400 ) / 2;
	y = ( screen.availHeight - 400 ) / 2;
	win = window.open("showpic.htm","","width=400,height=400,left="+x+",top="+y );
	win.document.write("<html>\n<head>\n<title>MVSG - Galerie </title>\n");
	win.document.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n");
	win.document.write("</html>\n</head>\n");
	win.document.write("<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor=\"#000000\" background=\"../img/loading_galerie_bild.gif\">\n");
	win.document.write("<table width=100% border=0 cellspacing=0 cellpadding=0 height=100%>\n");
	win.document.write("<tr align=center valign=middle>\n");
	win.document.write("<td><img src="+URL+"></td>\n");
	win.document.write("</tr>\n</table>");
	win.focus();
}

function loadtheme()
{
	// Sucht eine zum aktuellen Datum passende (bereits existierende!) HTML Seite
	// um diese dann z.B. als 'Themen-/Jahreszeit bezogene' Startseite anzeigen zu koennen.
	URL = "home.htm";
	return ("home.htm");
	}

function ontop()
{	
	// Setzt den Focus alle 50ms auf das eigene Fenster,
	// so dass es immer im Vordergrund belibt.
  	self.focus();
  	window.setTimeout("ontop()",50);
}

function today()
{
    datum = new Date(); 
    Tag = datum.getDate(); 
    Monat = datum.getMonth() + 1;
    Jahr = datum.getYear();
    if ( Jahr < 100 ) Jahr += 2000;
    if ( Jahr < 200 && Jahr > 100 ) Jahr += 1900;
    document.write("<FONT COLOR=#010000 SIZE=-2 FACE=Tahoma,Verdana,Arial,Helvetica>");
    //document.write(Tag+"." + Monat + "." + Jahr);
    //document.write("&lt;&lt</FONT>");
    //return ( Tag + "." + Monat + "." + Jahr );    
    return ( Tag + "x" + Monat + "x" + Jahr );    
}

function loadpage()
{
	var url = "home.htm";
	
	/*
	var links = 12;
	var date = new Date();
	var tt = date.getDay();
	var mm = date.getMonth();
	
	var ra = rd % links;
	var re = ++ra;
	var url = "document.write(re)";
	var text = "";
if (re == 1) {
url = "http://javascriptsource.com"; 
text = "The JavaScript Source"; 
} 
if (re == 2) {
url = "http://www.htmlgoodies.com/";
text = "HTMLgoodies";
} 
if (re == 3) {
url = "http://www.ask.com/";
text = "Ask.com Search Engine";
} 
if (re == 4) { 
url = "http://www.microsoft.com/";
text = "Microsoft, Inc."; 
} 
if (re == 5) { 
url = "http://www.netscape.com/";
text = "Netscape's web site";
} 
if (re == 6) { 
url = "http://www.hotbot.com"; 
text = "HotBot's Search Engine";
}
if (re == 7) { 
url = "http://www.internet.com"; 
text = "Internet.com";
} 
if (re == 8) { 
url = "http://www.altavista.digital.com";
text = "Digital Altavista - A Search Engine";
} 
if (re == 9) {
url = "http://www.webdiner.com/";
text = "Web Diner - Help on the Web";
} 
if (re == 10) {
url = "http://www.smartclicks.com/";
text = "SmartClicks - Free advertising on the Web";
}
if (re == 11) {
url = "http://www.trailerpark.com/flamingo/chowch/aj/";
text = "Awards Jungle - One Stop Awards Submission";
} 
if (re == 12) {
url = "http://www.geocities.com/";
text = "Geocities - Get a FREE web site";
} 
var link="<A TARGET=\"_top\" HREF=\""+url+"\" onMouseOver=\"window.status='"+text+"'\">"+text+"</A>";
*/
	document.write("home.htm");
}

