// copyright © 2006..2009 Software Entwicklung Buchmann, Solingen, www.sebag.de

function ar(n1,n2,n3,n4)
	{this.length=4; this[1]=n1; this[2]=n2; this[3]=n3; this[4]=n4}

function ufld ()
	{var i=0
	this.length=4; for(i=1;i<5;i++) {this[i]=0
	}
}

var Ver4=parseInt(navigator.appVersion.charAt(0))>=4
var IE=navigator.appName.indexOf("Microsoft")!=-1

var nr=0, bild=0, such=0, vor='', s='',  imagelink=''
var bld=new ar('lo', 'ru', 'ro', 'lu')
var fld=new ufld()
var KopfBild='a'
var timo=0

function DivOut(vorspann) {
	if (Ver4) {
		vor=vorspann
		s  = '<div style="visibility:hidden">'
		s += '<div id="WechselBild" style="position:absolute; width:120; height:120; z-index:1; left:2; top:2">'
		s += '<a href="JavaScript:show();" alt="Bild vergroessern">'
		s += '<img src="trans1.gif" width="120" height="120" border="0" name="Wechsel">'
		s += '</a></div></div>'
		document.writeln(s)
		timo=setTimeout ("WechselTimer();", 3000)
	}
}

function Message() {
	DivOut ('../../')
}

function Tauchschule() {
	// timo=setTimeout ("Timer();", 3000)
}

function BlendKopf(bu) {
	KopfBild=bu
	timo=setTimeout ("KopfTimer();", 200)
}

function KopfTimer() {
	document.getElementById ("KopfBild").src="/pics/Kulisse3" + KopfBild + ".jpg"
}
	
function show() {
	win=open (imagelink, "Einzelbild", "height=620,width=820")
	win.focus()
}

function show2(name) {
	win=open (name, "Einzelbild", "height=620,width=820")
	win.focus()
}

function show_info() {
	win=open ("#", "info", "height=400,width=500")
	win.focus()
}
function Timer() {
	nr++; if (nr>4) {nr=1}
	such=1
	while (such) {
		bild=Math.floor(Math.random()*14+1)
		such=0
		for (j=1;j<5;j++) {
			if (bild==fld[j]) {such=1}
		}
	}
	fld[nr] = bild
	eval ("document.images."+bld[nr]+".src='pics/flogo/"+bild+".gif'")
	timo=setTimeout("Timer();", 3000)
}

function Rabatt() {
	win=open ("#", "rabatt", "height=130,width=310")
	win.focus()
}
	
function Wechsel2() {
	if (!IE)	{ document.WechselBild.visibility="show" }
	else		{ document.all.WechselBild.style.visibility="visible" }
	timo=setTimeout("WechselTimer();", 3000)
}

function WechselTimer() {
	such=1
	while (such) {
		bild=Math.floor(Math.random()*34+1)
		such=0
		for (j=1;j<5;j++) {
			if (bild==fld[j]) {such=1}
		}
	}
	fld[nr] = bild
	if (bild < 10) {x='0'+bild} else {x=''+bild}
	if (!IE)	{ document.WechselBild.visibility="hide" }
	else		{ document.all.WechselBild.style.visibility="hidden" }
	imagesrc=vor+'pics/bilder/'+x+'k.jpg'
	imagelink=vor+'pics/bilder/'+x+'g.jpg'
	if (!IE)	{ document.WechselBild.document.images.Wechsel.src=imagesrc }
	else		{ document.all.WechselBild.document.images.Wechsel.src=imagesrc }
	timo=setTimeout("Wechsel2();", 200)
}