var delayb4scroll=500; //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeed=1; //Specify marquee scroll speed (larger is faster 1-10)
var pauseit=1; //Pause marquee onMousever (0=no. 1=yes)?

var copyspeednews=marqueespeed;
var pausespeednews=(pauseit==0)? copyspeednews: 0 ;

var copyspeedeventi=marqueespeed;
var pausespeedeventi=(pauseit==0)? copyspeedeventi: 0 ;

var actualheight_news='';
var actualheight_eventi='';

function scrollmarquee_news(){
  //if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8)){
  if (parseInt(cross_marquee_news.style.top)>(actualheight_news*(-1)+20)){
    cross_marquee_news.style.top=parseInt(cross_marquee_news.style.top)-copyspeednews+"px";    
  }else{
    //cross_marquee.style.top=parseInt(marqueeheight)+8+"px";
    cross_marquee_news.style.top=parseInt(marqueeheight_news)-10+"px";    
  }
}

function scrollmarquee_eventi(){
  //if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8)){
  if (parseInt(cross_marquee_eventi.style.top)>(actualheight_eventi*(-1)+20)){
    cross_marquee_eventi.style.top=parseInt(cross_marquee_eventi.style.top)-copyspeedeventi+"px";    
  }else{
    //cross_marquee.style.top=parseInt(marqueeheight)+8+"px";
    cross_marquee_eventi.style.top=parseInt(marqueeheight_eventi)-10+"px";    
  }
}

function initializemarquee(){
  initializemarquee_eventi();
  initializemarquee_news();
}
function initializemarquee_eventi(){
  cross_marquee_eventi=document.getElementById("vmeventi");
  cross_marquee_eventi.style.top=0;  
  marqueeheight_eventi=document.getElementById("eventitickercool").offsetHeight;  
  actualheight_eventi=cross_marquee_eventi.offsetHeight;  
  if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
    cross_marquee_eventi.style.height=marqueeheight_eventi+"px";
    cross_marquee_eventi.style.overflow="scroll";
    return
  }
  setTimeout('lefttime=setInterval("scrollmarquee_eventi()",50)', delayb4scroll); //30
}

function initializemarquee_news(){
  cross_marquee_news=document.getElementById("vmnews");
  cross_marquee_news.style.top=0;  
  marqueeheight_news=document.getElementById("newstickercool").offsetHeight;  
  actualheight_news=cross_marquee_news.offsetHeight;  
  if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
    cross_marquee_news.style.height=marqueeheight_news+"px";
    cross_marquee_news.style.overflow="scroll";
    return
  }
  setTimeout('lefttime=setInterval("scrollmarquee_news()",50)', delayb4scroll); //30
}

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


