function vote(e,t,n){n?document.location="/signup/index.html?attempt=vote":$.get(handler,{method:"vote",id:e,d:t},function(n){if(n)if(n.error)alert(n.error);else{var o=new Array("Down","Up"),a=e+"-vote"+o[t],i=-1!==ID(a).src.search("2"),r=1-t,s=-1!==ID(e+"-vote"+o[r]).src.search("2");0==t&&(t=-1),s&&(ID(e+"-votes").innerHTML=forceNumber(ID(e+"-votes").innerHTML)+forceNumber(t)),ID(a).src=i?ID(a).src.replace("2","1"):ID(a).src.replace("1","2"),ID(e+"-vote"+o[r]).src=ID(e+"-vote"+o[r]).src.replace("2","1"),ID(e+"-votes").innerHTML=forceNumber(ID(e+"-votes").innerHTML)+forceNumber(t)*(-1===ID(a).src.search("2")?-1:1)}else alert("There was no response from the server.")})}function updateTip(e){if(0==e)var t=" ";else if(1==e)t="Tie problems and solutions in society to the law, court cases, articles, and organizations.";else if(2==e)t="Investigate the law and how it relates to court cases and societal issues.";else if(3==e)t="View over 16 million court and agency dockets, documents and opinions free of charge.";else if(4==e)t="Access additional features for attorneys, including data analytics, with PlainSite Pro.";else if(5==e)t="Create useful neighborhood reports for prospective home buyers.";else if(6==e)t="Access additional features for pro se litigants, including helpful guides, with PlainSite Pro Se.";else if(7==e)t="Read about government, the law, and how it affects you.";else if(8==e)t="Investigate law firms, attorneys, their clients, and job opportunties.";else if(9==e)t="Investigate companies, non-profits and PACs, their donations, and their legal histories.";ID("tip").innerHTML=t}function follow(e,t,n){$.get(handler,{method:"follow",linktable:t,linkid:n},function(t){t.error?alert(t.error):-1!=e.src.indexOf(1)?(e.src=e.src.replace(1,2),e.title="Followed"):(e.src=e.src.replace(2,1),e.title="Click to Follow")})}function toggleAttorneyTable(e){var t="attorneys"+e;"block"==ID(t).style.display||""==ID(t).style.display?(ID("toggleSwitch"+e).innerHTML="▶",hideID(t)):(ID("toggleSwitch"+e).innerHTML="▼",showID(t))}function noteFiler(e,t,n,o){$.get(handler,{method:"noteFiler",partyid:o,entryid:n},function(n){n.error?alert(n.error):""==e.style.backgroundColor?e.style.backgroundColor=t:e.style.backgroundColor=""})}function saveComment(e,t,n){$.get(handler,{method:"saveComment",linktable:e,linkid:t,memo:document.forms["comment"+n].elements["comment"+n].value},function(e){e?e.error?alert(e.error):ID("commentBox"+n).innerHTML=e.html:alert("There was no response from the server.")})}function saveCaseSummary(e){$.post(handler,{method:"saveCaseSummary",docketid:e,status:document.forms.summary.elements.status.value,summary:document.forms.summary.elements.summary.value},function(e){e?e.error?alert(e.error):(ID("caseSummary").innerHTML=document.forms.summary.elements.summary.value.replace(/(\r\n|\n|\r)/gm,"
\n"),hideID("caseSummaryDetails"),showID("caseSummaryLabel")):alert("There was no response from the server.")})}function requestDocument(e,t){ID("requestNotice"+t).innerHTML='Loading Requesting...',ID("requestNotice"+t).style.cssText="padding-right: 16px;",$.get(handler,{method:"requestDocument",entryid:e},function(e){e?e.error?alert(e.error):(alert(e.message),hideID("requestNotice"+t)):alert("There was no response from the server.")})}function showUploadEntry(e,t,n,o){box=ID(e).children[1];var a='
\n\n';a+='\n',a+='\n',a+='\n',o&&(a+='\n',a+='\n'),a+='SpaceUpload\n\n",a+="
",box.innerHTML=a,showTR(e)}function uploadEntry(e,t,n){if(document.forms["upload"+n].elements["file"+n].files.length){var o=ID("icon"+n).src;ID("icon"+n).src="http://s.thinklink.com/images/loading2.gif";var a=new FormData(document.forms["upload"+n]);$.ajax({type:"POST",url:handler+"?method=uploadDocketFile",data:a,processData:!1,contentType:!1,success:function(e){if(e)if(e.error)alert(e.error),ID("icon"+n).src=o;else{if(e.attachments){for(var t=0;tAttachment '+a+""}ID("icon"+n).src=o,1!=e.attachments||isNaN(ID("attachmentnumber"+n).value+0)||ID("attachmentnumber"+n).value++}else e.entryid&&(ID("icon"+n).src=shared+"icons/pdf.gif",ID("iconLink"+n).href="/dockets/download.html?id="+e.entryid+"&z="+e.hash,ID("textLink"+n).href="/dockets/download.html?id="+e.entryid+"&z="+e.hash,e.requests&&(ID("flag"+n).src=ID("flag"+n).src.replace("_red","_green")));ID("file"+n).value=""}else alert("There was no response from the server."),ID("icon"+n).src=o},error:function(e){alert(e),ID("icon"+n).src=o}})}else alert("Please choose a file to upload.")}function setEntryStatus(e,t,n){$.get(handler,{method:"setEntryStatus",entryid:e,status:t},function(e){e?e.error?alert(e.error):n.parentNode.parentNode.previousElementSibling.previousElementSibling.children[0].innerHTML=n.outerHTML:alert("There was no response from the server.")})}function refreshIssues(e,t){for(var n=0;n

\n\n"),n+="

\n",n+=t.detail+"

\n\n",ID("clause").innerHTML=n,e||(document.forms.issues.elements.statuteid.value=t.statuteid,document.forms.issues.elements.editheading.value=t.heading,document.forms.issues.elements.editdetail.value=t.ascii)}})}function jumpToStatute(){var e={method:"getClause",corpusid:document.forms.jumper.elements.corpusid.value,title:ID("title").value,section:ID("section").value};$.get(handler,e,function(e){e.error?alert(e.error):document.location="index.html?id="+e.statuteid})}function switchIssueLawView(e){hideID("current"),hideID("changes"),hideID("proposed"),showID(e),"current"==e?(ID("detail").style.backgroundColor="#F0F0FF",ID("law").innerHTML="Current Law"):"changes"==e?(ID("detail").style.backgroundColor="#F0F0F0",ID("law").innerHTML="Changes"):"proposed"==e&&(ID("detail").style.backgroundColor="#F0FFF0",ID("law").innerHTML="Proposed Law")}function postNews(e){var t={method:"postNews",issueid:e,title:ID("newstitle").value,hyperlink:ID("newslink").value};$.get(handler,t,function(t){if(t.error)alert(t.error);else{var n='

\n';n+=''+ID("newstitle").value+"

\n\n",ID("news").innerHTML+=n,showTR("newsRow"),e||(document.forms[0].elements.statuteid.value=t.statuteid)}})}function postEntity(e,t){var n={method:"postEntity",linktable:e,linkid:t,entityid:document.forms[e].elements.entityid.value,role:null!=ID("entityrole")?ID("entityrole").value:"-1"};$.get(handler,n,function(n){n.error?alert(n.error):n.html&&(ID("entities").innerHTML+=n.html,t||"issues"!=e||(document.forms[0].elements.statuteid.value=n.statuteid))})}function linkEntityPeople(e,t,n){var o={method:"linkEntityPeople",parentid:t,childid:ID("entityid").value,role:ID("entityrole").value};$.get(handler,o,function(t){if(t.error)alert(t.error);else{var n='

\n';n+=''+ID("entityidDisplay").value+"

\n\n",ID("entities").innerHTML+=n}})}function postCourtCase(e){var t={method:"postCourtCase",issueid:e,docketid:ID("docketid").value};$.get(handler,t,function(e){if(e.error)alert(e.error);else{var t='

\n';t+=ID("docketidDisplay").value+"

\n\n",ID("cases").innerHTML+=t,showTR("casesRow")}})}function updateDivider1(e){1!=e.value?2!=e.value?ID("divider1").innerHTML="Title":ID("divider1").innerHTML="Amendment":ID("divider1").innerHTML="Article"}function whichLaw(e){0==e?(hideTR("lawpicker"),hideTR("editinstructions"),hideTR("editheading"),hideTR("editdetail"),ID("clause").innerHTML="",ID("clause").className=""):(showTR("lawpicker"),document.forms.issues.elements.next[2].checked&&(showTR("editinstructions"),showTR("editheading"),showTR("editdetail")))}function thirdPartySolution(){hideTR("solution"),hideTR("solutionexample"),hideTR("solutiondetail"),hideTR("solutioninstructions"),hideTR("solutionanonymous"),hideTR("solutiondiv"),hideTR("editinstructions"),hideTR("editheading"),hideTR("editdetail"),ID("existingsolution").style.display="none"}function getSolutions(){hideTR("solution"),hideTR("solutionexample"),hideTR("solutiondetail"),hideTR("solutioninstructions"),hideTR("solutionanonymous"),hideTR("solutiondiv"),hideTR("editinstructions"),hideTR("editheading"),hideTR("editdetail"),ID("existingsolution").style.display=""}function mySolution(){showTR("solution"),showTR("solutionexample"),showTR("solutiondetail"),showTR("solutioninstructions"),showTR("solutionanonymous"),showTR("solutiondiv"),document.forms.issues.elements.whichlaw[1].checked&&(showTR("editinstructions"),showTR("editheading"),showTR("editdetail")),ID("existingsolution").style.display="none"}function setScope(e,t){hideID("country"),hideID("stateprovince"),hideID("postalcode"),t&&hideID("entityid"),0==e?(ID("scopeLabel").children[0].innerHTML="Country",showID("country"),showTR("whichlawQuestionRow"),showTR("whichlawRow"),document.forms[0].elements.whichlaw[1].checked&&showTR("lawpicker")):1==e?(ID("scopeLabel").children[0].innerHTML="State / Province",showID("stateprovince"),showTR("whichlawQuestionRow"),showTR("whichlawRow"),document.forms[0].elements.whichlaw[1].checked&&showTR("lawpicker")):2==e?(ID("scopeLabel").children[0].innerHTML="Postal Code",showID("postalcode"),showTR("whichlawQuestionRow"),showTR("whichlawRow"),document.forms[0].elements.whichlaw[1].checked&&showTR("lawpicker")):t&&3==e&&(ID("scopeLabel").children[0].innerHTML="Organization",showID("entityid"),hideTR("whichlawQuestionRow"),hideTR("whichlawRow"),document.forms[0].elements.whichlaw[1].checked&&hideTR("lawpicker"),document.forms[0].elements.whichlaw[0].checked=!0)}function selectTopSearch(e){if(!e||!e.type||!e.id)return!1;switch(e.type){case"tags":window.location=e.link;break;case"problems":case"solutions":window.location="/issues/index.html?id="+e.id;break;case"statutes":window.location="/laws/index.html?id="+e.id;break;case"dockets":case"judges":case"attorneys":case"entities":window.location=e.link;break;case"patentapplications":window.location="/patents/application.html?id="+e.id;break;case"trademarkapplications":window.location="/trademarks/application.html?id="+e.id;break;case"diagrams":window.location="/pro/diagrams/draw.html?focus="+e.id+"&level=1";break;case"homemap":window.location="/homemap/report.html?id="+e.id;break;case"notice":window.location=e.link;break;case"request":window.location="/control/requests.html?id="+e.id;break;default:window.location="/"+e.type+"/index.html?id="+e.id}}function linkEntities(e,t,n,o){var a='';a+='',a+=''+e.value.replace(" "," ")+"",a+='Delete',a+="",ID("tagResults").innerHTML+=a,ID("tag").value="",$.get(handler,{method:"linkEntities",parentid:document.forms[0].elements.id.value,childid:e.id},function(e){e.error?alert(e.error):e.connectionid?alert("Thanks! As soon as an administrator confirms your link it will appear on PlainSite."):alert("There was a problem adding your link.")})}function proContent(e){$.get(handler,{method:"proContent",module:e},function(e){e.error?alert(e.error):(ID("proContent").vAlign="top",ID("proContent").innerHTML=e.html,$("#proContent input.auto-complete").autoComplete({ajax:shared+"javascript/handler.js",minChars:2,postVar:"q",maxItems:10,delay:200,preventEnterSubmit:!0}))})}function setAttorneyContactID(e){$.get(handler,{method:"setAttorneyContactID",attorneyid:e},function(e){e.error?alert(e.error):proContent("cases")})}function filterDocket(e){for(var t=ID("numberEntries").value,n=0;n','\t','\t','\t','\t','\t','\t','\t','\t','\t','\t','\t',"\t\x3c!--if !IE>--\x3e",'\t','\t\t','\t\t','\t\t','\t\t','\t\t','\t\t','\t\t','\t\t','\t\t','\t\t','\t\t',"\t\x3c!--','\t\t\tGet Adobe Flash player',"\t\t","\t\x3c!--if !IE>--\x3e","\t","\t\x3c!--"].join("\n")}