var varCapacityStart;
var varCapacityEnd;

function FadeFunctionHide()
{
	window.document.getElementById('transparenz').style.display = "none";
	document.getElementById('loginbox').style.display='none';
}


function FadeFunctionInit()
{
	window.document.getElementById('transparenz').style.display = "";
	varCapacity = 1;
	varCapacityEnd = 8;
	FadeFunction();
}
function FadeFunction()
{

	var h = getHoehe();
	var objDiv = window.document.getElementById('transparenz');
	//alert(h);
	objDiv.style.height = h+"px";
	objDiv.style.opacity = varCapacity/10;
	objDiv.style.filter = 'alpha(opacity=' + varCapacity*10 + ')';
	varCapacity ++;
	if (varCapacity == varCapacityEnd+1)
	{
		return;
	}
	window.setTimeout("FadeFunction();", 1);
	document.getElementById('loginbox').style.display='';
}


function getHoehe ()
{
	
// Breite und Hoehe des Anzeigebereiches im Browserfenster ermitleln
var fensterhoehe;

if (self.innerHeight) // alle außer Explorer
{
 fensterhoehe = self.innerHeight;
}
else if (document.documentElement && document.documentElement.clientHeight)
 // Explorer 6 Strict Mode
{
 fensterhoehe = document.documentElement.clientHeight;
}
else if (document.body) // andere Explorer
{
 fensterhoehe = document.body.clientHeight;
}



// Breite und Hoehe der Seite
var seitenhoehe;

//!!! Firefox und Opera haben Probleme bei offsetHeight des Body sobald left-gefloatete Container auf Seite
/*
var test1 = document.body.scrollHeight;
var test2 = document.body.offsetHeight;
 if (test2 == 0) // alle außer Mac Explorer
 {
  seitenhoehe = document.body.scrollHeight;
 }
 else // Mac Explorer
      // Explorer 6 Strict, Mozilla und Safari
 {
  seitenhoehe = document.body.offsetHeight;
 }

*/

//Höhe des umschließenden Containers
seitenhoehe= document.getElementById('hintergrund').offsetHeight;
	
	
//Falls Seitenhöhe größer als Fensterhöhe -> fade-div = Seitenhöhe, ansonsten fade-dive auf Fensterhöhe
if(seitenhoehe > fensterhoehe) hoehe = seitenhoehe;
else hoehe = fensterhoehe;
	
//umschließender Container + Schatten oben und unten
hoehe = hoehe + 20;

return hoehe;

}




