//(Brosercheck)
var ie=document.all
var dom=document.getElementById
var ns4=document.layers
var ieNOTopera=document.all&&navigator.userAgent.indexOf("Opera")==-1
var calunits = document.layers ? "" : "px"

var bouncespeed=20
var bouncelimit=8 //(muss durch 8 teilbar sein)
var direction="up"

function ausrichtung(){
var topmsg_obj=(dom)?document.getElementById("banner_1") : ie? document.all.banner_1 : document.banner_1
var dsocleft=ie? document.body.scrollLeft : pageXOffset
var dsoctop=ie? document.body.scrollTop : pageYOffset
var window_width=ieNOTopera? document.body.clientWidth : window.innerWidth-20
var window_height=ieNOTopera? document.body.clientHeight : window.innerHeight
if (ie||document.getElementById){
topmsg_obj.style.left=parseInt(dsocleft)+window_width/2-topmsg_obj.offsetWidth/2
topmsg_obj.style.top=PopY(); 
}
else if (document.layers){
topmsg_obj.left=dsocleft+window_width/2-topmsg_obj.document.width/2
topmsg_obj.top=PopY(); 
}
}
function PopY(){
	var topmsg_obj=(dom)?document.getElementById("banner_1") : ie? document.all.banner_1 : document.banner_1
	var dsoctop=ie? document.body.scrollTop : pageYOffset
	var window_height=ieNOTopera? document.body.clientHeight : window.innerHeight
	if (document.layers){
		return (parseInt(dsoctop)+parseInt(window_height)-(topmsg_obj.top/2)) / 2
	}else{
		return (parseInt(dsoctop)+parseInt(window_height)-topmsg_obj.offsetHeight) / 2
	}
}
//(ab hier wird das popup erstellt)
function erstpopup(){
if (!dom&&!ie&&!ns4)
return
ausrichtung()
crossobj=(dom)?document.getElementById("banner_1").style : ie? document.all.banner_1 : document.banner_1
crossobj.visibility=(dom||ie)? "visible" : "show"

}

function banner_1(){
	var topmsg_obj=(dom)?document.getElementById("banner_1") : ie? document.all.banner_1 : document.banner_1
	if (ie||document.getElementById){
		if( parseInt(topmsg_obj.style.top) < PopY() ){
			topmsg_obj.style.top = parseInt( topmsg_obj.style.top ) + bouncespeed
		}else{
			clearInterval(dropstart)
			bouncestart=setInterval("start()",50)
		}
	}else if (document.layers){
		if( parseInt(topmsg_obj.top) < PopY() ){
			topmsg_obj.top=topmsg_obj.top + bouncespeed;
		}else{
			clearInterval(dropstart)
			bouncestart=setInterval("start()",50)
		}
	}
}

function start(){
crossobj.top=parseInt(crossobj.top)-bouncelimit+calunits
if (bouncelimit<0)
bouncelimit+=4
bouncelimit=bouncelimit*-1
if (bouncelimit==0){
clearInterval(bouncestart)
}
}
//(hier wird das popup ausgeblendet)
function hidelayer(){
if (window.bouncestart) clearInterval(bouncestart)
crossobj.visibility="hidden"
}

function body(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}


erstpopup();


