//#########################################
// © 2003-2004 Ralf H. Schübel / www.ad1.de
// jegliche Änderung am Quellcode dieses Dokumentes
// und seiner Bestandteile nur mit ausdrücklicher,
// schriftlicher Genehmigung.
//#########################################

if(top.frames.length > 0) top.location.href=self.location;

// ################################### //
USA=navigator.userAgent.toUpperCase();
ie4 = ((USA.indexOf("MSIE 4") > 0) || (USA.indexOf("MSIE 5") > 0) || (USA.indexOf("MSIE 6") > 0) || (USA.indexOf("MSIE 7") > 0) && (USA.indexOf("Opera") < 0)) ? 1 : 0
n4 = ((USA.indexOf("MOZILLA/4") >= 0) && (navigator.appName=="Netscape")) ? 1 : 0
n6 = (USA.indexOf("GECKO") > 0) ? 1 : 0
op = (navigator.userAgent.indexOf("OPERA") > 0) ? 1 : 0
// ################################### //
if(!window.wwi && window.innerWidth) {
 window.onresize = reget;
	wwi = wiwi();
	whi = wihi()
}
// ################################### //
function prep(pObj,pSrc){
	if(document.images){
		eval(pObj+' = new Image()')
		eval(pObj+'.src = "'+pSrc+'"')
	}
}

prep('RB0','../p/bl.gif')
prep('RB1','../p/redani.gif')
prep('RB2','../p/rb-4.gif')

// ################################### //

jetzt = new Date();
TagInWoche = jetzt.getDay();
var Wochentag = new Array("Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag");
Tag = jetzt.getDate();
then = new Date(2002,8,11,21,0,0);
X = then.getTime();
bisX = X - jetzt.getTime();

// ################################### //

gdly = 444 
sph = "<img src=\"../p/bl.gif\" width=\"1\" height=\"5\" alt=\"\">"
scah = screen.availHeight
scaw = screen.availWidth
go = "no"
Xo = 0
Yo = 0
wid = 624
hioffs = 20
wwi = 0
whi = 0
dboh = 0
agit = "x"

function wop(dok, we, ho, winame){
	li = (scaw-we)/4
	ob = (scah-ho)/4
	eval("window.open\(\""+dok+"\",\""+winame+"\",\"scrollbars=no,status=no,width="+we+",height="+ho+",left="+li+",top="+ob+"\"\)");
}

// ################################### //



// ################################### //
function wiwi() {
	if (window.innerWidth) return window.innerWidth;
	else if (document.body && document.body.offsetWidth) return document.body.offsetWidth;
	else return 0;
}

function wihi() {
	if (window.innerHeight) return window.innerWidth;
	else if (document.body && document.body.offsetHeight) return document.body.offsetHeight;
	else return 0;
}

function reget(){
	if (wwi !=wiwi() || whi != wihi())
	window.history.go(0);
}

// ###################################### //
function getMouseXY(e) {

	if (ie4) {
		x = event.clientX + document.body.scrollLeft
		y = event.clientY + document.body.scrollTop
		} else {
		x = e.pageX
		y = e.pageY
	}
	if (x < 0){x= 0}
	if (y < 0){y = 0}
	return true

}

// ###################################### //

function protel(){alert("Für die Handhabung dieses Artikels sind\ntechnische Vorkenntnisse erforderlich.\n\nWir bieten hierzu laufend entsprechende\nSeminare an.")}

// ###################################### //

items = new Array()

items[1] = new Array("SOUND", 48)
items[2] = new Array("LICHT", 42)
items[3] = new Array("AV", 18)
items[4] = new Array("REFERENZEN", 86)
items[5] = new Array("Ü-WAGEN", 66)
items[6] = new Array("REPARATUREN", 98)
items[7] = new Array("SEMINARE", 75)

itoffs = 20

L1 = 176
L2 = L1+items[1][1]+itoffs
L3 = L2+items[2][1]+itoffs
L4 = L3+items[3][1]+itoffs
L5 = L4+items[4][1]+itoffs
L6 = L5+items[5][1]+itoffs
L7 = L6+items[6][1]+itoffs
L8 = L7+items[7][1]+itoffs

subs = new Array(0,"Veranstaltungsservice","Vermietung","Verkauf","Festinstallationen","Sonderanfertigungen")

offsub = 16

S1 = 3
S2 = S1+offsub
S3 = S2+offsub
S4 = S3+offsub
S5 = S4+offsub

// alert(L7-itoffs/2)

lb1 = L2-Math.floor(offsub/2)
lb2 = L3-Math.floor(offsub/2)
lb3 = L4-Math.floor(offsub/2)
lb4 = L5-Math.floor(offsub/2)
lb5 = L6-Math.floor(offsub/2)
lb6 = L7-Math.floor(offsub/2)
lb7 = L8-Math.floor(offsub/2)


