var Doc=document,LW=0,posa=0,LINKB=0,INH=0;
var n4=Doc.layers,i4=Doc.all,n6=Doc.getElementById&&!Doc.all;
var nav=navigator.userAgent;nav=nav.toLowerCase();
var msie=(nav.indexOf("opera")>0)?0:1;

var H="hidden",V="visible",P="tree/",G=".gif";

function ELE(n) {return document.getElementById(n);}

function MP(i) {
   //alert("ok");
   s=i.src;
   if (i4) if (s.search(/.png/)!=-1) i.outerHTML='<span style="font-size:1pt;'+'width:'+i.width+'px;height:'+i.height+'px;display:inline-block;'+i.style.cssText+";filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+s+"', sizingMethod='scale');"+'"><img src="clg.gif"></span>';
   };

function doresize() {

if (!LH) LH=ELE("lheight");
if (!TH) TH=ELE("theight");
if (!MH) MH=ELE("mheight");
if (!LINKS) LINKS=ELE("leftx");
//if (!LINKB) LINKB=ELE("leftb");
var x=LH.height-16;
//if (x<610) x=610;
//LINKS.style.height=x;
TH.style.height=1;
TH.style.height="100%";
MH.style.height=1;
MH.style.height="100%";
//alert(MH.height);
//LINKB.style.height=x-180;
LINKS.style.height=MH.height;
showrah();
};

var LIY=0,NIY=0;YYY=0,CCC=0;

function movelinks() {

mhx=MH.height+10;
if (!LINKS) LINKS=ELE("leftx");
LINKS.style.height=mhx;
CCC++;
if (YYY>0) {
  setTimeout("movelinks()",10);
  YYY--;
  };

if (n6) NIY=window.pageYOffset; else NIY=Doc.body.scrollTop;
var c=LIY-NIY;
if (c<0) c=-c;

if (c) {
	var XIY=LIY;
	var zz=mhx;
    var T=zz-LH.height;
    if (T<0) T=0;

	if (LIY<NIY) {
        // Runter
        if (c>T) {
        var x=1+Math.floor((c-T)/20);
        if ((LIY+LH.height)<NIY) LIY=NIY-LH.height; else LIY+=x;
        if ((LIY+mhx)>(NIY+LH.height-15)) LIY=NIY+LH.height-15-mhx;
        LINKS.style.top=LIY;
        if (XIY!=LIY) {
            YYY=10;
            };
        };
        } else {
        // Hoch
        var x=1+Math.floor(c/20);
        if (LIY>(NIY+LH.height)) LIY=NIY+LH.height; else LIY-=x;
     	if (LIY>(TH.height-zz)) LIY=TH.height-zz;
        LINKS.style.top=LIY;
        if (XIY!=LIY) {
            YYY=10;
            };
        };
    //window.status="LH:"+LH.height+" MH:"+mhx+" TH:"+TH.height+" YYY:"+YYY+" XIY:"+XIY+" LIY:"+LIY+" NIY:"+NIY+" CCC:"+CCC;
	};
};

function SCROLL() {

if (YYY==0) {YYY=10; movelinks();} else YYY+=10;
};

function checkscr() {
setTimeout("checkscr()",200);
if (n6) var n=window.pageYOffset; else var n=Doc.body.scrollTop;
if (n!=NIY) SCROLL();
};

function showrah() {

document.getElementById("rahmen2").style.top=MH.height-10;
document.getElementById("rahmen").style.visibility="visible";
document.getElementById("rahmen2").style.visibility="visible";
};

function init2() {

setTimeout('doresize()',10);
setTimeout('showrah()',20);
};

if (!i4) setTimeout("checkscr()",200);

function qclick(id,xq) {

for (var i=0;i<qu.length;i++) document.getElementById("qb"+qu[i]).style.color=(id==qu[i])?"red":"";
document.getElementById("qw"+id).href="#quid"+xq;
};

function toclip(n) {window.clipboardData.setData("Text",n);};

function gbover(t) {
t.style.backgroundColor="#F05C20";
t.style.color="#FFF200";
};

function gbout(t) {
t.style.backgroundColor="#FFF200";
t.style.color="#CC442B";
};


