
var pos=0;
var pullingUp=0;

var stepping=7;
var delayen=0;

function init()
{

}


 function MM_openBrWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}


function pulldi(nr)
{
 var obj;
 var finished;

 var height;

 height=25;


  E_PullUpi();
  for (i=nr;i<self_menu.length;i++)
  {
	name = "down" + i;
	obj = document.getElementById(name);
	if (i==nr)
	{

	}
	else
	{

	    obj.style.top = parseInt(((i-1)*topspace) + zwspace + topspace + ((self_menu[nr].length-1) * downspace) +abstop);

	    finished=1;

	}


   for (j=1;j<=self_menu[i].length;j++)
   {
	 name = i + "down" + j;
   	 obj = document.getElementById(name);
	 if (i==nr) {
	    obj.style.top = 	 	parseInt(((i-1)*topspace)  + zwspace + (j * downspace) +abstop);
	 }
	 else
	 {
	    obj.style.top = parseInt(((i-1)*topspace) + topspace + zwspace + ((self_menu[nr].length-1) * downspace) +abstop);
	  }

    }
   }


}

function pulld(nrc,trt)
{
  if (pos==0)
  {
    if (self_menu.length>nrc)
    {
       pullingUp=1;
       E_PullUp();
       E_PullDown(nrc,10);
    }

  }

}

function gotopage(i,j)
{
  if (links[i][j]==null){
  }
  else
  {
  arrtemp=links[i][j].split (",");
//alert  (arrtemp[0]);
  parent.content.inhalt.location=arrtemp[0];
  parent.content.leiste.location=arrtemp[1];
  }


}

function E_PullDown(nr,height)
{
 var obj;
 var finished;


 if (pullingUp==0)
 {


  for (i=nr;i<self_menu.length;i++)
  {
	name = "down" + i;
	obj = document.getElementById(name);
	if (i==nr)
	{

	}
	else
	{

    	if (parseInt(obj.style.top)<((i-1)*topspace) + zwspace + topspace + ((self_menu[nr].length-1) * downspace) +abstop)

	   {
	    obj.style.top = parseInt(obj.style.top)+stepping;

	    finished=1;

       }
	  else
          {
            obj.style.top=((i-1)*topspace) + zwspace + topspace + ((self_menu[nr].length-1) * downspace) +abstop;
          }
	}


   for (j=1;j<=self_menu[i].length;j++)
   {
	 name = i + "down" + j;
   	 obj = document.getElementById(name);
	 if (i==nr) {
	 	if (parseInt(obj.style.top)<((i-1)*topspace)  + zwspace + (j * downspace) +abstop)
	   {
	    obj.style.top = parseInt(obj.style.top)+stepping;
	    finished=1;
           }
            else
            {
               obj.style.top=((i-1)*topspace)  + zwspace + (j * downspace) +abstop;
            }
	 }
	 else
	 {
    	if (parseInt(obj.style.top)<((i-1)*topspace) + topspace + zwspace + ((self_menu[nr].length-1) * downspace) +abstop)
    	{
	    obj.style.top = parseInt(obj.style.top)+stepping;
	    finished=1;
	   }
          else
            {
		obj.style.top=((i-1)*topspace) + topspace + zwspace + ((self_menu[nr].length-1) * downspace) +abstop;
             }
     }
   }
  }
}
else
{
  finished=1;
}

  if(finished > 0){

  timerID = setTimeout("E_PullDown(" + nr + ",10)",delayen);
  aktpos=i;
  }
  else
  {
    setdreieck(nr);
  }

}


function E_PullUp()
{
 var finished=0;
 pullingUp=1;



 for (i=1;i<self_menu.length;i++)
 {

	name = "down" + i;
	obj = document.getElementById(name);
	if (parseInt(obj.style.top)>((i-1)*topspace)+abstop)
	{
	    obj.style.top = parseInt(obj.style.top)-stepping;

	    finished=1;

    }
	else
	{
          obj.style.top=((i-1)*topspace)+abstop;
	}


   for (j=1;j<=self_menu[i].length;j++)
   {
	name = i + "down" + j;
	obj = document.getElementById(name);

	if (parseInt(obj.style.top)>((i-1)*topspace)+abstop)
	{
	    obj.style.top = parseInt(obj.style.top)-stepping;

	    finished=1;

    }
	else
	{
	   obj.style.top=(i-1)*topspace+abstop;
	}
   }

 }

 if(finished > 0){
  timerID = setTimeout("E_PullUp()",delayen);
  }
 else
 {

   pullingUp=0;
 }

}


function E_PullUpi()
{



 for (i=1;i<self_menu.length;i++)
 {

	name = "down" + i;
	obj = document.getElementById(name);

    obj.style.top=((i-1)*topspace)+abstop;



   for (j=1;j<=self_menu[i].length;j++)
   {
	name = i + "down" + j;
	obj = document.getElementById(name);
    obj.style.top=(i-1)*topspace+abstop;
   }

 }

}


function setdreieck(nr)
{
//var obj2;


}


function setviereck(dnr,nr)
{
//var obj2;


}