function clip() {
// Larghezza ed altezza dei banner contenitore
	var contWidth = 125;
	var contHeight = 230;

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

 	id1.style.top = parseInt(id1.style.top)-1 + 'px';
 	id2.style.display = '';
 	if(parseFloat(id1.style.top) == -(height/2)) {
  		id1.style.top = '0px';
 	}
 	setTimeout(clip,40)
}

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent(function() {clip();dimensionamento();});

function dimensionamento() {
	if(document.all) {
		document.getElementById('slideCont').style.left = "3px";
		document.getElementById('slideCont').style.width = "124px";
	}
	var riferimento = document.getElementById('riferimento').offsetTop;
	var contenitore = document.getElementById('slideCont');
	var news = document.getElementById('news');

	riferimento = parseInt(riferimento);
	contenitore.style.height = (riferimento + 6 - contenitore.offsetTop) + "px";
//	news.style.top = (riferimento + 10 - (news.offsetHeight + news.offsetTop)) + "px";
}