// Handle the results
function showResults(response, ioArgs) {
    var html = '';
    // If we got some results...
    // Put the result HTML in the page
	html = '<table width="100%" align="center" border="1" style="background-color: #6d85a5;">';
	for (var i = response.Dias.length - 1; i >= 0; i--){
		html += "<tr>";
		html += '<td width="15%">'+response.Dias[i].Land+"</td>";
		html += '<td width="15%">'+response.Dias[i].Plaats+"</td>";
		html += '<td width="50%">'+response.Dias[i].Omschrijving+"</td>";
		html += '<td align="center"><div onClick="ShowImage(\''+response.Dias[i].Slide+'\',\'' + 
		'<b>'+response.Dias[i].Nr + '</b><br> '+
		response.Dias[i].Omschrijving + '<br> '+
		response.Dias[i].Plaats+ '[' +response.Dias[i].Land +']\')">' +
		'<img alt="" '+
		' src="'+
		response.Dias[i].Thumb+'"></div></td>';
		html += "</tr>";
	};
	html += "</table>";
	
    dojo.byId('output').innerHTML = html;
}				 


function ShowImage(pURL, pTitle)
{  
	var dialog = new dojox.image.LightboxDialog().startup();
	dialog.show({ href: pURL, title:pTitle});
}

