
function editUser(id)
{
	loadDialog("EditArtist.php?user_id="+id, "Edit Artist", 700, 485, "initEditor()");
}

function showTab(id)
{
	var aTab = [ "profile", "art" ];
	
	try
	{
		for (var i = 0; i < aTab.length; i++)
		{
			if (id == aTab[i])
			{
				document.getElementById("tab-"+aTab[i]).className="current" + (i == 0 ? " first" : "");
				document.getElementById("tab-content-"+aTab[i]).style.display="block";
			}
			else
			{
				document.getElementById("tab-"+aTab[i]).className= (i == 0 ? "first" : "");
				document.getElementById("tab-content-"+aTab[i]).style.display="none";
			}
		}
	}
	catch (ex) { alert(ex); }
}

function removeUser(id)
{
	if (confirm("Remove artist?"))
		document.location.href="artists.php?command=remove-artist&user_id="+id;
}

function addPhoto(id)
{
	var win = window.open("AddPhoto.php?user_id="+id, "_blank", "width=635,height=700,scrollbars=yes,resizable=yes,status=yes");
	win.focus();
}

function editPhoto(id)
{
	var win = window.open("EditPhoto.php?user_photo_id="+id, "_blank", "width=635, height=700, scrollbars=yes, resizable=yes, status=yes");
	win.focus();
}

function removePhoto(id, user_photo_id)
{
	if (confirm("Remove photo?"))
	{
		document.location.href="artistinfo.php?user_id="+id+"&command=remove-photo&user_photo_id="+user_photo_id;
	}
}


