var NTS4 = false;
var preOggetto;
var postOggetto;      
var altezza;
altezza = 300;
motto = new Array('INNOVAZIONI PER LA LAVORAZIONE DEL LEGNO', 'INNOVATIONEN FÜR DIE HOLZVERARBEITUNG', 'IDEAS WHEN WORKING WITH WOOD');
var indicemotto;
indicemotto = -1;
if (document.layers) NTS4 = true;
if (document.all) {
    preOggetto = 'document.all["';
	postOggetto = '"]';
} else {
    preOggetto = 'document.getElementById("';
	postOggetto = '")';
}

function scrolla() {
   altezza--;
   switch(altezza) {
     case 297: 
	 	 scriviHTML('8F8883');
	     break;
     case 296:
	  	 scriviHTML('BDAB95');
	     break;
     case 295:
	  	 scriviHTML('EBCFA7'); 
	     break;
     case 265: 
	  	 scriviHTML('BDAB95');
	     break;
     case 264:
	  	 scriviHTML('8F8883'); 
	     break;
     case 263:
	  	 scriviHTML('616471'); 
	     break;
     case 262:
	    if (NTS4) {
	        document.layers['layerscroll'].document.writeln('');
		    document.layers['layerscroll'].document.close();
	    } else {
	  	    eval(preOggetto + 'divscroll' + postOggetto + '.innerHTML = "";');
	    }	 
	    window.setTimeout('riparti()', 2000);
	    return;
	    break;
   }
   impostaaltezza();
   window.setTimeout('scrolla()', 80);
}

function riparti(){
     altezza = 300;
	 impostaaltezza();
     indicemotto++;
     if (indicemotto > (motto.length - 1)) {
        indicemotto = 0;
     }
     scriviHTML('616471');
     window.setTimeout('scrolla()', 80);		 
}

function impostaaltezza() {
   if (NTS4) {
   	   document.layers['layerscroll'].top = altezza;  
   } else {
       eval(preOggetto + 'divscroll' + postOggetto + '.style.top = ' + altezza + ';');
   }	   

}

function scriviHTML(colore) {
	if (NTS4) {
	    document.layers['layerscroll'].document.writeln('<pre><span class=standard><b><font color=' + colore + '>' + motto[indicemotto] + '</font></b></span></pre>');
		document.layers['layerscroll'].document.close();
	} else {
	  	argomento = '"<pre><span class=standard><b><font color=' + colore + '>' + motto[indicemotto] + '</font></b></span></pre>"'
	  	eval(preOggetto + 'divscroll' + postOggetto + '.innerHTML = ' + argomento + ';');
	}
}

function frecciasu(lingua,linguavisualizzata) {
	if (NTS4) {
	    document.layers['layer' + lingua].document.writeln('<pre><a href=chi.asp?lingua=' + lingua + ' class=rosso>' + linguavisualizzata + '</a></pre>');
		document.layers['layer' + lingua].document.close();
	} else {
	  	eval(preOggetto + 'anchor' + lingua + postOggetto + '.className = "rosso";');
	}
}

function frecciafuori(lingua,linguavisualizzata) {
	if (NTS4) {
	    document.layers['layer' + lingua].document.writeln('<pre><a href=chi.asp?lingua=' + lingua + ' class=standard>' + linguavisualizzata + '</a></pre>');
		document.layers['layer' + lingua].document.close();
	} else {
	  	eval(preOggetto + 'anchor' + lingua + postOggetto + '.className = "standard";');
	}
}

function elencaproprieta() {
	oggetto = prompt('inserire oggetto','document.');
	var valore;
    finestra = window.open('','','');
	finestra.document.open();
	for (prop in eval(oggetto)) {
		valore = eval(oggetto + "." + prop);
	    finestra.document.write('<br>' + prop + " = " + valore);
	}
	finestra.document.close();
}