function postReview(a){error=false;jQuery("#typeError").html("");jQuery("#reviewError").html("");jQuery("#nameError").html("");jQuery("#securityError").html("");if(!jQuery("#frmReview input[@type=radio][@checked]").length){jQuery("#typeError").html("Recommendation is required.");error=true}if(jQuery("#review").val().replace(/^\s*|\s*$/g,"")==""){jQuery("#reviewError").html("<br>Review text is required.");error=true}if(jQuery("#name").val().replace(/^\s*|\s*$/g,"")==""&&!jQuery("#anonymous").attr("checked")){jQuery("#nameError").html("Name is required.");error=true}if(jQuery("#security_code").val().replace(/^\s*|\s*$/g,"")==""){jQuery("#securityError").html("Security code is required.");error=true}if(jQuery("#review").val().length>750){jQuery("#reviewError").html("<br>Maximum characters of review should be 750 characters");error=true}if(error==true){return false}showYess=jQuery("#frmReview input[@type=radio][@checked]").val();jQuery.getJSON("/components/reviews/post",jQuery("#frmReview").serialize(),function(b){if(b.success===false){jQuery("#zse-load-write-module").html(b.writeData)}else{updateReviews(showYess,jQuery("#venueId").val(),jQuery("#reviewModule").val(),1,a)}})}function updateReviews(c,e,d,a,b){jQuery.getJSON("/components/reviews/",{venueId:e,reviewModule:d,showYes:c,showConfirmation:a,subTab:b},function(f){jQuery("#zse-load-reviews-module").html(f.reviewData);if(a){jQuery("#zse-bookmark-icon").hide();jQuery("#zse-load-write-module").hide()}})}function getReviews(a){jQuery.ajax({type:"GET",url:"/components/reviews/show/"+a,success:displayReview})}function displayReview(a){jQuery("#zs_reviews_view").html(a);jQuery("#zs_reviews_view").show();jQuery("#reviews_view").hide()}function deleteReview(a){jQuery.ajax({type:"GET",url:"/components/reviews/delete/"+a,success:function(b){jQuery("#tr_"+b).hide()}})}function showReportAbuse(a){jQuery("#zs_reportAbuse"+a).show("normal")}function hideReportAbuse(c,b,a){if(!c){jQuery("#zs_reportAbuse"+a).hide();return true}if(jQuery("#"+a+"abuseTxt").val().replace(/^\s*|\s*$/g,"")==""){alert("Please enter reason");return}jQuery.ajax({type:"POST",url:"/venues/reportabuse/"+b+"/"+a,data:jQuery.serialize(),success:function(d){result=d;jQuery("#zs_reportAbuse"+result).hide()}})};function reportAbuse(c,g,b){var a="/"+c+"/reportabuse/"+g+"/"+b;if(c=="photos"){var a="/"+c+"/reportabuse/"+g}if(c=="events"){jQuery("#zs_postCommentDiv").hide();var e=jQuery("#zse-commentsCount").html();countParts=e.split("(");countPart=countParts[1].split(")");var d=parseInt(countPart[0])-1;var f=countParts[0]+"("+d+")"}jQuery.ajax({type:"POST",url:a,data:jQuery("form").serialize()+"&btnSubmit=1",success:function(h){if(h){jQuery("#TB_ajaxContent").html(h);jQuery("#zs_validation_err").show()}else{tb_remove();g=jQuery("#reviewId").val();jQuery("#tr_"+g).remove();if(c=="events"){jQuery("#zse-commentsCount").html(f)}content='<br><br><br><center><span class="zs_validation_err">Removed the review successfully!</span><br><a href="javascript:;" onClick="tb_remove();">Close</a></center>';jQuery("#TB_ajaxContent").html(content)}}})};