﻿// www.die-fotoseite.de - Version vom 12.09.2011

function Kontaktaufnahme()
		{
		leben= "ite.de";
		so= "o:i";
		Wir= "ma";
		wie= "fot";
		zu= "o@";
		wir= "ose";
		lernen= "die-";
		haben= "ilt";
		lange= "nf";

		Erkenntnis = Wir + haben + so + lange + zu + lernen + wie + wir + leben;

		parent.location=Erkenntnis
		}


function WebmasterKontaktaufnahme()
		{
		leben= "ite.de";
		so= "o:we";
		Wir= "ma";
		wie= "fot";
		zu= "ter@";
		wir= "ose";
		lernen= "die-";
		haben= "ilt";
		lange= "bmas";

		Erkenntnis = Wir + haben + so + lange + zu + lernen + wie + wir + leben;

		parent.location=Erkenntnis
		}
		
		
function Problemkontakt()
		{
			leben= "ite.de?subject=Zugangsproblem";
			so= "o:we";
			Wir= "ma";
			wie= "fot";
			zu= "ter@";
			wir= "ose";
			lernen= "die-";
			haben= "ilt";
			lange= "bmas";

			Erkenntnis = Wir + haben + so + lange + zu + lernen + wie + wir + leben;

			parent.location=Erkenntnis
		}

function LinkpartnerKontakt()
		{
			leben= "ite.de?subject=Linkpartner";
			so= "o:we";
			Wir= "ma";
			wie= "fot";
			zu= "ter@";
			wir= "ose";
			lernen= "die-";
			haben= "ilt";
			lange= "bmas";

			Erkenntnis = Wir + haben + so + lange + zu + lernen + wie + wir + leben;

			parent.location=Erkenntnis
		}	

function KommerzKontakt()
		{
			leben= "ite.de?subject=kommerzielle Anfrage";
			so= "o:we";
			Wir= "ma";
			wie= "fot";
			zu= "ter@";
			wir= "ose";
			lernen= "die-";
			haben= "ilt";
			lange= "bmas";

			Erkenntnis = Wir + haben + so + lange + zu + lernen + wie + wir + leben;

			parent.location=Erkenntnis
		}	

function makefav()
		{
			favstring=prompt('die-fotoseite zu den Favoriten hinzufügen?','die-fotoseite - immer einen b/k-lick wert');
			if (favstring)
				{
					window.external.AddFavorite('http://www.die-fotoseite.de',favstring);
				}
		}


function doit(url)
	{
		if (url  != "empty")
			{
				location.href = url;
				document.forms[0].elements[0].blur();
				return;
			}
		else
			{
				document.forms[0].elements[0].form.reset();
			}
	}


function fensterauf(win)
	{
		newwin = window.open(win);
		newwin.focus();
	}
		
function galinfo_on()	{
		document.getElementById("galinf").style.visibility = "visible";
		}

function galinfo_off()	{
		document.getElementById("galinf").style.visibility = "hidden";	
		}	

function abm09switch(url)	{
		var url;
		document.getElementById("abm09gfx").src = url;
		alert(url);

		}

//--------------------------------------

function pic2frame(pic)	{
	if ( is_html == true ) {
		if (msie == true) {
				document.getElementById("picdisp").location.href = pic;
			} else {
				document.getElementById("picdisp").data = pic;
			}
	} else {
			document.getElementById("picdisp").src = pic;
			}
	}

function bildwexl(pic) {
	pic2frame(pic);
	pos = pic.search(".jpg");
	if (pos == -1)	{
		pos = pic.search(".html");
		if (pos == -1)	{
			alert("Keine JPG- oder HTML-Datei!");
			return;
			}
		}

	endpos = pos;
	while ( pic.charAt(pos) != "/" && pos > 0 )
		{ pos--; }
	pos++;
	bildnr = parseInt(pic.slice(pos,endpos));
	}

function bildanzeige() {
	if ( bildnr > maxbildnr ) {
		bildnr = 0
		}
	pic2frame(bildliste[bildnr]);
	bildnr++;
	}

function autooff() {
	if ( auto ) {
		window.clearInterval(auto);
		auto = 0;
		bildnr--;
		}
	document.getElementById("showstop").style.backgroundImage = "url(http://www.die-fotoseite.de/Gfx/film_stop_act.png)";
	document.getElementById("showstart").style.backgroundImage = "url(http://www.die-fotoseite.de/Gfx/film.png)";
	document.getElementById("showstatus").innerHTML = "gestoppt";
	}

function autoon() {
	window.clearInterval(auto);
	bildanzeige();
	auto = window.setInterval("bildanzeige()", intervall);
	document.getElementById("showstart").style.backgroundImage = "url(http://www.die-fotoseite.de/Gfx/film_act.png)";
	document.getElementById("showstop").style.backgroundImage = "url(http://www.die-fotoseite.de/Gfx/film_stop.png)";
	document.getElementById("showstatus").innerHTML = "läuft...";
	}

function wieschnell() {
	intervall = window.prompt("Bitte den Bildwechsel in Sekunden eingeben.\n\n1...30 s\n",intervall/1000);
	if ( isNaN(intervall)) {
		intervall = 5;
		}

	if (intervall == 0)	{
		intervall = 5;
		}
		
	if (intervall > 0) {
		if ( intervall < 1) {
			intervall = 1
			}
		if ( intervall > 30) {
			intervall = 30
			}
			
		intervall *=1000;
		autoon();
		}
	}		


function taste(evt) {
	if (!evt) {
		evt = window.event;
		}
	if (evt.which) {
		key = evt.which;
		}
	else if ( evt.keyCode ) {
		key = evt.keyCode;
		}

	switch (key) {
		case 32:
			pausentaste();
			break;
		
		case 39:
			picnext();
			break;
		
		case 37:
			picprev();
			break;
				
		case 220:
			wieschnell();
			break;
			}		
	}

function pausentaste() {
	if ( auto ) {
		autooff();
		}
	else {
		autoon();
		}
	}

function picnext() {
	if ( auto ) {
		autoon();
		bildnr--;
		}
	else {
		bildnr++;
		bildanzeige();
		bildnr--;
		}
	}


function picprev() {
	if ( auto ) {
		window.clearInterval(auto);
		bildnr--;
		}

	if ( bildnr <= 0 ) {
		bildnr = maxbildnr
		}
	else if ( auto ) {
		bildnr--;
		}
	else {
		bildnr--;
		}

	pic2frame(bildliste[bildnr]);

	if ( auto ) {
		auto = 0;
		autoon();
		pic--;
		}
	else { 
		bildanzeige()
		bildnr--;
		}
	}

function filmhelp_on() {
	document.getElementById("autogalhelp").style.visibility = "visible";
}

function filmhelp_off() {
	document.getElementById("autogalhelp").style.visibility = "hidden";
}


