var ajaxCount=0;function showProcessing(){ajaxCount++;$("#processing-div").fadeIn(500)}function hideProcessing(){if(ajaxCount>0){ajaxCount--}if(ajaxCount==0){$("#processing-div").fadeOut(500)}}$(document).ready(function(){$("#processing-div").ajaxStart(function(){showProcessing()});$("#processing-div").ajaxComplete(function(){hideProcessing()})});function createCell(B){var A=document.createElement("td");A.appendChild(B);return A}function createHref(B,E,D,C){var A=document.createElement("a");A.appendChild(D);A.href=B+E;if(C==undefined||C==false){A.target="_blank"}return A}function processJurisResponse(A){var B=document.getElementById("state-select").value;JURIS_MAPPING[B]=A;populateJurisSelect(JURIS_MAPPING[B])}function populateJurisSelect(F){var E=document.getElementById("juris-select");var A=E.options[0];E.options.length=0;E.options[0]=A;var D=$("#user-persistent-juris-id").attr("value");var C=false;for(var B=0;B<F.length;B++){E.options[(B+1)]=new Option(F[B].name+" ("+F[B].propCount+")",F[B].id);if(F[B].id==D){E.options[(B+1)].selected="selected";C=true}}if(C){populateBasedOnContext()}}function populateBasedOnContext(){retrieveProperties()}function retrieveJurisdictions(){var A=document.getElementById("state-select").value;if(A=="-9999"){return }window.location=getCtx()+"/search/properties/"+A+"/"}function processPropResponse(B,D,A){var C=document.getElementById("property-table").tBodies[0];C.innerHTML=B;$("#property-table").tablesorter()}function retrievePropertiesWithNum(E){var B=document.getElementById("juris-select");var D=B.value;if(D=="-9999"){return }var A="";if(E!=undefined&&E>new Number(1)){A="?page="+E}var F=$("#state-select").val().toUpperCase();var C=$("#juris-select").val();window.location=getCtx()+"/search/properties/"+F+"/"+C+"/"+A}function retrieveProperties(){retrievePropertiesWithNum(1)}function addDownload(C){var D=document.getElementById("gen-report-div");if(D==undefined){D=document.createElement("div");D.id="gen-report-div";var B=document.getElementById("property-search-form");B.appendChild(D);var A=document.createElement("a");A.id="gen-report-href";A.innerHTML="Download Listings Below (in MS Excel)";D.appendChild(A)}var A=document.getElementById("gen-report-href");A.href=getCtx()+"/auctionReport.html?jurisId="+C}function addSelectedResponse(A){if(A.msg!=undefined){alert(A.msg)}else{var B=$("#propertyCount");B.text(A.propertyCount);var C=$("#auctionCount");C.text(A.auctionCount);$("input[name='pid']:checked").attr("disabled","disabled");$("input[name='aid']:checked").attr("disabled","disabled")}}function saveSelectedProperties(){var A=$("#selection-form").serialize();$.post(getCtx()+"/addSelected.html?json=true&"+A,null,addSelectedResponse,"json")}function showBackground(){if(isIE()){$("#darkened-background").css("filter","alpha(opacity=60)")}$("#darkened-background").css("z-index","300").css("display","block").css("height",document.body.clientHeight+100+"px")}function isIE(){return navigator.appName.toLowerCase().indexOf("microsoft")>-1};
