function uploadPicture(isSubmittingForm)
{
	if ($("#picfile").attr("value") == undefined)
		return false;

	$("#uploadpic_go").hide();
	$("#uploading_pic").fadeIn();
	$("#uploading_pic").ajaxStart(function(){
		//$(this).fadeIn();
	}).ajaxComplete(function(){
		//$(this).fadeOut();
	});

	$.ajaxFileUpload
	(
		{
			url:'geocoding/upload_pic_form.php?upload&book='+gBookId, 
			secureuri:false,
			fileElementId:'picfile',
			dataType: 'json',
			success: function (data, status)
			{
				if(typeof(data.error) != 'undefined')
				{
					$("#uploading_pic").fadeOut();
					if(data.error != '')
					{
						$("#uploadpic_go").show();
						alert(data.error);
					}
					else
					{
						$("#upload_picture_form").hide();
						$("#picture_uploaded").html("<img src='contributions-xchg/large/"+data.filename+"' "/*width='20%' height='20%' */+"/>");
						$("#picture_uploaded").fadeIn();
						$("#picfilename").attr("value", data.filename);
						if (isSubmittingForm)
							addXchg();
					}
				}
			},
			error: function (data, status, e)
			{
				$("#uploading_pic").fadeOut();
				$("#uploadpic_go").show();
				alert(e);
			}
		}
	)
	
	return false;
}