function lib_bwcheck(){

        this.ver=navigator.appVersion;

        this.agent=navigator.userAgent;

        this.dom=document.getElementById?1:0;

        this.opera5=this.agent.indexOf("Opera 5")>-1;



         this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;

        this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;

        this.ie7=(this.ver.indexOf("MSIE 7")>-1 &&  !this.opera5)?1:0;

         this.ie4=(document.all && !this.dom && !this.opera5)?1:0;

        this.ie=this.ie4||this.ie5||this.ie6||this.ie7;

        this.mac=this.agent.indexOf("Mac")>-1;

        this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;

        this.ns4=(document.layers && !this.dom)?1:0;

        this.bw=(this.ie7 || this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5);



         return this

}

var bw=new lib_bwcheck();



var welcherbrowser;

if(window.pkcs11){ welcherbrowser='Netscape';

if(document.ids){welcherbrowser='Netscape';

if(window.navigator.securityPolicy)welcherbrowser='Netscape';

}

else if(window.atob)welcherbrowser='Netscape';

else welcherbrowser='Netscape';

}





var checkImages = new Array;

var trans_top = 0;

var wechselanaus = "aus";

var faderzahl = 10;

var fader;
//document.getElementById('logostyle').style.visibility="hidden";












function fadeIn(){

if(wechselanaus=="aus") {

         document.getElementById('logostylebild').style.filter="alpha(opacity:0)";

	document.getElementById('logostylebild').style.KHTMLOpacity="0";

	document.getElementById('logostylebild').style.MozOpacity="0";

	document.getElementById('logostylebild').style.opacity="0";

         document.getElementById('logostyle').style.visibility="hidden";

         checkImages[0] = new Image();

 	checkImages[0].src = "images/hg-hoervergnuegen-logo.jpg";



         //alert(pics[welchesbild]);

         setTimeout(function(){startgleich();}, 10);

         }



}







function startgleich()

{

if(checkImages[0].complete) { aktiv = window.setTimeout("wechsel();", 50); }

else { window.setTimeout("startgleich();", 50); }

}







function wechsel()

{

//alert("aaa");

document.getElementById('logostylebild').src="images/hg-hoervergnuegen-logo.jpg";
document.getElementById('logostyle').style.visibility="visible";

fader = window.setTimeout("fadeup();", 100);



}





function fadeup(){



trans_top += faderzahl;



if(welcherbrowser!='Netscape')document.getElementById('logostylebild').style.filter="alpha(opacity:"+trans_top+")";

if(welcherbrowser!='Netscape')document.getElementById('logostylebild').style.KHTMLOpacity=trans_top/100;

if(welcherbrowser!='Netscape')document.getElementById('logostylebild').style.opacity=trans_top/100;

document.getElementById('logostylebild').style.MozOpacity=trans_top/101;





if(trans_top >= 100) {

wechselanaus = "an";

clearTimeout(fader);

}

else {

fader = window.setTimeout("fadeup()",30);

}

}





function fadedown(){





trans_top -= faderzahl;



if(welcherbrowser!='Netscape')document.getElementById('logostylebild').style.filter="alpha(opacity:"+trans_top+")";

if(welcherbrowser!='Netscape')document.getElementById('logostylebild').style.KHTMLOpacity=trans_top/100;

if(welcherbrowser!='Netscape')document.getElementById('logostylebild').style.opacity=trans_top/100;

document.getElementById('logostylebild').style.MozOpacity=trans_top/101;



if(trans_top <= 0) {

	if(fader) {clearTimeout(fader); }
         document.getElementById('logostyle').style.visibility="hidden";

         wechselanaus="aus";

         }

else {

	fader = window.setTimeout("fadedown()",10);

         }





}

