function lookupInstallation(){var u=$("#FindInstallation"),f=$("#ReviewDetails"),i=$("#MCSCertificateNumber").val(),r=$("#Postcode").val(),e=$("#DisplayMCSCertificate"),o=$("#DisplayTechnologyType"),s=$("#MCSTechnologyTypeID"),h=$("#CommissioningDate"),c=$("#DisplayInstallationDate"),l=$("#DisplayInstaller"),a=$("#InstallerID"),t=$("#InputError"),n=$("#LookupError");n.hide();t.hide();i.length==0||r.length==0?t.show():(t.hide(),postGenericAjaxObjectAndCallBack("/Review/JSON_InstallationDetails",{mcsCertificateNumber:i,installationPostcode:r},function(t){t.installation.InstallationFound==!0?t.installation.InstallerFound==!0?t.installation.PostcodeMatches==!0?(e.html(t.installation.MCSCertificate),o.html(t.installation.TechnologyDescription),c.html(t.installation.InstallationDate),l.html(t.installation.InstallerName),a.val(t.installation.InstallerID),s.val(t.installation.MCSTechnologyTypeID),h.val(t.installation.InstallationDate),u.hide(),f.show(),n.hide(),$('[class*="validation-summary"]').removeClass("")):(n.html(t.installation.ErrorMessage),n.show()):(n.html(t.installation.ErrorMessage),n.show()):(n.html(t.installation.ErrorMessage),n.show())}))}function changeInstallation(){var n=$("#FindInstallation"),t=$("#ReviewDetails");n.show();t.hide()}function deleteReview(n,t,i){customConfirm("Are you sure you wish to delete this review? You will not be able to retrieve this text later if you do so.",function(){postGenericAjaxObjectAndCallBack("/Review/JSON_DeleteReview",{reviewHeaderIDEnc:t},function(n){if(n!=null&&n.data!=null&&n.data.FormResult==0){var t=$("#review_"+i);$(t).remove()}})})}function reportReview(n){var t={reviewID:n};openAJAXModal("/Shared/_ReportReview",t,"ReportReviewModal","modReportReview")}