var timeOut;

function startshowslide(){
timeOut = setTimeout("showSlide()",1 );
}
function stop(){
clearTimeout(timeOut);
}
var hide=0;
function switchShow(){
if (hide == 0){
showSlide();
}else if(hide==1){
hideSlide();
}
}
function showSlide() {
document.getElementById("content").style.width='595px';
var lB = document.getElementById("linkbox");
var lP = parseInt(lB.style.top);
var lh = parseInt(lB.style.height);
   if (lP > 135){
      lB.style.height = (lh + 2) + "px";
      lB.style.top = (lP - 2) + "px";
      startshowslide();
      }
      if(lP <= 135){
      stop();
      hide=1;
      }
}
function hideSlide() {
var lB = document.getElementById("linkbox");
var lP = parseInt(lB.style.top);
var lh = parseInt(lB.style.height);
var toph;
var toth = document.body.clientHeight;
var toph = Math.round(toth * (80/100));     
      if (lP < toph) {
      lB.style.height = (lh - 2) + "px";
      lB.style.top = (lP + 2) + "px";
      setTimeout("hideSlide()", 1);
      }
      if(lh<=1){
      lB.style.height=0;
      document.getElementById("content").style.width='865px';
      stop();
      hide=0;
      }
}
function get_topHeight(){
var toph;
var toth = document.body.clientHeight;
var toph = Math.round(toth * (80/100));
//alert(toph);
document.write('<div id="linkbox" style="height:0px;top:'+toph+'">');
}
function onResze(){
var lb = document.getElementById("linkbox");
var lh = parseInt(lb.style.height);
var lP = parseInt(lb.style.top);
var toth = document.body.clientHeight;
var toph = Math.round(toth * (80/100));
if(lh > 0){
lb.style.height = toph - 135;
}
if(lh<=1){
lb.style.top = toph;
lb.style.height = 0;
}
}
