function s3artists(page, type)
{
	var index = AjaxHandler.AddRequest('/s3/ajax/request/artists.php', s3artistsprocess);
	AjaxHandler.CallUpdate(index, 'page='+page+'&type='+type, 'GET');
}

function s3artistsprocess(responseText, responseStatus)
{
	if (responseStatus==200)
	{
		//alert(responseText);
		var artists = JSON.parse(responseText);
		
		switch (artists.result)
		{
			case 'good':
			
			var htmlPagination = '<table cellpadding="0" cellspacing="0" align="left" style="height:10px;border:0px;">';
			htmlPagination += '<tr>';
			htmlPagination += '<td style="width:7px;">';
			htmlPagination += '<a href="javascript:;" onmouseover="doSwap(\'icoprev\', 1)" onmouseout="doSwap(\'icoprev\', 0)" onclick="s3artists('+artists.pagination.previous+', \''+artists.pagination.type+'\')" title="Load previous artists page">';
			htmlPagination += '<img id="icoprev" src="/images/ico-prev-0.gif" width="4" height="10" border="0" align="middle" class="img-ico" /></a>';
			htmlPagination += '</td>';
			htmlPagination += '<td>';
			htmlPagination += '<a href="javascript:;" onclick="s3artists('+artists.pagination.previous+', \''+artists.pagination.type+'\')" title="Load previous artists page" class="lnk-orange9">prev</a>';
			htmlPagination += '<span class="txt-white9">&nbsp;['+artists.pagination.page+' of '+artists.pagination.total+']&nbsp;</span>';
			htmlPagination += '<a href="javascript:;" onclick="s3artists('+artists.pagination.next+', \''+artists.pagination.type+'\')" title="Load next artists page" class="lnk-orange9">next</a>';
			htmlPagination += '</td>';
			htmlPagination += '<td style="width:10px;text-align:right;">';
			htmlPagination += '<a href="javascript:;" onmouseover="doSwap(\'iconext\', 3)" onmouseout="doSwap(\'iconext\', 2)" onclick="s3artists('+artists.pagination.previous+', \''+artists.pagination.type+'\')" title="Load next artists page">';
			htmlPagination += '<img id="iconext" src="/images/ico-next-0.gif" width="4" height="10" border="0" align="right" class="img-ico" /></a>';
			htmlPagination += '</td>';
			htmlPagination += '</tr>';
			htmlPagination += '</table>';
						
			var htmlArtists = '';
			if (artists.items.length == 0)
			{
				htmlArtists = 'We currently do not have any artist profiles to display.';
			}
			else
			{
				var rowCount = 0;
				
				for (var i = 0; i < artists.items.length; i++)
				{
					htmlArtists += '<div class="box-nobgr-list" style=width:130px;text-align:left;margin-bottom:20px;">';
					htmlArtists += '<a href="/artists/'+artists.items[i].pagetitle+'" title="View '+artists.items[i].title+' complete profile" />';
					htmlArtists += '<img src="'+artists.items[i].image+'" width="'+artists.items[i].width+'" height="'+artists.items[i].height+'" border="0" /></a>';
					htmlArtists += '<br /><a href="/artists/'+artists.items[i].pagetitle+'" title="View '+artists.items[i].title+' complete profile" />';
					htmlArtists += artists.items[i].title+'</a>'; 
					htmlArtists += '</div>';
					
					rowCount++;
					
					if (rowCount<3)
					{
						htmlArtists += '<div class="box-nobgr-list-spacer" style="width:37px">&nbsp;</div>\n';
					}
					
					if (rowCount==3)
					{
						htmlArtists += '<div class="clear"></div>\n';
						rowCount = 0;
					}
				}
				
				if (rowCount==1)
				{
					htmlArtists += '<div class="clear"></div>\n';
				}
			}
			
			elPopulate('pagi', htmlPagination);
			elPopulate('ajxartists', htmlArtists);
			
			break;
			
			case 'error':
			
			htmlStore = '<div class="box-bgr-error-wide" style="margin:0px 0px 20px 0px;">'+artists.message+'</div><div class="clear"></div>';
			elAll('ajxartists', htmlStore, 'box-nobgr-wide', 'inline-block');
			
			break;
		}
	}
	else
	{
		elAll('ajxartists', responseText + ' -- Error Processing Request', 'box-bgr-error-wide', 'inline-block');	
	}
}