// Modificata 25/5/2006 GG. Legge file statico thewall.xml generato per ogni blog nella cartella radice
function _initImages()
{
	if(pPars['blogID'])
	{
		var dopt_img = {
		  setName: 'channel',
//		  rowName: 'postimage',
		  rowName: 'item',
		  statusAttr: null,
		  okValue: null,
		  errorAttr: null
		};
		
		dataS_img = new DataSetHolder(dopt_img);
		dataS_img.addListener("onDataError", catchErr);
		
		var opt_img = {
		 gridStyle:      '',
		 gridWidth:      '180px',
		 titleStyle:      '',
		 titleContent:    '',
		 cellStyle:      '',
		 cellWidth:      '150px',
		 cellHeight:      '92px',
		 numRows:       3,
		 numCols:       1,
		 footerStyle:     '',
		 footerContent:    '',
		 renderingFunction:  cRender
		};
		
		theGrid = new GridWindow('ultimefoto','theGrid',opt_img);
		theGrid.create();
		theGrid.bindDataSource(dataS_img);
		
//	dataS_img.bindTo("/cgi-bin/sn_blog/get_myphotos.cgi","idblog="+pPars['blogID']+"&fl_fromblog=1&fl_nocache=1");
		dataS_img.bindTo("/thewall.xml",null,"GET");
	}
}

function cRender(dati, cell, recordIndex)
{
	var res = '';
	if(dati) {
	 if (dati.author) {
	   res="";
	  }
	  else {
	   dati.author="";
	  }
//	 res = '<a href="'+dati.guid+'"><img width="110" border="0" title="Dal Blog: '+dati.title+' di: '+dati.author+'" src="'+dati.link+'"/></a>';
	   res = '<a href="'+dati.guid+'"><img width="110" border="0" title="Dal Blog: '+escape(dati.url) +' di: '+ escape(dati.author) + '" src="'+dati.link+'"/></a>';
	}
	return res;
}
