var getElements = new Array; 	
function ini(){
	for(i=0;i<(document.images.length);i++){getElements[i]=document.images[i].src;}
}
function ChangeImage(which,image,e){		
	if(which!=status){
		if(e.type=='mouseover' || e.type=='mouseout'){document.images[which].src= image;}
		if(e.type=='click'){
		for (i=0;i<(document.images.length);i++){
			document.images[i].src=getElements[i];}		
			document.images[which].src=image;
			status=which;
		}	
	}
}


function BilderWechsel(bild_id, bild_pfad, bild_text)
{
	
	if(document.getElementById(bild_id))
	{
			
		document.getElementById(bild_id).src = bild_pfad;
	}
		if(document.getElementById("legende"))
	{
		document.getElementById("legende").innerHTML = bild_text;
	}
}

function BilderVorladen()
{
	document.Vorladen = new Array();
	if(document.images)
	{
		 for(var i=0; i<BilderVorladen.arguments.length; i++)
		{
			
			document.Vorladen[i] = new Image();
			document.Vorladen[i].src = BilderVorladen.arguments[i];
					}
	}
}

window.undefined = window.undefined; // für ältere Javascript Versionen, die undefined nicht als Wert kannten, wie zB im IE 5.01 *.

function init()
{
   var a=document.getElementsByTagName('a');

   for (var i=0;i<a.length;i++) {
      a[i].onmousedown = function()
      {
         this.onfocus = function()
         {
            this.blur();
         }
      }
      a[i].onmouseup = function()
      {
         this.onfocus = function(){}
      }
      a[i].onmouseout = a[i].onmouseup;
   }
}

if ( (window.onload === undefined) || (window.onload === null) ) {
   window.onload = window.init;
}
else {
   window.myLoad = window.onload;
   window.onload = function()
   {
      window.myLoad();
      window.init();
   }
}


