function stampaPercorso(percorso){
		document.getElementById("percorso").innerHTML=percorso;
	}
	
function preload() {
  if (!document.images) return;
  var wl = new Array();
  var arguments = preload.arguments;
  for (var i = 0; i < arguments.length; i++) {
    wl[i] = new Image();
    wl[i].src = arguments[i];
  }
}

function aprichiudi( targetId, h ){
var hs=document.getElementsByTagName("font"); //numero degli elementi etichetati dal tag <h3>
if (document.getElementById){
    	target = document.getElementById( targetId ); //elemento cliccato
		for(var i=1;i<=hs.length;i++){
			target2=document.getElementById( i ); 
			targetColumnInner=document.getElementById( i+"_inner" );
			if(i==target.id){
				if  (target2.style.display == "block"){
					target2.style.display =  "none";
				}
				else    {
					target2.style.display =  "block";
					
				}
            }
        	else {
				target2.style.display =  "none"; 
			}
    	}
	}
}

function aprichiudiDesIta( targetId){
if (document.getElementById){
    	target = document.getElementById( targetId+"desItaChiudi" ); //elemento cliccato
		targetApri = document.getElementById( targetId+"desItaApri" ); //elemento "apri"
		if  (target.style.display == "block"){
					target.style.display =  "none";
					targetApri.style.display = "block"
		}
		else    {
			target.style.display =  "block";
			targetApri.style.display = "none"		
		}
	}
}

function aprichiudiDesIng( targetId){
if (document.getElementById){
    	target = document.getElementById( targetId+"desIngChiudi" ); //elemento cliccato
		targetApri = document.getElementById( targetId+"desIngApri" ); //elemento "apri"
		if  (target.style.display == "block"){
					target.style.display =  "none";
					targetApri.style.display = "block"
		}
		else    {
			target.style.display =  "block";
			targetApri.style.display = "none"		
		}
	}
}

function aprichiudiB( targetId ){
var hs=document.getElementsByTagName("dl"); //numero degli elementi etichetati dal tag <h3>
if (document.getElementById){
    	target = document.getElementById( targetId ); //elemento cliccato
		for(var i=1;i<=hs.length;i++){
			target2=document.getElementById( i+"b" ); 
			targetColumnInner=document.getElementById( i+"_inner" );
			if((i+"b")==target.id){
				if  (target2.style.display == "block"){
					target2.style.display =  "none";
				}
				else    {
					target2.style.display =  "block";
					
				}
            }
        	else {
				target2.style.display =  "none"; 
			}
    	}
	}
}

function popup(h,  w, page) {
	
var w = w;
var h = h+20;
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/2;
if (winl < 0) winl = 0;
if (wint < 0) wint = 0;

var page = page;
windowprops = "height="+h+",width="+w+",top="+ wint +",left="+ winl +",location=no,"
+ "scrollbars=yes,menubars=no,toolbars=no,resizable=yes,status=yes";

//windowprops = "dialogHeight: "+h+"px; dialogWidth: "+w+"px; dialogTop: "+ wint +"px; dialogLeft: "+ winl +"px; center: Yes; help: No; resizable: No; status: No; scroll: No"
popw=window.open(page,'NarniaFumetto',windowprops);

//window.open('http://www.unicosantone.com', 'Narnia Fumetto', windowprops);
//window.showModalDialog("http://www.altavista.com","","dialogWidth:500px;dialogHeight:500px") 

winl = (screen.width-w)/2;
wint = (screen.height-h)/2;
if (winl < 0) winl = 0;
if (wint < 0) wint = 0;
popw.resizeTo(w,h);
//onclick="javascript:window.open('newbeuser.jsp','newbeuser','height=350,width=500,status=yes,toolbar=no,menubar=no,location=no');" /> New User </div></td>
}

function parentFunction(idArticolo) {

	newimg=document.getElementById("SchedaArticolo");
	
	newimg.src="articolo.asp?idArticolo="+idArticolo;
	
}
function pagamentoMetodo(idMetodo)  {

	newimg=document.getElementById("SchedaArticolo");
	
	newimg.src="metodiPagamento.asp?idMetodo="+idMetodo;
	
}

function callWhite() {

	newimg=document.getElementById("SchedaArticolo");
	
	newimg.src="white.html";
	
}



function countdown(){
	iniData= new Date(2005,8,7,23,59,59); // data inizio sequenza mesi-1 es. set=8
	oggi= new Date();
	//oggi.setHours(1,1,1,0) ;
	iniDataIt=iniData.getDate()+'-'+(iniData.getMonth()+1)+'-'+iniData.getFullYear()+' '+iniData.getHours()+':'+iniData.getMinutes()+':'+iniData.getSeconds();
	milDif=(iniData-oggi)
	giorni=parseInt(milDif/86400000);  
	milDif=milDif-(giorni*86400000); //millisecondi restanti talti i giorni
	ore=parseInt(milDif/3600000);
	milDif=milDif-(ore*3600000); //millisecondi restanti talti i giorni
	minuti=parseInt(milDif/60000);
	milDif=milDif-(minuti*60000); //millisecondi restanti talti i giorni
	secondi=parseInt(milDif/1000);
	milDif=milDif-(secondi*1000); //millisecondi restanti talti i giorni
	testo='Al giorno: '+iniDataIt+' mancano '+giorni+' giorni, ';
	//alert(testo); //commentare
	//return testo
	if (document.layers){
		document.layers.span1.document.write(testo);
		document.layers.span1.document.close();
	}else if (document.all){
		span1.innerHTML=testo;
	}
setTimeout("countdown()",1000)
}

// *** image preload script *** //

function MM_preloadImages() { //v3.0
	var d = document;
	if(d.images) {
		if(!d.MM_p) {
			d.MM_p=new Array();
		}
	}

	var i, j = d.MM_p.length, a = MM_preloadImages.arguments;
	for (i = 0; i < a.length; i++) {
		if (a[i].indexOf("#") != 0) {
			d.MM_p[j] = new Image; d.MM_p[j++].src = a[i];
		}
	}
}

// *** main page mouseover scripts *** //

function af () { document.main.src = ("../images/Nuvola_4.jpg"); }
function costruzioni() { document.main.src = ("../images/Nuvola_2.jpg"); }