function imgOver(numImg){
	var img = 'img' + numImg;
	document[img].src = document[img].src.replace('.gif','_f2.gif');
}
function imgOut(numImg){
	var img = 'img' + numImg;
	document[img].src = document[img].src.replace('_f2.gif','.gif');
}
function carica(cosa){
	for(i=0;i<document.all.length;i++){
		if(document.all.item(i).id.substr(0,2)=='a_'){
			document.all.item(i).style.backgroundColor='';
			document.all.item(i).style.color='#52424A';
		}
		if(document.all.item(i).id.substr(0,4)=='div_'){
			document.all.item(i).style.display='none';
		}
		if(document.all.item(i).id=='a_' + cosa){
			document.all.item(i).style.backgroundColor='#bdb56b';
			document.all.item(i).style.color='#FAFAE5';
		}
		if(document.all.item(i).id=='div_' + cosa){
			document.all.item(i).style.display='';
		}
	}
	if(cosa=='torte'){
		openWindow('torte.asp','torte',500,420)
	}
	if(cosa=='storiaCioccolato'){
		openWindow('storia.asp?pag=1&cosa=cioccolato','storiaCioccolato',500,480)
	}
	if(cosa=='storiaCaffe'){
		openWindow('storia.asp?pag=1&cosa=caffe','storiaCaffe',500,400)
	}
	if(cosa=='storiaThe'){
		openWindow('storia.asp?pag=1&cosa=the','storiaThe',500,400)
	}
	if(cosa=='pasticcini'){
		openWindow('pasticcini.asp','pasticcini',500,420)
	}
}
function openWindow(url, nome, w, h, scrollB) {
	// ------------------------------------------
	// Altezza della finestra [numero]
	altezza = (''+h != 'undefined' ? h : 480);		
	// ------------------------------------------
	// Lunghezza della finestra [numero]
	lunghezza = (''+w != 'undefined' ? w : 640);		
	// ------------------------------------------
	// Posiziona finestra al centro [true|false]
	centra = true;
	// ------------------------------------------
	// Distanza dal margine sinistro [numero]
	posX = 100;
	// ------------------------------------------
	// Distanza dal margine destro [numero]
	posY = 100;
	// ------------------------------------------
	// Visualizza a pieno schermo - solo IE4
	fullscreen='no';
	// ------------------------------------------
	// Ridimensionabile [yes|no]
	resizable='no';
	// ------------------------------------------
	// Visualizza barra del menu [yes|no]
	menuB='no';
	// ------------------------------------------
	// Visualizza barre di scorrimento [yes|no]
	if (!scrollB ) scrollB='no';	
	// ------------------------------------------
	// Visualizza barra di stato [yes|no]
	statusB='no';	
	// ------------------------------------------

	if (centra) {
		posX = Math.round((screen.width - lunghezza)/2);
		posY = Math.round((screen.height - altezza)/2);		
	}

	caratteristiche = "menubar=" + menuB;
	caratteristiche += ",scrollbars=" + scrollB;
	caratteristiche += ",statusbar=" + statusB;		//Netscape
	caratteristiche += ",status=" + statusB;		//IE4
	caratteristiche += ",height=" + altezza;
	caratteristiche += ",width=" + lunghezza;
	caratteristiche += ",screenX=" + posX;			//Netscape
	caratteristiche += ",left=" + posX;			//IE4
	caratteristiche += ",screenY=" + posY;			//Netscape
	caratteristiche += ",top=" + posY;			//IE4
	caratteristiche += ",fullscreen=" + fullscreen; 	//solo IE4
	caratteristiche += ",resizable=" + resizable;

	window.open(url, nome, caratteristiche);
}