var currentPage = 'startseite'

// ------------ Bilder der Hauptseite (Mitte)
 	


function checkBrowser() {
  this.ver=navigator.appVersion
  this.dom=document.getElementById?1:0
  this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
  this.ie4=(document.all && !this.dom)?1:0;
  this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
  this.ns4=(document.layers && !this.dom)?1:0;
  
  return this
}		

function init(){
  wechsel_erlaubt=document.images;
  if (!wechsel_erlaubt) {
  	alert('Ihr Browser unterstützt keine Bildobjekte mit JavaScript.')
  }	
}

function setCurrentPage(pgName) {
   currentPage=pgName
   if (document[currentPage]) {
    document[currentPage].src = ImgPath + currentPage + "_moment" + ImgExtension
   } 
}
       
function MouseOver(ImgName) {
  if (wechsel_erlaubt && currentPage!=ImgName)  {
    document[ImgName].src = ImgPath + ImgName + "_over" + ImgExtension
  }
}

function MouseOut(ImgName) {
  if (wechsel_erlaubt && currentPage!=ImgName)  {
    document[ImgName].src = ImgPath + ImgName + "_std" + ImgExtension
  }
}
 
function hs_MouseOver(ImgName) {
  if (wechsel_erlaubt)  {
		if (this.ie5) {
      document.hs_ausgangsbild.filters.alpha.opacity=0; 
      document[ImgName].filters.alpha.opacity=0; 
		  _textIn(ImgName)
		  if (~window.timer) {
		    fadeIn(document.hs_ausgangsbild,document[ImgName])
		  } else {
        document.hs_ausgangsbild.filters.alpha.opacity=100; 
        document[ImgName].filters.alpha.opacity=100; 
		  }    
		} else {
		  _textIn(ImgName)
		}  
  }		
}

function _textIn(ImageName) {
  document.hs_ausgangsbild.src = hs_ImgPath + ImageName + "_text" + ImgExtension
  document[ImageName].src = hs_ImgPath + ImageName + "_aktiv" + ImgExtension
}    

function hs_MouseOut(ImgName) {
  if (wechsel_erlaubt)  {
    document.hs_ausgangsbild.src = hs_ausgangsbild_src
    document[ImgName].src = hs_ImgPath + ImgName + ImgExtension
		if (this.ie5) {
      document.hs_ausgangsbild.filters.alpha.opacity=100; 
      document[ImgName].filters.alpha.opacity=100; 
    }  
  }  
}

function fadeIn(obj1,obj2){ 
  if(window.timer) { 
    clearInterval(timer)
  } 
  tobj1=obj1; 
  tobj2=obj2; 
  delta = 10; 
  timer=setInterval("flowfilter(tobj1,tobj2,delta);",1)
}

function flowfilter(thing1,thing2,delta){
  if (thing1.filters.alpha.opacity+delta>=0 && thing1.filters.alpha.opacity+delta<=100) { 
    thing1.filters.alpha.opacity+=delta; 
    thing2.filters.alpha.opacity+=delta; 
  } else { 
    clearInterval(timer); 
  } 
}
