
function clsDocumenti(idDocumento, descrizione, nome, foto, prodottoMese)
{
 this.idDocumento		= idDocumento;
 this.descrizione		= descrizione;
 this.nome				= nome;
 this.foto				= foto;
 this.prodottoMese		= prodottoMese;
};


//-------------------------------------------------------------------------------

function caricaDocumenti()
{
// funzione che carica gli eventi del tipo selezionato
var strHTML="";		//stringa html
var strImg="";		//path immagine


strHTML += "<table align=center width=100%>"

//preparazione riga di intestazione
			strHTML += "<tr>";
			strHTML +=		"<td background='img/menuscuro3.gif' class=tableitem align=center>";
			strHTML +=			"<b>documento</b>";
			strHTML +=		"</td>";
			strHTML += "</tr>";

for (var i=0; i<aDocumenti.length; i++)
	{
	
			if (i%2==0)
				strImg = "img/menuscuro6.gif"
			else
				strImg = "img/menuchiaro6.gif";
			
			
			strHTML += "<tr>";
			
			strHTML +=		"<td background='" + strImg + "' class=tableitem>";
			strHTML +=			"<b>"; 
			strHTML +=				"<a href=# onclick=\"scheda(aDocumenti[" + i + "])\">";
			strHTML +=					aDocumenti[i].descrizione;
			
			if (aDocumenti[i].prodottoMese == 1)
				{
				strHTML +=					'<img src="img/new.gif" width=40 border=0>'
				}
			
			strHTML +=				"</a>";
			strHTML +=			"</b>";
			strHTML +=		"</td>";
			
			strHTML += "</tr>";
		
	};
	
strHTML += "</table>";	

document.all.divResult.innerHTML = strHTML;


};

//-------------------------------------------------------------------------------

function scheda(objDocumento)
{

	window.navigate("schedaDocumento.php?cod=" + objDocumento.idDocumento);

};
//-------------------------------------------------------------------------------


