//(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 PopY(){
	var topmsg_obj=(dom)?document.getElementById("dropin") : ie? document.all.dropin : document.dropin
	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
crossobj=(dom)?document.getElementById("dropin").style : ie? document.all.dropin : document.dropin
crossobj.visibility=(dom||ie)? "visible" : "show"

}

function dropin(){
	var topmsg_obj=(dom)?document.getElementById("dropin") : ie? document.all.dropin : document.dropin
	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();

// JavaScript Document
