/* Simple display of attributes as a table */
function api_object_attributes(obj) 
{
	d = document.getElementById('attributes');
	d.innerHTML= '';
	
	
//	var html = '<div style="height:1px;margin:0;padding:0;border-top:1px dotted #ccc;"></div>';
//	 html += '<table  class="tbl_attributes">';
	
	var html = '<table  class="tbl_attributes">';


	if (obj.results[0].attributes.length > 0)
	{
		
	 for(i=0;i<obj.results[0].attributes.length;i++)
	 {
	 	html += '<tr><td class="tbl_name" valign="top">';
	
		if (obj.results[0].attributes[i].caption != '')
		{
			html += obj.results[0].attributes[i].caption;
		}
		else
		{
			html += obj.results[0].attributes[i].name;
		}
	  	html += '<\/td><td>' + obj.results[0].attributes[i].value + '<\/td><\/tr> ';
	 }
	}
	html += '<\/table>';
	d.innerHTML= html; 
}
