// -------------------------------------------------------------------------------------------------------
// load stylesheets
// -------------------------------------------------------------------------------------------------------

var ie = navigator.userAgent.indexOf("MSIE") != -1 ? true : false;
var ns6 = navigator.userAgent.indexOf("Mozilla/5") != -1 ? true : false;
var ns = navigator.appName.indexOf("Netscape") != -1 && !ns6 ? true : false;
var op = navigator.userAgent.indexOf("Opera") != -1 ? true : false;
var mac = navigator.userAgent.indexOf("Mac") != -1 ? true : false;
var win = navigator.userAgent.indexOf("Win") != -1 ? true : false;
var mac_ie5 = navigator.userAgent.indexOf("MSIE 5") != -1 && mac ? true : false;
var mac_ie4 = navigator.userAgent.indexOf("MSIE") != -1 && mac && !mac_ie5 ? true : false;
var ie4 = navigator.userAgent.indexOf("MSIE 4") != -1 ? true : false;

// -------------------------------------------------------------------------------------------------------
// global functions
// -------------------------------------------------------------------------------------------------------

function goTo(src) {
 	document.location.href = src;
}

function goToTop(src) {
 	top.location.href = src;
}

function datum() {
  var wochentag = new Array("Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag");
  var jetzt = new Date();
  var woTag = jetzt.getDay();
  var tag = jetzt.getDate();
  var vorTag = (tag < 10 ? "0" : "");
  var monat = jetzt.getMonth() + 1;
  var vorMon = (monat < 10 ? "0" : "");
  var jahr = jetzt.getYear();
  if(ns || ns6) jahr += 1900;
  return wochentag[woTag] + ", " + vorTag + tag + "." + vorMon + monat + "." + jahr;
}

var fenster = 0;

function newWindow(url, breite, hoehe, left, top, scroll, menu, tool) {
	if(fenster && !fenster.closed) fenster.close();
	if(!left && !top) {
		left = (screen.width - breite) / 2;
		top = (screen.height - hoehe) / 2;
	}
	fenster = window.open(url, "fenster", "width=" + breite + ",height=" + hoehe +
						  				  ",left=" + left + ",top=" + top + ",scrollbars=" + scroll +
						  				  ",menubar=" + menu + ",toolbar=" + tool);
	fenster.focus();
}

function popfenster(url, titel, breite, hoehe, left, top, scroll, menu) {
	if(!left && !top) {
		left = (screen.width - breite) / 2;
		top = (screen.height - hoehe) / 2;
	}
  bild = window.open(url, titel, "width=" + breite + ",height=" + hoehe + ",left=" + left + ",top=" + top + ",scrollbars=" + scroll + ",menubar=" + menu + ", resizable=0");
  bild.document.writeln('<html><head><title>' + titel + '</title></head>');
  bild.document.writeln('<body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0 bgcolor="White">');
  bild.document.writeln('<a href="javascript:self.close()"><img src="' + url + '" border=0 alt="schliessen"></a>');
  bild.document.writeln('</body></html>');
  bild.focus();
}


// -------------------------------------------------------------------------------------------------------
// submit function
// -------------------------------------------------------------------------------------------------------

function abschicken() 
{
	var f = document.forms[0];
	document.forms[0].submit();
}

// -------------------------------------------------------------------------------------------------------


