var velocita = 50;
var contWidth = larSlide;
var contHeight = altSlide;


var speedGo = 1; 	


function clip() 
{

  var id1 = document.getElementById('slideA');
  var id2 = document.getElementById('slideB');

  var height = id1.offsetHeight;

  id1.style.top = parseInt(id1.style.top)-speedGo + 'px';
  document.getElementById('slideCont').style.height = contHeight + "px";

  document.getElementById('slideCont').style.clip = 'rect(auto,'+ contWidth +'px,' + contHeight +'px,auto)';
  id2.style.display = '';
  if(parseFloat(id1.style.top) == -(height/2)) 
  {
    id1.style.top = '0px';
  }


  if (Math.ceil(height/2) > contHeight)
  {

    id2.style.visibility = "visible";
    setTimeout(clip,velocita);

  }
  else
  {

    id1.style.height = contHeight + "px";
    id2.style.display = 'none';

  }
}


if (window.addEventListener)
  window.addEventListener("load", clip, false)
else if (window.attachEvent)
  window.attachEvent("onload", clip)
else if (document.getElementById)
  window.onload=clip

