<link rel="stylesheet" href="news_scorre.css" type="text/css">
<style>
.panel
{
width:450;
height:30;
border:0px groove red;
background-color:;
overflow:hidden
}
.text
{
width:450;
height:30;
background-color:;
color:336699;
font-size:11px;
font-family:verdana;
text-align:left;
padding:1;
filter:alpha(opacity=5);
-moz-opacity:0%;
position:absolute;
overflow:hidden;
cursor:default; font-style:normal; font-variant:normal; font-weight:normal
}
</style>
</head>
<body topmargin="0" leftmargin="0" vlink="#0000FF" link="#0000FF" alink="#0000FF">
<div class="ultimora01">
<%
Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("/mdb-database/database.mdb")
strConn=strConn & ";pwd=training"
Conn.Open strConn
sql = "SELECT TOP 20 * FROM articoli ORDER BY ad_dated desc "
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
menu="message[0]= '';"
menu=menu&"message[1]= '';"
cont=2
do while not rs.eof
news=Replace(rs("ad_title"),"'","\'")
menu=menu&"message["&cont&"]= '"&rs("comune")&" "&news&"</a>
';"
cont=cont+1
menu=menu&"message["&cont&"]= '';"
cont=cont+1
rs.movenext
loop
rs.Close
set rs = Nothing
conn.Close
set conn = Nothing
%>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<script language="JavaScript">
function aprinews(id){
var windowdim="location=no,toolbar=no,menubar=no,scrol lbars=1,resizable=1,width=600,height=400";
window.open("vedinews.asp?ID="+id, "dettaglio", windowdim);
}
var speed = 0;
var delay = 1550;
var stub = 0;
var action = 0;
var timerID;
var message = new Array()
<%=menu%>
var fadeA = new Array()
fadeA[0] = new Array(0,0);
fadeA[1] = new Array(100,1);
onload = init
function init()
{
txt1 = document.getElementById("text1");
txt2 = document.getElementById("text2");
replay();
}
var ie=(document.all && document.getElementById);
var ns=(!document.all && document.getElementById);
function changetext()
{
stub++;
if (stub == message.length) stub=1;
if (action == 0)
{
action = 1;
txt1.innerHTML = message[stub];
fade(1,0);
}
else
{
action = 0;
txt2.innerHTML = message[stub];
fade(0,1);
}
}
function replay()
{
if (timerID != "") clearTimeout(timerID);
fadeA[0][0] = 0;
fadeA[1][0] = 200;
stub = 0
changetext();
}
function fade(inc,outc)
{
if (fadeA[outc][0] < 100)
{
fadeA[outc][0]++;
fadeA[inc][0]--;
opacity = fadeA[outc][0];
opacity2 = fadeA[inc][0];
if(inc == 1)
{
obj = txt1
obj2 = txt2
}
else
{
obj = txt2
obj2 = txt1
}
if(ie){
obj.style.filter="alpha(opacity="+fadeA[outc][0]+")";
obj2.style.filter="alpha(opacity="+fadeA[inc][0]+")";
}
if(ns){
obj.style.MozOpacity = fadeA[outc][0] + '%';
obj2.style.MozOpacity = fadeA[inc][0] + '%';
}
timerID = setTimeout("fade("+inc+","+outc+")",speed);
}
else
{
timerID = setTimeout("changetext()",delay);
}
}
</script>
</center>
<tr><td rowspan="2" valign="top" align="left">
<div class="panel" ondblclick="replay()">
<div class="text" id=text1 style="width: 450; height: 30">
</div>
<div class="text" id=text2 style="width: 450; height: 30">
</div>