function prepareSlideshow() {
// Make sure the browser understands the DOM methods
  if (!document.getElementsByTagName) return false;
  if (!document.getElementById) return false;
// Make sure the elements exist
  if (!document.getElementById("linklist")) return false;
  if (!document.getElementById("total")) return false;
// Apply styles to the preview image
  var total = document.getElementById("total");  
  total.style.position = "relative";
  total.style.left = "0";
  total.style.top = "0"; 
//tira barra de rolagem pelo javascript
	var preview = document.getElementById("preview");
	preview.style.overflow = "hidden";
// Get all the links in the list
  var list = document.getElementById("linklist");
  var links = list.getElementsByTagName("a");  
	var altura = total.offsetHeight;
	//alert (altura);
	if (altura > 368) {
    list.style.display = "block";
  }
	var alturaTotal = (altura-350)*-1; // tiro 200 para descontar a altura da div, que na verdade eh 221

// Attach the animation behavior to the mouseover event
  links[0].onmouseover = function() {
    moveElement("total",0,alturaTotal,0);
  }
  links[0].onmouseout = function() {
    var ypos = parseInt(total.style.top);
	moveElement("total",0,ypos,0);
	
  }
  links[1].onmouseover = function() {
    moveElement("total",0,0,0);
  }
  links[1].onmouseout = function() {
	  var ypos = parseInt(total.style.top);
    moveElement("total",0,ypos,0);
  }
  }
    
addLoadEvent(prepareSlideshow);