<!-- 
Article = new Array;
i=0;
var timer;

/* DEFINE SCROLLER ELEMENTS
  Define new scroller elements here in the following format.
  Article[i] = new Array ("News Type","News Title", "URL", "frame target to load link in");i++  
  Note: If you do not want the item to be a link, change the URL value to "none".
*/
    Article[i] = new Array ("SPETTACOLI","Sabato 3 Dicembre alle ore 15 Esibizione della coppia MARIKA ZANFORLIN e FEDERICO DEGLI ESPOSTI per l'inaugurazione della nuova stagione del ghiaccio 2011-12  ... NON MANCATE!", "#", "_blank");i++
  //Article[i] = new Array ("ATTENZIONE","Stiamo lavorando per la programmazione della prossima stagione 2011-12! Ci rivediamo in AUTUNNO... NON MANCATE!", "#", "_blank");i++
//  Article[i] = new Array ("ARRIVEDERCI","La stagione 2007-2008 è purtroppo conclusa! Ci rivediamo in AUTUNNO... NON MANCATE!", "#", "_blank");i++
//  Article[i] = new Array ("ATTENZIONE","L' inaugurazione della nuova stagione sul ghiaccio 2007/08 è stata posticipata da Lunedì 26 novembre 2007 a Venerdì 30 novembre... Vi aspettiamo dunque VENERDI'!", "#", "_blank");i++
//  Article[i] = new Array ("NOVITA'","Programmazione nuovo corso di Hockey per gennaio 2008", "progs.asp?btnid=4", "_self");i++
//Article[i] = new Array ("ATTENZIONE","Le iscrizioni ai corsi sono CHIUSE", "#", "_blank");i++
//Article[i] = new Array ("MODIFICA ORARIO","Turno serale del Martedì soppresso per lasciar spazio alle Attività Sportive", "info.asp?btnid=1", "_self");i++
//Article[i] = new Array ("COMUNICAZIONE","il saggio finale previsto per il 30 marzo verrà anticipato a giovedì 27 marzo dalle 17.30 alle 19.00", "#", "_blank");i++
 
//  Article[i] = new Array ("SPETTACOLI", "La pagina degli spettacoli è ora online", "progs.asp?btnid=6", "_self");i++
//Article[i] = new Array ("PROSSIMO EVENTO","Non perdete la festa del 14 febbraio - Clicca per dettagli", "Progs.asp?btnid=6", "_self");i++
  //  Article[i] = new Array ("ISCRIZIONI CORSI","Iscrizioni ai corsi APERTE: affrettatevi, primo ciclo quasi completo", "#", "_blank");i++
//  Article[i] = new Array ("LEZIONI PRIVATE","È ora possibile prenotare le lezioni.", "info.asp?btnid=2#3", "_self");i++
 
// Article[i] = new Array ("ORARIO", "Si avverte che fino a Natale alcuni turni subiranno modifiche. Clicca per info", "info.asp?btnid=1", "_self");i++
//  Article[i] = new Array ("SPECIAL", "Natale sul ghiaccio con lo speciale spettacolo di danza", "#", "_blank");i++

////// SCROLLER CONFIGURATION /////////////////////////////////////////////////////////////////// 

orientation = "horizontal"        
scrollerWidth = "800"             
scrollerHeight = "20"             
borderWidth = 1                   
borderColour = "#000000"          
backColour = "#e9e9e9"            
NewsTypeColour = "#cc0000"        
NewsTypeWeight = "bold"
NewsTypeSize = "9"
stopScroll = 1                    
textAlignment="left"            
                                

// Scroller Links
linkFont = "Arial, Helvetica, sans-serif" 
linkWeight = "normal"             
linkColour = "#000000"            
linkSize = "9"                   
linkDecoration = "none"          

// Scroller Links On MouseOver
slinkFont = "Arial, Helvetica, sans-serif"
slinkWeight = "normal"            
slinkColour = "#0066CC"
slinkSize = "9"        
slinkDecoration = "none" 

NewsDivider = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" 
ns4Text = "Your borwser is out of date! Please, update it.";  
ns4URL = "none";         
ns4Target = "_top";      

/////////////////////////////////////////////////////////////////////////

//Browser Sniffer
var isIE = (document.getElementById && document.all)?true:false;
var isNS4 = (document.layers)?true:false;
var isNS6 = (document.getElementById && !document.all)?true:false;

style='<style type="text/css">';
style+='span{font-family:'+linkFont+'; color:'+NewsTypeColour+'; font-size:'+NewsTypeSize+'pt; font-weight:'+NewsTypeWeight+'; text-align:'+textAlignment+'}';
style+='a.rcScroller,a.rcScroller:active,a.rcScroller:visited{font-size:'+linkSize+'pt;color:'+linkColour+';text-decoration:'+linkDecoration+'; font-weight:'+linkWeight+';}';
style+='a.rcScroller:hover{font-size:'+slinkSize+'pt;color:'+slinkColour+';text-decoration:'+slinkDecoration+'; font-weight:'+slinkWeight+'}';
style+='rcScrollerHoverNS{font-size:'+slinkSize+'pt;color:red;text-decoration:'+slinkDecoration+'; font-weight:'+slinkWeight+'}';
style+='<\/style>';
document.writeln(style);

