set = "";
clear = "";
displayed = "";

NS = (navigator.appName == "Netscape");
IE = (document.all) ? 1: 0;

function move_in(id,countRows){
  rows = countRows;
  hgt = (rows*27)+0;
  head = 'head_'+id;
  if(IE){
    if(document.all[id].style.pixelHeight < hgt)
    document.all[id].style.pixelHeight +=10;
    if(document.all[id].style.pixelHeight >= hgt){document.all[id].style.overflow="visible"; clearInterval(set);}
  }
  if(NS){
    i = parseInt(document.getElementById(id).style.height);
    if(i < hgt){
      document.getElementById(id).style.height = i+10;
    }
    if(i >= hgt) clearInterval(set);
  }
  displayed = id;
  }

function move_out(id,countRows){
  rows = countRows;
  hgt = (rows*27)+0;
  head = 'head_'+id;
  if(IE){
    document.all[head].className = "";
    if(document.all[id].style.pixelHeight > 1){
    document.all[id].style.overflow="hidden";
    document.getElementById(id).style.pixelHeight -= 10;}
    if(document.getElementById(id).style.pixelHeight <= 1) {
      document.all[id].style.pixelHeight = 1; clearInterval(clear); document.all[id].style.visibility = "hidden"; document.all[id].style.position = "absolute";
      rueck = 'ja';
      return rueck;
    }
  }
  if(NS){
    document.getElementById(head).className = "";
    j = parseInt(document.getElementById(id).style.height);
    if(j> 1){
      document.getElementById(id).style.height = j-10;
    }
    if(j <= 1){
      document.getElementById(id).style.Height = 1; clearInterval(clear); document.getElementById(id).style.visibility ="hidden"; document.getElementById(id).style.position = "absolute";
      rueck = 'ja';
      return rueck;
    }
  }
}

function move(id,countRows){
  if(set) {clearInterval(set);}
  if(clear) {clearInterval(clear);}
  rows = countRows;
  idd = id;
  rueck = false;
  if(IE) objct = document.all[displayed];
  if(NS) objct = document.getElementById(displayed);

  if(objct && objct.style.visibility == "visible"){
    clear = setInterval("move_out(displayed,rows)",1);
    weiter = setInterval("check(idd)",1);
  }else{
    display(idd,rows);
  }
}

function check(id){
  idd = id;
  if(rueck == 'ja'){
    clearInterval(weiter);
    if(displayed != idd){
      display(idd,rows)
    }
  }
}

function display (id,countRows){
  if(set) {clearInterval(set);}
  if(clear) {clearInterval(clear);}
  if(IE) objct = document.all[id];
  if(NS) objct = document.getElementById(id);
  rows = countRows;

  if(objct.style.visibility == "hidden"){
    head = 'head_'+id;
    objct.style.position = "relative";
    objct.style.top = 0;
    objct.style.visibility = "visible";
    objct.style.pixelHeight = 1;
    if(IE) document.all[head].className = "headline";
    if(NS) document.getElementById(head).className = "headline";
    string = id;
    set = setInterval("move_in(string,rows)",1);
  }else{
    string = id;
    clear = setInterval("move_out(string,rows)",1);
  }
}
function abreise(){
    switch  (document.forms[0].mmc.selectedIndex){
        case 0:
            duration = 7;
            break;
        case 1:
            duration = 4;
            break;
        case 2:
            duration = 8;
            break;
        case 3:
            duration = 7;
            break;
        case 4:
            duration = 15;
            break;
        case 5:
            duration = 14;
            break;
        case 6:
            duration = 22;
            break;
        case 7:
            duration = 28;
            break;
    }
    if((document.forms[0].vnd.selectedIndex + duration) <= document.forms[0].bsd.options.length){
        document.forms[0].bsd.selectedIndex = document.forms[0].vnd.selectedIndex +duration;
    }
    else{
        document.forms[0].bsd.selectedIndex = document.forms[0].bsd.options.length-1;
    }
}