lbnd = new Array(L1,L1,lb1,lb2,lb3,lb4,lb5,lb6)
rbnd = new Array(336,lb1,lb2,lb3,lb4,lb5,lb6,lb7)
obnd = new Array(18,18,67,83,99,115) // die zweite 18 könnte auch 51 sein...
ubnd = new Array(138,67,83,99,115,131)
txtoffs = 288
// ###################################### //

var dbowmin = rbnd[rbnd.length-1]+44

function init() {
	document.onmousemove = mover;
	if (n4 || n6) document.captureEvents(Event.MOUSEMOVE)
	agit = pnr
}

// ###################################### //

lnka = ""
lnkb = 0

function mover(e){
/*

*/
}
// ###################################### //

function clk(){
if(agit!="x"){
	if((go==1)&(agit!=pnr)){
		//alert("Link zu \"c"+agit+".php\"")

			if((agit==24)||(agit==34)) agit = 14
			if((agit==25)||(agit==35)) agit = 15

		this.location.href = "c"+agit+".php"
	}
//	if(agit==pnr) alert("Diese Seite sehen Sie gerade...")
}
}
// ###################################### //


// ###################################### //

function swon(){
	
	if(ie4){
		document.all.bgb.style.visibility = "visible"
	}
	
	if(n6){
		document.getElementById("bgb").style.visibility = "visible"
	}
	
	if(n4){
		document.bgb.visibility = "show"
	}
	
}

// ###################################### //

function swoff(){
	
	if(ie4){
		document.all.bgb.style.visibility = "hidden"
	}
	
	if(n6){
		document.getElementById("bgb").style.visibility = "hidden"
	}
	
	if(n4){
		document.bgb.visibility = "hide"
	}
	
}

// ###################################### //

keeper = 0
lid = 0


function hi(){
	if(n4){
		document.redbars.document.images["B"+lid].src = RB2.src
	}
	if(ie4){
		document.all.redhili.style.visibility = "visible"
	}
	
	keeper = lid
}

// ###################################### //

function lo(){
	if(keeper!=0){
		if(n4){
			document.redbars.document.images["B"+keeper].src = RB1.src
		}
		if(ie4){
			//	document.all.redhili.style.visibility = "hidden"
		}
		
	}
}

// ###################################### //

sckeep = 0

function scsc(){



	if(ie4){
			scY = document.body.scrollTop
			lev = 	parseInt(document.all.redII.style.top)+10
			loffs = scY-lev
			histp = Math.floor((loffs)/4)
			if(dboh>312){	document.all.redII.style.top = (scY>166) ?  lev+histp : 165 }
			document.all.ttp.style.visibility = (scY>166) ? "visible" : "hidden"
	}

	if(n6){
			scY = document.body.scrollTop
			lev = 	parseInt(document.getElementById("redII").style.top)+10
			loffs = scY-lev
			histp = Math.floor((loffs)/4)
			if(dboh>312){	document.getElementById("redII").style.top = (scY>166) ?  lev+histp : 165 }
			document.getElementById("ttp").style.visibility = (scY>166) ? "visible" : "hidden"
	}

	if(n4){
			scY = pageYOffset
			lev = 	parseInt(document.redII.top)+10
			loffs = scY-lev
			histp = Math.floor((loffs)/4)
			if(dboh>312){	document.redII.top = (scY>166) ?  lev+histp : 165 }
			document.redII.document.kodat.document.ttp.visibility = (scY>166) ? "show" : "hide"
	}

	sckeep = scY

}

// ###################################### //

var sag = "";

function ie4click(){
		if (ie4)	{
		void(sag);
		return false;
		}
}

function nclick(e){
		if(n4||n6)	{
			if (e.which==2||e.which==3){
				void(sag);
				return false;
			}
		}
}

if (n4) {
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown=nclick;
} else {
	document.onmouseup=nclick;
	document.oncontextmenu=ie4click;
}
document.oncontextmenu=new Function("return false")

// ###################################### //

// ######################################

tic = 0
cit = 1
bli = 255
ilb = 0
ro = 0
go = 0
bo = 0
rx = 255 // 222
gx = 255 // 222
bx = 255 // 222
barlimit = 582

