var agt = navigator.userAgent.toLowerCase () ;
var is_major = parseInt (navigator.appVersion) ;
var is_minor = parseFloat (navigator.appVersion) ;
var is_gecko = (agt.indexOf ('gecko') != -1) ;
var is_ie = ((agt.indexOf ("msie") != -1) && (agt.indexOf ("opera") == -1)) ;
var is_ie3 = (is_ie && (is_major < 4)) ;
var is_ie4 = (is_ie && (is_major == 4) && (agt.indexOf ("msie 4")!=-1) ) ;
var is_ie5up  = (is_ie && !is_ie3 && !is_ie4) ;
var is_opera = (agt.indexOf ("opera") != -1) ;

var Picture = new Array() ;

Picture[0]  = "bilder/1-1-3.jpg" ; // foto
Picture[1]  = "bilder/1-1-1.jpg" ; // tom
Picture[2]  = "bilder/1-1-2.jpg" ; // com
Picture[3]  = "bilder/2-1-2.jpg" ; // as sowinski
Picture[4]  = "bilder/2-1-1.jpg" ; // puter
Picture[5]  = "bilder/2-1-3.jpg" ; // asz sowinski
Picture[6]  = "bilder/3-1-2.jpg" ; // hell
Picture[7]  = "bilder/3-1-1.jpg" ; // normal

var x ;
var y = 1 ;
var tss ;
var check = 0 ;

var preLoad = new Array() ;

for (x = 0; x < 8 ; x++){
	preLoad[x] = new Image() ;
	preLoad[x].src = Picture[x] ;
}

function HomeSlideShow (status, sprache){
	clearTimeout (tss) ;
	check = 1 ;
	if (is_ie5up){
		if (document.all){
			document.images.PictureBox1.style.filter="blendTrans (duration=2)" ;
			document.images.PictureBox2.style.filter="blendTrans (duration=2)" ;
			document.images.PictureBox3.style.filter="blendTrans (duration=2)" ;
			document.images.PictureBox1.filters.blendTrans.Apply () ;
			document.images.PictureBox2.filters.blendTrans.Apply () ;
			document.images.PictureBox3.filters.blendTrans.Apply () ;
			if (status == 1){
				document.images.PictureBox1.src = preLoad[0].src ;
				if (sprache == 'ger'){
					document.images.PictureBox2.src = preLoad[3].src ;
				}
				else{
					document.images.PictureBox2.src = preLoad[5].src ;
				}
				document.images.PictureBox3.src = preLoad[6].src ;
				tss = setTimeout ('tomputer (0)', 1000) ;
			}
			else{
				document.images.PictureBox1.src = preLoad[1].src ;
				document.images.PictureBox2.src = preLoad[4].src ;
				document.images.PictureBox3.src = preLoad[7].src ;
				check = 0 ;
				y = 1 ;
				tss = setTimeout ('tomputer (1)', 5000) ;
			}
			document.images.PictureBox1.filters.blendTrans.Play() ;
			document.images.PictureBox2.filters.blendTrans.Play() ;
			document.images.PictureBox3.filters.blendTrans.Play() ;
		}
	}
	else if (is_gecko || is_opera){
		if (status == 1){
			document.images.PictureBox1.src = preLoad[0].src ;
			if (sprache == 'ger'){
				document.images.PictureBox2.src = preLoad[3].src ;
			}
			else{
				document.images.PictureBox2.src = preLoad[5].src ;
			}
			document.images.PictureBox3.src = preLoad[6].src ;
			tss = setTimeout ('tomputer (0)', 1000) ;
		}
		else{
			document.images.PictureBox1.src = preLoad[1].src ;
			document.images.PictureBox2.src = preLoad[4].src ;
			document.images.PictureBox3.src = preLoad[7].src ;
			tss = setTimeout ('tomputer (1)', 5000) ;
		}
	}
}

function tomputer (soll){
	if (is_ie5up && !check && soll){
		if (document.all){
			document.images.PictureBox1.style.filter="blendTrans (duration=2)" ;
			document.images.PictureBox1.filters.blendTrans.Apply () ;
			if (y == 0){
				document.images.PictureBox1.src = preLoad[1].src ;
				y = 1 ;
			}
			else{
				document.images.PictureBox1.src = preLoad[2].src ;
				y = 0 ;
			}
			document.images.PictureBox1.filters.blendTrans.Play () ;
		}
	}
	if ((is_gecko || is_opera) && (!check)){
		if (y == 0){
			document.images.PictureBox1.src = preLoad[1].src ;
			y = 1 ;
		}
		else{
			document.images.PictureBox1.src = preLoad[2].src ;
			y = 0 ;
		}
	}
	if (!check){
		tss = setTimeout ('tomputer (1)', 5000) ;
	}
	else{
		tss = setTimeout ('tomputer (0)', 1000) ;
	}
}

function tomputerstart (){
	tss = setTimeout ('tomputer (1)', 5000) ;	
}


var Bild ;

deutschland_on		= new Image () ;
deutschland_off		= new Image () ;
polen_on			= new Image () ;
polen_off			= new Image () ;

deutschland_on.src		= "bilder/deutschland_on.jpg" ;
deutschland_off.src	= "bilder/deutschland.jpg" ;	
polen_on.src		= "bilder/polen_on.jpg" ;
polen_off.src		= "bilder/polen.jpg" ;

function grafik_tauschen (a, Bild){
	window.document.images[a].src = Bild.src ;
}
/*
function click (e) {
 if (!e){
  e = window.event ;
 }
 if ((e.type && e.type == "contextmenu") || (e.button && e.button == 2) || (e.which && e.which == 3)) {
  if (window.opera)
   window.alert ("Sorry: Diese Funktion ist deaktiviert.") ;
   return false ;
  }
 }  

 if (document.layers){
  document.captureEvents (Event.MOUSEDOWN) ;
 }
 document.onmousedown = click ;
 document.oncontextmenu = click ;
}*/
