function precaricaimmagini(){
if (document.images){
var filediimmagini = precaricaimmagini.arguments;
var matriceprecaricate = new Array();
for (var i=0; i<filediimmagini.length; i++){
matriceprecaricate[i] = new Image;
matriceprecaricate[i].src = filediimmagini[i];}}
}


function setPos() {

    document.getElementById('txtscrolla').value = document.getElementById('div_contenitore_scrollo').scrollTop
 
}




precaricaimmagini('logo4.jpg', 'bg_centrale.jpg', 'btn_indietro.gif', 'btn_indietro2.gif', 'bg_fasciablu.jpg'); //Per aggiungere mettere una virgola ed un nuovo nome di immagine fra apici singoli.



var hcolor3=255;	
var hcolor2=255;
var hcolor=218;
var pippo=122;

function Fade(direction){
		
obj=document.getElementById("divfrase");

if(hcolor3==122){

hcolor3=hcolor3 + 1
}

hcolor += direction;
hcolor2 += direction;
hcolor3 += direction;
if(hcolor >= 0 && hcolor < 256 && hcolor2 >= 0 && hcolor2 < 256 && hcolor3 >= 0 && hcolor3 < 256 ) {


hex=hcolor.toString(16);
if(hex.length==1) hex="0" + hex;

hex2=hcolor2.toString(16);
if(hex2.length==1) hex2="0" + hex2;

hex3=hcolor3.toString(16);
if(hex3.length==1) hex3="0" + hex3;

obj.style.color="#" + hex2 + hex + hex3;


window.setTimeout("Fade(" + direction + ");",1);

}

}


//FUNZIONI PER ANIMARE IN ORIZZONTALE LE MINIATURE



function avanti_pager() {

$("#ava").css("cursor","pointer")
$("#ava").css("cursor","hand")
$('#div_contenitore_scrollo').animate({scrollTop:'+=100000px'},1400000,'linear')

}


function stop_avanti() {
$('#div_contenitore_scrollo').stop()
$("#ava").css("cursor","default")
}


function indietro_pager() {

$("#ind").css("cursor","pointer")
$("#ind").css("cursor","hand")
$('#div_contenitore_scrollo').animate({scrollTop:'-=100000px'},1400000,'linear')

}


function stop_indietro() {
$('#div_contenitore_scrollo').stop()
$("#ava").css("cursor","default")
}





//FINE FUNZIONI PER ANIMARE IN ORIZZONTALE LE MINIATURE




function mostra_foto(){


$("#img").css("visibility","visible")
$("#img").hide()
//$("#img").show("fold",1500);
$("#img").fadeIn(3000);
}


function mostra_info(){
$("#div_info").css("visibility","visible")
$("#div_info").hide()
//$("#div_info").show("slide",1500);
$("#div_info").fadeIn(3000);
}

function mostra_titolo(){
$("#divtitolo").css("visibility","visible")
$("#divtitolo").hide()
$("#divtitolo").show("slide",1500);
//$("#divtitolo").slide(6000);
}

function mostra_titolo_load(){
$("#divtitolo").css("visibility","visible")

}



			
