function opacity(id, opacStart, opacEnd, millisec) {
    //speed for each frame
    var speed = Math.round(millisec / 100);
    var timer = 0;

    //determine the direction for the blending, if start and end are the same nothing happens
    if(opacStart > opacEnd) {
        for(i = opacStart; i >= opacEnd; i--) {
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
    } else if(opacStart < opacEnd) {
        for(i = opacStart; i <= opacEnd; i++)
            {
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
    }
};

//change the opacity for different browsers
function changeOpac(opacity, id) {
    var object = document.getElementById(id).style;
    object.opacity = (opacity / 100);
    object.MozOpacity = (opacity / 100);
    object.KhtmlOpacity = (opacity / 100);
    object.filter = "alpha(opacity=" + opacity + ")";
};

// div ausblenden
function chgZindex(){
	document.getElementById("white").style.width = "1px";
	document.getElementById("white").style.height = "1px";
};

function chgZindexM(){
	document.getElementById("whiteM").style.width = "1px";
	document.getElementById("whiteM").style.height = "1px";
};

function chgZindexI(){
	document.getElementById("whiteI").style.width = "1px";
	document.getElementById("whiteI").style.height = "1px";
};

// moving credits

var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
function JSFX_FloatDiv(id, sx, sy)
{
	var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
	var px = document.layers ? "" : "px";
	window[id + "_obj"] = el;
	if(d.layers)el.style=el;
	el.cx = el.sx = sx;el.cy = el.sy = sy;
	el.sP=function(x,y){this.style.left=x+px;this.style.top=y+px;};

	el.floatIt=function()
	{
		var pX, pY;
		pX = (this.sx >= 0) ? 0 : ns ? innerWidth : 
		document.documentElement && document.documentElement.clientWidth ? 
		document.documentElement.clientWidth : document.body.clientWidth;
		pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? 
		document.documentElement.scrollTop : document.body.scrollTop;
		if(this.sy<0) 
		pY += ns ? innerHeight : document.documentElement && document.documentElement.clientHeight ? 
		document.documentElement.clientHeight : document.body.clientHeight;
		this.cx += (pX + this.sx - this.cx)/1;this.cy += (pY + this.sy - this.cy)/1;
		this.sP(this.cx, this.cy);
		setTimeout(this.id + "_obj.floatIt()", 10);
	}
	return el;
};

// navi

var blogZustand = "zu";
var mediaZustand = "zu";
function changeBlogZustand (text){
	blogZustand = text;
}
function changeMediaZustand (text){
	mediaZustand = text;
}
function timerBlog(){
	window.setTimeout("checkBlogTime()",3500);
}
function timerMedia(){
	window.setTimeout("checkMediaTime()",3500);
}
function blogFadeIn(){
	Effect.Appear('subnav_blog', { duration: 0.4 });
	changeBlogZustand('offen');
	timerBlog();
}
function blogFadeOut(){
	Effect.Fade('subnav_blog', { duration: 0.1 });
	changeBlogZustand('zu');
}
function blogFadeOut2(){
	Effect.Fade('subnav_blog', { duration: 0.5 });
	changeBlogZustand('zu');
}
function mediaFadeIn(){
	Effect.Appear('subnav_media', { duration: 0.4 });
	changeMediaZustand('offen');
	timerMedia();
}
function mediaFadeOut(){
	Effect.Fade('subnav_media', { duration: 0.1 });
	changeMediaZustand('zu');
}
function mediaFadeOut2(){
	Effect.Fade('subnav_media', { duration: 0.5 });
	changeMediaZustand('zu');
}
function blogFade(){
	if (blogZustand == "zu"){
		blogFadeIn();
	}
}
function mediaFade(){
	if (mediaZustand == "zu"){
		mediaFadeIn();
	}
}
function checkBlog(){
	if (blogZustand == "offen"){
		blogFadeOut();
	}
}
function checkMedia(){
	if (mediaZustand == "offen"){
		mediaFadeOut();
	}
}
function checkBlogTime(){
	if (blogZustand == "offen"){
		blogFadeOut2();
	}
}
function checkMediaTime(){
	if (mediaZustand == "offen"){
		mediaFadeOut2();
	}
}