
var menu;
var theTop = 160; // hoehe layer von oben	 
var old = theTop;
var distBott =20; //abstand vom unteren browserfensterrand



function init()
	{
	var correctwidth=800 //browserfenstergroesse
	var correctheight=600
	menu = new getObj('scrollmenu');
	menu.style.left = 780;  // position layer von links
	if ((screen.width>correctwidth) && (screen.height>correctheight))
		{ menu.style.visibility = 'visible'; }
	else { menu.style.visibility = 'hidden'; return; }
	movemenu();
	}

function movemenu()
	{
	if (window.innerHeight)
		{ pos = window.pageYOffset-20 }
	else if (document.documentElement && document.documentElement.scrollTop)
		{ pos = document.documentElement.scrollTop-distBott }
	else if (document.body)
		{ pos = document.body.scrollTop-distBott }
	if (pos < theTop) pos = theTop;
		else pos += 100;

	if (pos == old)
		{ menu.style.top = pos; }
	old = pos;
	temp = setTimeout('movemenu()',100);
	}

function getObj(name)
	{
	if (document.getElementById)
		{
		this.obj = document.getElementById(name);
		this.style = document.getElementById(name).style;
		}
	else if (document.all)
		{
		this.obj = document.all[name];
		this.style = document.all[name].style;
		}
	else if (document.layers)
		{
		this.obj = document.layers[name];
		this.style = document.layers[name];
		}
	}

/******************************wird nicht geblockt***********/
function PopUp(pDestination,pWinname,pBig) 
{
var vWidth=620;
var vHeight=400;
var vLeft=150;
var vTop=75;

if (screen)
  {
	 if (pBig == true)
	   {
		  vWidth = screen.width;
		  if (vWidth > 850)
		  vWidth = 620;
			vHeigth = screen.width / 2;
			if (vHeight > 490)
			  vHeigth = 490;
			}
	 else
	   {
		  vWidth = screen.width / 2;
			if (vWidth > 650)
			  vWidth = 650;
			if (vWidth < 650)
			  vWidth = 620;
			vHeigth = screen.width / 2;
			if (vHeight > 470)
			  vHeigth = 470;
			}	
	 if ((vLeft + vWidth + 10) > screen.width)
		  vLeft = screen.width - vWidth - 10;	  
	 if ((vTop + vHeight + 50) > screen.height)
			vTop = screen.height - vHeight - 50;	  
		}
	
nWindow = window.open (pDestination,pWinname,'width='+vWidth+',height='+vHeight+',resizable=yes,scrollbars=yes,toolbar=no,Left='+vLeft+',Top='+vTop+',status=no,directories=no,menubar=no,location=tabelle');
nWindow.self.focus();
}
function kf_PopUp(pDestination,pWinname,pBig) 
{
var vWidth=600;
var vHeight=382;
var vLeft=250;
var vTop=75;

if (screen)
  {
	 if (pBig == true)
	   {
		  vWidth = screen.width;
		  if (vWidth > 850)
		  vWidth = 850;
			vHeigth = screen.width / 2;
			if (vHeight > 520)
			  vHeigth = 520;
			}
	 else
	   {
		  vWidth = screen.width / 2;
			if (vWidth > 600)
			  vWidth = 600;
			if (vWidth < 600)
			  vWidth = 600;
			vHeigth = screen.width / 2;
			if (vHeight > 382)
			  vHeigth = 382;
			}	
	 if ((vLeft + vWidth + 10) > screen.width)
		  vLeft = screen.width - vWidth - 10;	  
	 if ((vTop + vHeight + 50) > screen.height)
			vTop = screen.height - vHeight - 50;	  
		}
	
nWindow = window.open (pDestination,pWinname,'width='+vWidth+',height='+vHeight+',resizable=yes,scrollbars=yes,toolbar=no,Left='+vLeft+',Top='+vTop+',status=no,directories=no,menubar=no,location=tabelle');
nWindow.self.focus();
}
/******************************wird nicht geblockt***********/
