

var slideShowSpeed = 5000;
// Duration of crossfade (seconds)
var crossFadeDuration = 3;

// Specify the image files
var Pic = new Array() 

Pic[0] = 'slideshowpics/1.jpg'
Pic[1] = 'slideshowpics/2.jpg'
Pic[2] = 'slideshowpics/3.jpg'
Pic[3] = 'slideshowpics/4.jpg'
Pic[4] = 'slideshowpics/5.jpg'
Pic[5] = 'slideshowpics/6.jpg'
// =======================================
// do not edit anything below this line
// =======================================

var t
var j = 0
var p = Pic.length

var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}

function runSlideShow()
{
   if(document.images.SlideShow)
   {
   
	   if (document.all){
		  document.images.SlideShow.style.filter="blendTrans(duration=2)"
		  document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
		  document.images.SlideShow.filters.blendTrans.Apply()      
	   }
	   document.images.SlideShow.src = preLoad[j].src
	   
	   if (document.all){
		  document.images.SlideShow.filters.blendTrans.Play()
	   }
	   j = j + 1
	   if (j > (p-1)) j=0
	   t = setTimeout('runSlideShow()', slideShowSpeed)
   }
}






function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();

}
MM_reloadPage(true);



function check_email(s)
  {
  var a = false;
  var res = false;
  if(typeof(RegExp) == 'function')
    {
    var b = new RegExp('abc');
    if(b.test('abc') == true){a = true;}
    }

  if(a == true)
    {
    reg = new RegExp('^([a-zA-Z0-9\\-\\.\\_]+)'+
                     '(\\@)([a-zA-Z0-9\\-\\.]+)'+
                     '(\\.)([a-zA-Z]{2,4})$');
    res = (reg.test(s));
    }
  else
    {
    res = (s.search('@') >= 1 &&
           s.lastIndexOf('.') > s.search('@') &&
           s.lastIndexOf('.') >= s.length-5)
    }
  return(res);
  }



function popup()
{
	// Zur aktivierung; <body onload="popup()">
	window.open('weihnachten.php','Jahreswechsel','width=455,height=360,directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=no');
}


function checkForExplorer () 
{
	var uAgent = navigator.userAgent;
	
	if (uAgent.indexOf('MSIE') == -1) 
	{
		return -1;
	}


	if (uAgent.indexOf('MSIE 2') != -1)
	{
    	return 2;
    }
    
	if (uAgent.indexOf('MSIE 3') != -1) 
	{
    	return 3;
    }
    
	if (uAgent.indexOf('MSIE 4') != -1)
	{
    	return 4;
    }
    
	if (uAgent.indexOf('MSIE 5') != -1)
	{
    	return 5;
    }
	
	if (uAgent.indexOf('MSIE 6') != -1)
	{
    	return 6;
    }

    // Zulezt kannes nur noch MSIE sein
    return 1;
}

function checkForMacintosh() {
	if( navigator.appVersion.indexOf('Mac') != -1)
	{
		return 1;
	}

return 0;
}


function canDoEverything() 
{
	return 1;
	if( checkForExplorer() < 4) return 1;
	if( checkForMacintosh() == 1) return 1;
	return 0;
}





//##### Funktion zum öffnen der Hilfe Fenster ###############################################
function hilfe_fenster(breite,hoehe,site) 
{
	if(canDoEverything() ==1)
	{	
		window.open("hilfe/"+site+".html","Help2","resizable=yes,scrollbars=yes,width="+(breite+25)+",height="+hoehe);
	}
}


//##### Funktion zum öffnen der Hilfe Fenster aus den Anmeldeformularen######################
function popupfenster(breite,hoehe,site) 
{
	if(canDoEverything() ==1)
	{	
		window.open(site,"Hilfe","resizable=yes,scrollbars=yes,width="+(breite+45)+",height="+hoehe);
	}
}

//##### Funktion zum öffnen der Hilfe Fenster aus den Anmeldeformularen######################
function popupflyer(breite,hoehe,site) 
{
	if(canDoEverything() ==1)
	{	
		window.open(site,"Hilfe","resizable=no,scrollbars=no,width="+(breite+20)+",height="+(hoehe+25));
	}
}


//##### Funktion zum ein und ausblenden der Newsbeiträge
function switch_news(zeile)
{
	m = document.getElementById(zeile);
	if(m.style.visibility == 'visible')
	{
		m.style.visibility = 'hidden';
		m.style.position = 'absolute';
	}
	else
	{
		m.style.visibility = 'visible';
		m.style.position = 'relative';
	}
}



function decyptemail(first,middle,last)
{
	document.write('<a href="mailto:'+first+'@'+middle+'.'+last+'">'+first+'@'+middle+'.'+last+'</a>');	
}