
function fetchTrail(currentFilter,requestingFilter,filterType,userName,profileOwnerId,loggedUserId){var loadingImg=$("#txtglobalbaseurl").val()+'/images/loading-img1.gif';var trailCreatorUuid='';if(currentFilter!=requestingFilter){if(filterType=='selfTrail'){trailCreatorUuid=profileOwnerId;}
var loadingImgTag="<img src='"+loadingImg+"' alt='loading' class='loading'>";$("#div_datacontent").html(loadingImgTag);var getParam='?userid='+profileOwnerId+'&username='+userName+'&filter='+requestingFilter+'&trailCreatorUuid='+trailCreatorUuid;var ajaxRequestUrl=$("#txtglobalbaseurl").val()+'/userprofile/userprofiletrailcontent'+getParam;$.ajax
({type:'GET',url:ajaxRequestUrl,success:function(response)
{$("#div_datacontent").html(response);},failure:function(response)
{$("#div_datacontent").html('');}});}}
function fetchMoreTrail(userProfileInfoShow,userName,profileOwnerId,loggedUserId,currentTrailCount){$("#trailMoreLink").attr('style','display: none;');$("#nextTrailLoadingImg").attr('style','display: inline;');var trailCreatorUuid='';var getParam="?userid="+profileOwnerId+"&username="+userName+"&userProfileInfoShow="+userProfileInfoShow+"&currentPageLimit="+currentTrailCount+"&nextPageShow="+true;var ajaxRequestUrl=$("#txtglobalbaseurl").val()+"/userprofile/userprofiletrailcontent"+getParam;$.ajax
({type:'GET',url:ajaxRequestUrl,success:function(response)
{$("#div_datacontent").html(response);$("#nextTrailLoadingImg").attr('style','display: none;');var moreFag=$("#moreFlag").val();if(moreFag=='inline'){$("#trailMoreLink").attr('style','display: inline;');}},failure:function(response)
{$("#nextTrailLoadingImg").attr('style','display:none;');var moreFag=$("#moreFlag").val();if(moreFag=='inline'){$("#trailMoreLink").attr('style','display: inline;');}
$("#div_datacontent").html(response);}});}
function fetchDrinkTrail(drinkType,drinkId,currentTrailCount){$("#trailMoreLink").attr('style','display: none;');$("#nextTrailLoadingImg").attr('style','display: inline;');if(drinkType=='category'){var getParam='?catid='+drinkId+'&currentPageLimit='+currentTrailCount+'&nextPageShow='+true;}
if(drinkType=='brand'){var getParam='?brandid='+drinkId+'&currentPageLimit='+currentTrailCount+'&nextPageShow='+true;}
var ajaxRequestUrl=$("#trailUrl").val()+getParam;$.ajax
({type:'GET',url:ajaxRequestUrl,success:function(response)
{$("#div_datacontent").html(response);$("#nextTrailLoadingImg").attr('style','display: none;');var moreFag=$("#drinkMoreFlag").val();if(moreFag=='inline'){$("#trailMoreLink").attr('style','display: inline;');}},failure:function(response)
{$("#nextTrailLoadingImg").attr('style','display:none;');var moreFag=$("#drinkMoreFlag").val();if(moreFag=='inline'){$("#trailMoreLink").attr('style','display: inline;');}
$("#div_datacontent").html(response);}});}
function deleteTrailItem(trailItemId,trailType,loggedInUserId,drinkId){$("#trail_item_"+trailItemId).fadeOut("slow");$.post("/userprofile/deletetrailitem",{trailid:trailItemId,trailtype:trailType,uid:loggedInUserId,drinkid:drinkId},function(data){JSONObject=eval("("+data+")");if("true"==JSONObject.status){}else{}});return false;}
