

function Deblur(mylink)
{ if (document.all)
  mylink.blur();
}

function bookmark(url, description)
{
//***---This text will be shown to the visitor if it has Netscape.
netscape="Klicken Sie auf OK und fügen Sie mit CTRL+D diese Seite Ihren Favoriten hinzu."

if (navigator.appName=='Microsoft Internet Explorer')
{
window.external.AddFavorite(url, description);
}
else if (navigator.appName=='Netscape')
{
alert(netscape);
}
}




/* PNG im IE */

function fixPNG(myImage) // correctly handle PNG transparency in Win IE 5.5 or higher.
   {
    if (window.ie55up)
	 {
	 var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
	 var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
	 var imgTitle = (myImage.title) ? "title='" + myImage.title + "' " : "title='" + myImage.alt + "' "
	 var imgStyle = "display:inline-block;" + myImage.style.cssText
	 var strNewHTML = "<span " + imgID + imgClass + imgTitle
	 strNewHTML += " style=\"" + "width:" + myImage.width + "px; height:" + myImage.height + "px;" + imgStyle + ";"
	 strNewHTML += "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
	 strNewHTML += "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
	 myImage.outerHTML = strNewHTML
	 }
   }






/* abgelaufene VeranstaltungsTermine ausblenden */


// <![CDATA[
function aktualisieren() {
  if (!document.getElementsByTagName) return;
  var Datum = new Date();
  var Jahr = Datum.getFullYear().toString();
  var Monat = (Datum.getMonth()+1).toString();
    if (Monat.length == 1) Monat = "0" + Monat;
  var Tag = Datum.getDate().toString();
    if (Tag.length == 1) Tag = "0" + Tag;
  var aktuell = parseInt(Jahr + Monat + Tag);
  var Zeilen = document.getElementsByTagName("tr");
  var Obergrenze = 0; var Rest = Obergrenze;
  for (var i = 0; i < Zeilen.length; i++) {
    if (Zeilen[i].title) {
      if (parseInt(Zeilen[i].title) < aktuell) Zeilen[i].style.display = "none";
      else if(Obergrenze) {
        if(Rest) Rest--; else Zeilen[i].style.display = "none";
      }
    }
  }
}
// ]]>



/* B I L D W E C H S E L */



// JavaScript Document
var ga = null; // ga muss wegen Interval global sein! Daher kann auch immer nur eine instanz der Klasse erzeugt werden.
function gallery (images) {
	ga = this;
	this.images = images;

	this.actindex = -1;
	this.shifttime = 4000;

	this.loadstat = document.getElementById('loadstatus');

	this.image = document.getElementById('image');
	this.to = null;

	this.shiftimage = function () {
		if ( ga.actindex == ga.images.length -1) {
			ga.actindex = 0;
			}
		else {
			++ga.actindex;
			}
		ga.image.src = ga.images[ga.actindex];
		ga.to = window.setTimeout("ga.shiftimage()",ga.shifttime);
		}

	this.preload = function () {
		var txt;
		for ( i = 0; i < ga.images.length; i++ ) {
			var tmp = document.createElement('img');
			tmp.src = ga.images[i];
			}
		ga.shiftimage();
		}

	if ( this.image && this.images.length > 0 ) {
		void this.preload();
		}
	}

function initGallery(arname) {
	if ( ga == null ) {
		ga = new gallery(arname);
		}
	else {
		ga.images = arname;
		ga.actindex = -1;
		ga.shiftimage;
		}
	//ga.shiftimage();
	}

