function catalogo()
{
//funzione che stampa il catalogo merci
var strHtml ='';

//combo per la selezione del tipo di merce
strHtml += '<br>';

strHtml += '<form id=frmCatalogo name=frmCatalogo action="cosa.php" method=get>';

strHtml +=		'<input type=hidden id=hidFunzione name=hidFunzione value=catalogo></input>';

strHtml +=		'<table align = center>'; 
strHtml +=			'<tr height=20>';
strHtml +=				'<td background ="img/menuscuro3.gif" class=tableitem width=130 align=right width=100>';
strHtml +=					'<b>tipo merce </b>';
strHtml += 				'</td>';

strHtml +=				'<td width=3>';
strHtml +=				'</td>';
					
strHtml +=				'<td>';
strHtml +=					'<select id=selTipo name=selTipo class=workspace onchange="caricaArticoli();">';
strHtml +=						'<option> </option>';
strHtml +=						'<option value=\'C\'>Alimentari</option>';
strHtml +=						'<option value=\'A\'>Artigianato</option>';
strHtml +=						'<option value=\'P\'>Pubblicazioni</option>';
strHtml +=					'</select>';
strHtml +=				'</td>';
strHtml +=			'</tr>';
strHtml +=		'</table>';


strHtml += '</form>';

document.all.divWork.innerHTML = strHtml;

return false;
};

//-------------------------------------------------------------------------------

function caricaArticoli()
{
// funzione che carica gli articoli del tipo selezionato
if (document.all.selTipo.value=='')
	return false;
	
document.all.frmCatalogo.submit();

};

//-------------------------------------------------------------------------------

//old: function scheda(strDescrizione, strImage, strScheda, strNome, strFoto, strMail)
function scheda(strCodArticolo)
{
//funzione che visualizza la scheda prodotto nella popup
/*
	var y
	if (window.event.clientY)
		y = window.event.clientY
	else
		y = 0;

	if (y<300)
		y = 300;

	document.all.spScheda.style.marginTop = y-200;

*/

/* old:
document.all.divPopupTitle.innerHTML = strDescrizione + '<br>presentato da ' + strNome;
document.all.divPopupBody.innerHTML = strScheda;
document.all.imgUser.src = strFoto
if (strImage.length>0)
	document.all.divPopupImg.innerHTML = '<img src="' + strImage + '" width=75>';
else
	document.all.divPopupImg.innerHTML = '';

document.all.spScheda.style.visibility='visible';

end old */

window.navigate("scheda.php?cod=" + strCodArticolo)

};
//-------------------------------------------------------------------------------

function chiudiPopup ()
{
//funzione che chiude la popup contenente la scheda prodotto

document.all.spScheda.style.visibility='hidden';

};
//-------------------------------------------------------------------------------


