<!--

function stopg_scroll() {
 if($timerg_scroll) {
  window.clearTimeout($timerg_scroll);
  $timerg_scroll=null;
 }
}

function giu_scroll() {
 if(parseInt(document.getElementById($ids[3]).style.top)<(document.getElementById($ids[2]).offsetHeight+document.getElementById($ids[3]).offsetHeight+$offSet)) {
  document.getElementById($ids[3]).style.top=(parseInt(document.getElementById($ids[3]).style.top)+$offSet)+"px";
 } else {
  document.getElementById($ids[3]).style.top=(document.getElementById($ids[2]).offsetHeight+$offSet)+"px";
 }
 $timerg_scroll=window.setTimeout("giu_scroll();", 100);
}

function play_scroll() {
 if(!$timer_scroll) $timer_scroll=window.setTimeout("news_scroll();", 100);
}

function stop_scroll() {
 if($timer_scroll) {
  window.clearTimeout($timer_scroll);
  $timer_scroll=null;
 }
}

function news_scroll() {
 if(parseInt(document.getElementById($ids[3]).style.top)>-(document.getElementById($ids[3]).offsetHeight+$offSet)) {
  document.getElementById($ids[3]).style.top=(parseInt(document.getElementById($ids[3]).style.top)-$offSet)+"px";
 } else {
  document.getElementById($ids[3]).style.top=(document.getElementById($ids[2]).offsetHeight)+"px";
 }
 $timer_scroll=window.setTimeout("news_scroll();", 100);
}

function avvia_news() {
 document.getElementById($ids[3]).style.left="0px";
 document.getElementById($ids[3]).style.top=(document.getElementById($ids[2]).offsetHeight+$offSet)+"px";
 document.getElementById($ids[3]).style.visibility="visible";
 news_scroll();
}

var $news=new Array();
 //$news[0]="<h5><b>VINOLITECH</b></h5><h6>Salone delle macchine e delle attrezzature per l'enologia, il settore oleario e per l'attivita' vitivinicola ed olivicola</h6><h6>Quartiere Fieristico di Ancona</h6><h6>30-31 gennaio 1 febbraio 2009</h6><a href='http://www.vinolitech.it'/>http://www.vinolitech.it</a>";
 //$news[1]="Il meteorologo climatologo Prof.Stefano Leonesi del Centro Operativo Agrometeo - Assam sara' ospite in studio della trasmissione di Multiradio 'Alle 10 del mattino'";
 //$news[2]="<a href=http://www.multiradio.it/frequenze.asp><i>http://www.multiradio.it/</i></a>";
// $news[3]="Terza News...";
// $news[4]="Quarta news...";

var $ids=new Array();
 $ids[0]="containernp";
 $ids[1]="container_pan";
 $ids[2]="container_news";
 $ids[3]="container_scroll";

var $altezza=200;
var $offSet=2;
var $timer_scroll=null;
var $timerg_scroll=null;

document.write("<div class=dati_content id=\""+$ids[0]+"\" style=\"width:150px; border-left: solid 0px #AAAAAA; display: block; border-right: solid 0px #AAAAAA; display: block;\">");
 document.write("<div class=dati_content id=\""+$ids[2]+"\" style=\"width:100%; height:"+$altezza+"px;text-align=center; position:relative; overflow:hidden; border: solid 0px #AAAAAA;; border-top: solid 0px #AAAAAA; display: block;\">");
  document.write("<div class=dati_content id=\""+$ids[3]+"\" style=\"position:absolute; top:0px; left:0px; visibility:hidden;\">");
   document.write("<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">");
   for(var $x=0; $x<$news.length; $x++) {
    document.write("<tr><td>"+($news[$x])+"</td></tr>");
   }
   document.write("</table>");
  document.write("</div>");
 document.write("</div>");
// document.write("<div class=dati_content id=\""+$ids[1]+"\" style=\"width:100%; position:relative; border: solid 0px #AAAAAA; display: block; text-align:center; border-top: solid 1px #AAAAAA; display: block; border-bottom:#AAAAAA 1px solid;\"><a href=\"#\" onmousedown=\"$offSet=15; play_scroll();\" onmouseup=\"stop_scroll();\">Su</a> <a href=\"#\" onclick=\"$offSet=5; if(!$timer_scroll) play_scroll();\">Play</a> <a href=\"#\" onclick=\"stop_scroll();\">Stop</a> <a href=\"#\" onmousedown=\"stop_scroll(); $offSet=15; giu_scroll();\" onmouseup=\"stopg_scroll();\">Giu</a></div>");
document.write("</div>");

window.onload=function() {
avvia_news();
}

//-->


