/**
  *  SLIDER JavaScript
  **/

var i;
var height;
var end;

function slideDown(divId, max){
  end = max;
  height = 0;
  i = window.setInterval("sDown('"+ divId +"')", 5);
}

function slideUp(divId, min){
  end = min;
  height = document.getElementById(divId).style.height;
  var tmp = height.indexOf("px");
  height = parseInt(height.substring(0, tmp));
  i = window.setInterval("sUp('"+ divId +"')", 5);
}

function sDown(divId){
  if(height < end){
    height += 15;
    document.getElementById(divId).style.height = height + "px";
  }else{
    height = end;
    clearInterval(i);
  }
}

function sUp(divId){
  if(height > end){
    height -= 15;
    document.getElementById(divId).style.height = height + "px";
  }else{
    height = end;
    clearInterval(i);
  }
}