// Build the scroller and place it on the page
function buildScroller()
{
  if(isNS4){
    scroller='<table border="0" cellpadding="0" cellspacing="1" width="'+scrollerWidth+'" bgcolor="'+borderColour+'"><tr><td>'
    scroller+='<table border="0" cellpadding="3" cellspacing="1" width="100%" height="'+scrollerHeight+'" bgcolor="'+backColour+'"><tr><td nowrap><span>';
    if(ns4URL.toLowerCase()!="none"){scroller+='<a href="'+ns4URL+'" class="rcScroller" target="'+ns4Target+'">'+ns4Text+'</a>';}
    else{scroller+=ns4Text;} 
    scroller+='<\/span><\/td><\/tr><\/table><\/td><td width="55" align="center" valign="bottom" style="background-color:#993300;  font-weight:bold; color:#FFFFFF;">NEWS<\/td></tr></table>'   
  }else{
    scroller='<table cellpadding="0" cellspacing="0" style="width:'+scrollerWidth+'px; height:'+scrollerHeight+'px;>';
    scroller+='<tr valign="middle"><td align="center" style="border:'+borderWidth+'px solid '+borderColour+'; background-color:'+backColour+'"><div id="div" style="';

//    if(orientation.toLowerCase()=="vertical"){scroller+='height:'+scrollerHeight+'px;';}
    scroller+='height:'+scrollerHeight+'px;';

		scroller+=' width:'+(parseInt(scrollerWidth) - 65)+'px; position:relative; background-color:'+backColour+'; overflow:hidden;">';
    scroller+='<div id="div1" style="position:relative; left:0px; visibility:hidden; z-index:1">';
    scroller+='<table border="0" name="table" id="table"';
    if(orientation.toLowerCase()=="vertical"){
			scroller+='style="width:'+(parseInt(scrollerWidth) - 65)+'px"';
		}
    scroller+='><tr>';
    y=0;
    while (y<4)
    {
      for (x=0; x<(Article.length); x++)
      {
        if(orientation.toLowerCase()=="vertical"){scroller+='<tr>';}
        scroller+='<td ';
        if(orientation.toLowerCase()=="horizontal"){scroller+=' nowrap="nowrap" ';} if(stopScroll==1){scroller+=' onMouseOver="stopScroller();" onMouseOut="setWidth()"';}
        scroller+='><span>';

		scroller+= Article[x][0] + '&nbsp;>>&nbsp;'
		switch (Article[x][2].toLowerCase()){
			case "none":
				scroller+=Article[x][1];          
	        	break;
			case "js":
				scroller+='<a class="rcScroller" href="javascript:void(0)" onclick="alert(\''+Article[x][3]+'\')" >'+Article[x][1]+'<\/a>';
				break;		
			case "#":
				scroller+='<a class="rcScroller" href="'+Article[x][2]+'">'+Article[x][1]+'<\/a>';
				break;
			default:		
				scroller+='<a class="rcScroller" href="'+Article[x][2]+'" target="'+Article[x][3]+'" >'+Article[x][1]+'<\/a>';
				break;
		}
        scroller+='<\/span><\/td>';
        
        if(orientation.toLowerCase()=="vertical"){scroller+='<\/tr>';}
              
        if(NewsDivider.toLowerCase() != "none"){scroller+='<td nowrap="nowrap"><span>'+NewsDivider+'<\/span><\/td>';}
      }
      y++
    }
    scroller+='<\/tr><\/table><\/div><\/div><\/td><td valign="center" style="border:'+borderWidth+'px solid '+borderColour+'; background-color:#993300;  font-size: 12; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight:bold; color:#FFFFFF;">&nbsp;NEWS&nbsp;<\/td><\/tr><\/table>';  
  }
  document.writeln(scroller);
}
// Ensure the width of the scroller is divisible by 2. This allows smooth flowing of the scrolled content
function setWidth()
{ 
  clearTimeout(timer);
  tableObj=(isIE)?document.all("table"):document.getElementById("table"); 
  //tableObj=document.getElementById("table"); 
  obj=(isIE)?document.all.div1:document.getElementById("div1");   
	obj.style.visibility = "visible";
  //obj=document.getElementById("div1");   
  objWidth=(orientation.toLowerCase()=="horizontal")?getOffset(tableObj,"width"):getOffset(tableObj,"height");
  HalfWidth=Math.floor(objWidth/2);
  newWidth = (HalfWidth*2)+2;
  obj.style.width=newWidth
  moveLayer(obj, newWidth);
  
}

// Move the layer by one pixel to the left
function moveLayer(obj, width)
{
  
  maxLeft = (0-(width/2)+2)/2
  if(orientation.toLowerCase()=="horizontal"){
		obj.style.left=(parseInt(obj.style.left) <= maxLeft)?0+'px':(parseInt(obj.style.left)-1)+'px';
	}else{
    if(obj.style.top==""){obj.style.top=0;}
   // alert(obj.style.top)
    if (parseInt(obj.style.top)<(0-(width/2)+6)){
      obj.style.top = 0
    }else{
      obj.style.top = parseInt(obj.style.top)-1
    }
  }
  timer = setTimeout ("moveLayer(obj, "+ width +");", 25); 
}

// Get width and height of layer
function getOffset(obj, dim) 
{
  if(dim=="width")
  {
    oWidth = obj.offsetWidth
    return oWidth
  }  
  else if(dim=="height")
  {
    oHeight = obj.offsetHeight
    return oHeight
  }    
}

function stopScroller()
{
  clearTimeout(timer)  
}

function runScroller(){
  if(!isNS4){setWidth()}
}
//-->

