window.defaultStatus = "Historie der Schützengesellschaft Jena";

function email(remark) {
	teil1 = "mailto:" + "volker";
	teil2 = "@" + "volker-helmig.";
	teil3 = "de";
	teil4 = "?subject=Historie der Schuetzengesellschaft Jena (" + remark + ")&body=Anfrage...";
	eMailWindow = window.open(teil1 + teil2 + teil3 + teil4);
	if (eMailWindow != null) {
		setTimeout('eMailWindow.close()','1');
	}
}

function email_alt(URL) {
	if (URL == null) {URL = "email.html";}
	win = window.open(URL,"eMail","scrollbars=0,resizable=0,top=50,left=50,height=220,width=500");
	setTimeout('win.close()','6000');
	win.focus();
}

function popper(URL) {
	win2 = window.open(URL, "poPPer", "scrollbars=1,resizable=0,top=75,left=25,height=300,width=775");
	setTimeout('win2.close()','300000');
	win2.focus();
}

function quelle(URL) {
	win3 = window.open(URL, "Quelle", "scrollbars=1,resizable=0,top=50,left=0,height=200,width=775");
	setTimeout('win3.close()','300000');
	win3.focus();
}

function extern(URL) {
	win4 = window.open(URL, "extern", "scrollbars=1,resizable=0,top=100,left=50,height=500,width=600");
	setTimeout('win4.close()','300000');
	win4.focus();
}

function bilder(URL) {
	win5 = window.open(URL, "Bilder", "scrollbars=1,resizable=0,top=0,left=0,height=625,width=825");
	setTimeout('win5.close()','300000');
	win5.focus();
}

function lieder(URL) {
	win6 = window.open(URL,"MusikBox","scrollbars=0,resizable=0,top=100,left=100,height=200,width=400");
	setTimeout('win6.blur()','5000');
	setTimeout('win6.close()','300000');
}

function BildBox(BildName,BildBreit,BildHoch,BildText) {
	var Adj1 = 20;
	var Adj2 = 66;
	var Breit = screen.availWidth;
	var Hoch  = screen.availHeight;
	var Faktor = 1;
	var posLeft  = 0;
	var posTop   = 0;
	var Scroll   = 0;

	if (BildBreit == null) {BildBreit = Breit;}
	if (BildHoch  == null) {BildHoch  = Hoch;}
	if (BildText  == null) {BildText  = BildName;}

	if (BildBreit > Breit - Adj1){
	  Faktor    = (Breit - Adj1) / BildBreit;
	  BildBreit = Breit - Adj1;
	  BildHoch  = BildHoch * Faktor;
	}

	if (BildHoch > Hoch -  Adj2){
	  Faktor  = (Hoch -  Adj2) / BildHoch;
	  BildHoch  = Hoch - Adj2;
	  BildBreit = BildBreit * Faktor;
	}

	var scrWidth  = BildBreit;
	var scrHeight = BildHoch;

	posLeft = (Breit - scrWidth - Adj1) / 2;
	posTop  = (Hoch - scrHeight - Adj2) / 2;

	posTop    = parseInt(posTop);
	posLeft   = parseInt(posLeft);
	scrWidth  = parseInt(scrWidth);
	scrHeight = parseInt(scrHeight);
	BildBreit = parseInt(BildBreit);
	BildHoch  = parseInt(BildHoch);

	if (document.all) {
	// navigator.family = "ie4"
	  fenster = window.open("","fenster","width=" + scrWidth + ", height=" + scrHeight + ", left=" + posLeft + ", top=" + posTop + ", scrollbars=" + Scroll);
	}

	if (window.navigator.userAgent.toLowerCase().match(/gecko/)) {
	// navigator.family = "gecko"
	  fenster = window.open("","fenster","width=" + scrWidth + ", height=" + scrHeight + ", left=" + posLeft + ", top=" + posTop + ", scrollbars=" + Scroll);
	}

	if (document.layers) {
	// navigator.family = "nn4"
	  fenster = window.open("fenster.html","fenster","width=" + scrWidth + ", height=" + scrHeight + ", left=" + posLeft + ", top=" + posTop + ", scrollbars=" + Scroll);
	}

	if (window.navigator.userAgent.toLowerCase().indexOf('opera') != -1) {
	// navigator.family = 'opera';
	  fenster = window.open("","fenster","width=" + scrWidth + ", height=" + scrHeight + ", left=" + posLeft + ", top=" + posTop + ", scrollbars=" + Scroll);
	}

	  fenster.document.open();
	  fenster.document.writeln('<Html><Head><Title>' + BildText + ' - (' + BildBreit + 'x' + BildHoch + ' Pixel)</Title></Head><Body LeftMargin=0 TopMargin=0 MarginHeight=0 MarginWidth=0 onBlur="self.close()" onClick="self.close()">');
	  fenster.document.writeln('<Table Border=0 CellSpacing=0 CellPadding=0 Align=Center Height=' + scrHeight + '><Tr>');
	  fenster.document.writeln('<Td><Img Src="' + BildName + '" Width=' + BildBreit + ' Height=' + BildHoch + ' Alt="Klicke auf das Bild, um das Fenster zu schliessen!"></Td>');
	  fenster.document.writeln('</Tr></Table></Body></Html>');
	  fenster.document.close();
	  fenster.focus();
}

function LastYear(update) {
	datum = new Date(update);
	jahr  = datum.getYear();
	if (jahr < 2000) { jahr += 1900; }
	document.write("<A Target='_blank' Href='http://www.volker-helmig.de/' Class=n>&copy; <B>Volker Helmig</B> (1990-" + jahr + ")</A>");
}

function jetztJahr() {
	datum = new Date();
	jahr  = datum.getYear();
	if (jahr < 2000) { jahr += 1900; }
	document.write(jahr + " &copy; Hmg.");
}

function LastMod(update) {
	datum = new Date(update);
	jahr  = datum.getYear();
	if (jahr < 2000) { jahr += 1900; }
	monat = datum.getMonth() + 1;
	tag   = datum.getDate();
	document.write("zuletzt bearbeitet am " + tag + "." + monat + "." + jahr + " - Hmg.");
}
