ciao! scusa il ritardo nella risp. Ho potuto lavorare solo oggi. Ho fatto come hai detto. Le miè incomprensioni erano dovute alla struttura della tabella del db. L'ho ricreata con id-file-altro. Ma file a cosa dovrebbe servire?

Inoltre ho eseguito il codice richiamndolo in una pagina ma niente. Ho preso da esempio la home della del sito che mi hai postato seguendo gli stessi passi.
La parte dove faccio eseguire lo script rimane vuota.
Dove sbaglio?
Ho eseguito solo lo script e nn mi da alcun errore. Mi satmpa quello che c'è nella tabella.
Di seguito t riporto quello che ho fatto:

var testoesteso='';
var testobreve='';
/*
testoesteso+='<div style="margin:0 2px 0 2px" >';
testoesteso+='<span><A href=# class=news_titolo onClick='window.open("./index.php?pArea=1&pAct=shw01&lCod=41","News","widt h=515,height=450"); return false'>';
testoesteso+='</div>';
*/

<?
// Il nome dell'host (hostname) su cui si trova MySQL
$dbhost = "localhost";

// Il nome del nostro database
$dbname = "xxxxx";

// Il nostro nome utente (username)
$dbuser = "xxxxx";

// La nostra password
$dbpass = "xxxx";

// Funzione mysql_connect()
$conn = mysql_connect($dbhost,$dbuser,$dbpass)
or die("Impossibile collegarsi al server MySQL.");

// Funzione mysql_select_db()
mysql_select_db($dbname,$conn)
or die("Impossibile selezionare il database $dbname");

$sql="SELECT file,altro FROM testo WHERE NOT (altro LIKE '%Home%' ) ORDER BY id DESC LIMIT 0,5";

// Esecuzione comando SQL o messaggio di errore
$res = mysql_query($sql,$conn)
or die( "Errore: " . mysql_error() );

//legge il file che si vuole: apre l'index se non si passa la stringa [cosa vuol dire?]
$campo=!empty($_GET["id"]) ? $_GET["id"] : "200505" ;


while ($row=mysql_fetch_array($res))
{
//crea il testo sostituendo la sintassi per i link
$codice_div_scrollabile="testoesteso+=".$row["file"].$row["altro"]."
;\n";

}



echo $codice_div_scrollabile;

// Funzione mysql_close()
mysql_close($conn);

?>
var testo='';
if(document.getElementById || document.all){
testo=testoesteso;
}
else {
testo=testobreve;
}
function scrollerObj(name,initH,initW,heightB,wid
thB,content,initBg,Bg,speed,initFl)
{

//**data**//
this.name=name;
this.initH=initH;
this.initW=initW;
this.heightB=heightB;
this.widthB=widthB;
this.content=content;
this.initBg=initBg;
this.Bg=Bg;
this.iniFl=initFl;
this.speed=parseInt(speed);
this.timer = name + "Timer";
this.elem;

//**methods**//
this.getElement = getElement;
this.createLayer=createLayer;
this.scrollLayer = scrollLayer;
this.scrollLoop=scrollLoop;

//**initiate methods**//
this.createLayer();
this.getElement();
this.scrollLayer();
}

//**call this method to stop scrolling**//
function scrollLoop(s){
this.speed = s;
}

//**pretty obvious**//
function scrollLayer(){
if(document.getElementById || document.all){
if(parseInt(this.elem.style.top)>(this.elem.offset Height*(-1)+3)){
this.elem.style.top = parseInt(this.elem.style.top)-this.speed;
this.timer = setTimeout(this.name+'.scrollLayer()','100');
}
else {
//this.elem.style.top = this.initH;
this.elem.style.top = 50;
this.timer = setTimeout(this.name+'.scrollLayer()',3000);
}
}
}

//**get the specific dom-expression**//
function getElement(){
if(document.getElementById){
this.elem = document.getElementById(this.name);
}
else if (document.all){
this.elem = document.all[name];
}
else if (document.layers){
this.elem = document.layers[name];
}

}


//**pretty obvious - if NS4 - please upgrade to a standard compliant browser**//
function createLayer(){
if(document.getElementById || document.all){
document.write('<div style="position:relative;overflow:hidden;"><div id="layer'+this.name+'" style=" position:relative;overflow:hidden;float:
'+this.initFl+';background-color:#'+this.initBg+';border:0;width:'+this.initW +'px;height:'+this.initH+'px;" onMouseover="'+this.name+'.scrollLoop(0)" onMouseout="'+this.name+'.scrollLoop('+this.speed+ ')">');
//document.write('<div id="'+this.name+'" style="text-align:left;position:absolute;top:'+this. initH+'px;left:0px;border:0;width:'+this
.widthB+'px;background-color:#'+this.Bg+'">');
document.write('<div id="'+this.name+'" style="text- align:left;position:absolute;top:100px;l
eft:0px;border:0;width:'+this.widthB+'px;backgroun d-color:#'+this.Bg+'">');
document.write(this.content);
document.write('<\/div><\/div><\/div>');
}
else if(document.layers){
document.write(this.content);
return;
}
if(this.scrollLayer){
this.timer = setTimeout(this.name+'.scrollLayer()','100');
}
}