//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Funktionen des Projekts (ausser Menue)
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

var undefined;


//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// PopUp-Funktion
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

var popupSettings = {};

popupSettings['default'] = '';

popupSettings['Ansprechpartner'] = 'width=566,height=400';
popupSettings['Artikel versenden'] = 'width=566,height=600';
popupSettings['Druckhinweis'] = 'width=585,height=600,scrollbars=yes';
popupSettings['Fotogalerie'] = 'width=569,height=600';
popupSettings['Kompost-Rechner'] = 'width=566,height=400';

function openPopup(url,windowName,settingsID) {

  var settings;
  var newWindow;

  if (popupSettings[settingsID]) {
    settings = popupSettings[settingsID];
  } else {
    settings = popupSettings['default'];
  }

  newWindow = window.open(url,windowName,settings);
  newWindow.focus();

}


//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Funktion zum Bildertausch
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

var zaehler = 1;

function tausche_bilder() {

	var richtung = tausche_bilder.arguments[0];
	var bildid = tausche_bilder.arguments[1];
	var pfadname = tausche_bilder.arguments[2];
	var maximum = tausche_bilder.arguments[3];
	var pfad = new String();

	if (richtung == 'vor') {

		zaehler += 1;

	} else {

		zaehler -= 1;

	}

	if (zaehler == 0) {

		zaehler = maximum;

	}

	if (zaehler > maximum) {

		zaehler = 1;

	}

	pfad = String(pfadname + zaehler + '.jpg');

	document.images[bildid].src = pfad;

}

//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// BLUR Funktion
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

function unsetFocusBorder() {
 var arr = document.getElementsByTagName('a');
 if (arr){
   for (var i=0; i<arr.length; i++) {
     arr[i].onfocus = arr[i].blur;
   }
 }
} 

