// $Id: $

function api_voucher_for(obj) 
{
	d = document.getElementById('voucher_for');
	d.innerHTML= '';

	var html = ''; 

	if (obj.results.length > 0)
	{
		//html = '<h3>Voucher for</h3>'; 
		html += '<ul>';
		for(i=0;i<obj.results.length;i++)
		{
			html += '<li><a href="' + gWebRoot + 'uri/' + obj.results[i].object_id + '">' + obj.results[i].name + '</a> '+ obj.results[i].description +'</li> ';
		}
		html += '</ul>';
	}

	d.innerHTML= html;
}

function api_voucher(obj) 
{
	d = document.getElementById('voucher');
	d.innerHTML= '';

	var html = ''; 

	if (obj.results.length > 0)
	{
		//html = '<h3>Voucher</h3>'; 
		html += '<ul>';
		for(i=0;i<obj.results.length;i++)
		{
			html += '<li><a href="' + gWebRoot + 'uri/' + obj.results[i].object_id + '">' + obj.results[i].name + '</a> ' + obj.results[i].description + '</li> ';
		}
	}
	html += '</ul>';
	d.innerHTML= html;
}