var upwards = false;
var heightPx= 0;

function moveTo(menue_obj, x, y) {
  if (document.getElementById) {
    document.getElementById('menuDiv').style.left = x;
    document.getElementById('menuDiv').style.top = y;
  }
}

function init(heightPx_){
  heightPx = heightPx_;
  if(document.getElementById){
    menue_obj = document.getElementById("menuDiv");
    menue_obj.style.top = -heightPx+"px";
  }
}

function slideDown(){
  if (document.getElementById){
    if (parseInt(menue_obj.style.top) < 0){
      menue_obj.style.top = parseInt(menue_obj.style.top) + 10 + "px";
      setTimeout("slideDown()",5);
    }
  }
}

function slideUp(){
  if (document.getElementById){
    if (parseInt(menue_obj.style.top) > -heightPx){
      menue_obj.style.top = parseInt(menue_obj.style.top) - 10 + "px";
      setTimeout("slideUp()",10);
    }
  }
}

function slide() {
  if (upwards) {
    upwards = false;
    slideUp();
  }
  else {
    upwards = true;
    slideDown();
  }
}