function ticker(){
if(!n4){ // das muss jetzt nicht mehr sein (2005/06)

cit = 1

news = "<SPAN STYLE=\"font-family:verdana, arial, sans serif; font-size:12px; font-weight:bold; color:#000000;\"><NOBR>"
news+= Nnews[tic][0]
news+= (Nnews[tic][1]!="") ? "<A HREF=\""+Nnews[tic][1]+"\"" : ""
news+= (Nnews[tic][1].indexOf("http")>-1) ? " TARGET=\"_blank\"" : "" // <
news+= (Nnews[tic][1].indexOf("pdf")>-1) ? " TARGET=\"_blank\"" : "" // <
news+= (Nnews[tic][1]!="") ? ">" : ""
news+= (Nnews[tic][1]!="") ? "<SPAN STYLE=\"font-size:12px;font-weight:bold;color:#CB0525;text-decoration:none;\">"+Nnews[tic][2]+"</SPAN></A>" : ""
news+= Nnews[tic][3]
news+= "</NOBR></SPAN>"

if (n4){
document.ticker.document.open()
document.ticker.document.write(news)
//document.ticker.document.write("<SPAN STYLE=\"font-family:verdana, arial, sans serif; font-size:12px; font-weight:normal; color:#000000;\">"+news+"</span>")
document.ticker.document.close()
}
if(ie4) document.all.ticker.innerHTML=news

if(n6){
		ticdom = document.getElementById("ticker");
		ticdom.className = "HL2"
		var chno = ticdom.firstChild.nodeValue.length;
		if(chno!=0) ticdom.firstChild.deleteData(0,chno);
		for(ni=0;ni<=2;ni++) 	if(ticdom.hasChildNodes()) ticdom.removeChild(ticdom.firstChild);
		newsin = document.createTextNode(Nnews[tic][0])
		ticdom.appendChild(newsin);
		if(Nnews[tic][1]!=""){
			newslink = document.createElement("a")
			newslinktxt = document.createTextNode(Nnews[tic][2])
			newslink.className = "p1b"
			newslink.appendChild(newslinktxt)
			newslink.href = Nnews[tic][1];
			if(Nnews[tic][1].indexOf("http")>-1){
				newslink.target = "_blank"
			}
			if(Nnews[tic][1].indexOf("pdf")>-1){
				newslink.target = "_blank"
			}
			ticdom.appendChild(newslink)
		}
		newsout = document.createTextNode(Nnews[tic][3])
		ticdom.appendChild(newsout);
}

if (tic<Nnews.length-1)
tic++
else
tic=0
blinker()
}
}


function blinker(){
if(ie4) document.all.tickerbg.style.backgroundColor = 'rgb('+bli+','+bli+','+bli+')'
if(n6) document.getElementById("tickerbg").style.backgroundColor = 'rgb('+bli+','+bli+','+bli+')'
if(n4) document.tickerbg.bgColor = ((bli*65536)+(bli*256)+bli)

bli = bli+255
if(bli>256) bli = 0

ilb++

if(ilb<8) window.setTimeout("blinker()",4)
else {
	ilb=0;
	bli=0;
	colors(10);
	}
}



function colors(stps){

spts = stps

rr = (Math.floor(ro+((rx-ro)/stps)*cit))
gg = (Math.floor(go+((gx-go)/stps)*cit))
bb = (Math.floor(bo+((bx-bo)/stps)*cit))

// if(cit==stps)alert(rr+" "+gg+" "+bb)

if(ie4) document.all.tickerbg.style.backgroundColor = 'rgb('+rr+','+gg+','+bb+')'
if(n6) document.getElementById("tickerbg").style.backgroundColor = 'rgb('+rr+','+gg+','+bb+')'
if(n4) document.tickerbg.bgColor = ((rr*65536)+(gg*256)+bb)
// document.tickerbg.bgColor = "" + (rr*256*256)+(gg*256)+bb
if(cit<stps){
	window.setTimeout('colors(spts)',22);
	cit++}
else{
tbstp = -12;
	barg = window.setInterval("bargrow()",33)
	}
}

tbstp = 1
var barg

function bargrow(){

	if(ie4)	 document.all.tickerbar.style.visibility = "visible";
	if(n4) document.tickerbar.visibility = "show"
	if(n6)	document.getElementById("tickerbar").style.visibility = "visible";
	tbstp = tbstp + 22

	if(ie4)	 document.all.tickerbar.style.clip = "rect(0px "+tbstp+"px 4px 0px)";
	if(n4)  document.tickerbar.clip.right = tbstp
	if(n6)	 document.getElementById("tickerbar").style.clip = "rect(0px "+tbstp+"px 4px 0px)";



	if(tbstp>barlimit){
		 window.clearInterval(barg)

		if(ie4)	 document.all.tickerbar.style.visibility = "hidden";
		if(n4) document.tickerbar.visibility = "hide"
		if(n6)	document.getElementById("tickerbar").style.visibility = "hidden";


			window.setTimeout("ticker()",1)
		}

}

// ###################################### //
