function showPhoto(id,uin)
{
	x_showPhoto(id,uin, 0, pShowResponse);
}

function showPhoneNext(id, uin, flag)
{
	x_showPhoto(id,uin, flag, pShowResponse);
}

function pShowResponse(response)
{
	if(response)
	{
		alertA("",response);
	}
}

function savePComment(pid)
{
	var value = $('#pComment').val();
	if(value !="" && value!=" " && pid)
	{

		text = encodeURI(value);
		$('#commentBut').attr('disabled',true);
		$('#commentBut').val('Please wait...');
		x_savePhotoComment(pid,text,savePCommentResponse);
		$('#commentBut').attr('disabled',false);
		$('#commentBut').val('Send');
		
		
	}

}
function savePCommentResponse(response)
{
	if(response)
	{
		$('#photoCommentsList').html( response + "  " + $('#photoCommentsList').html());
		$('#pComment').val('');
		$('#pComment').html('');
	}
	
	$('#pComment').val('');
	$('#pComment').html('');
	
}
function removeComment(id,imgid)
{
	x_deleteComment(id,imgid,deleteCommentResponse);
}
function deleteCommentResponse(response)
{
	if(response)
		$('#comment_' + response).fadeOut('fast');
}