function DoCareerSearch(D){var B=D.zipcode.value;var A=D.searchradius[D.searchradius.selectedIndex].value;if(B==""){SetInnerHtml("officesearchresults","<i>Please enter your zip code to find local offices that are in, or serve, your area.</i>");return }onChange="DoCareerSearch(this.form);";var C=obj("officesearchresults");SetInnerHtml("officesearchresults",'<div style="border:1px solid #4f779e;padding:4px;background:#eee;"><img src="/images/search/loading.gif" alt="loading..."> Locating your local offices...</div>');
var E="/ajaxservlet/search/officesearch?rpp=50&z="+escape(B)+"&r="+A;g_CyberAjaxQueue.schedule("officesearch",E,onCompleteCareerSearch,onErrorCareerSearch,true,true,null)}function onCompleteCareerSearch(F){var D="";try{var E=F.responseXML.getElementsByTagName("officesearchresults");if(!E||E.length!=1){onErrorCareerSearch(F);return }var B=E[0];var C=B.getElementsByTagName("office");if(C&&C.length>=1){var D='<table class="datatable" width="100%" style="font-size:0.9em">';for(var A=0;A<C.length;A++){strClass="odd";
if((A%2)==0){strClass="even"}officekey=CyberGetNodeValue(C[A],"officekey");officename=CyberGetNodeValue(C[A],"officename");address=CyberGetNodeValue(C[A],"address");city=CyberGetNodeValue(C[A],"city");state=CyberGetNodeValue(C[A],"state");zipcode=CyberGetNodeValue(C[A],"zipcode");phonenumber=CyberGetNodeValue(C[A],"phonenumber");weburl=CyberGetNodeValue(C[A],"weburl");D+="<tr>";D+='<td class="'+strClass+'"><input type=checkbox name="officekey" value="'+officekey+'"></td>';D+='<td class="'+strClass+'">'+officename+"</td>";
D+='<td class="'+strClass+'">'+address+"</td>";D+='<td class="'+strClass+'">'+city+", "+state+" "+zipcode+"</td>";D+='<td class="'+strClass+'">'+phonenumber+"</td>";D+="</tr>"}D+="</table>";SetInnerHtml("officesearchresults",D)}else{SetInnerHtml("officesearchresults",'<div style="border:1px solid #cc0000;padding:4px;background:#eee;"><b>No offices serving your selected area</b><br>There are currently no ERA offices near or that serve in this zip code with the radius that is specified. Please try your search again with a different zip code or radius range to view a list of offices. You may choose to click the "Submit" button, which will send your information directly to ERA corporate headquarters instead of to a specific office. If you have any questions, please contact the ERA Referrals Center at 1-800-798-8900. </div>')
}}catch(G){alert(G.message)}}function onErrorCareerSearch(A){SetInnerHtml("officesearchresults",'<div style="border:1px solid #cc0000;padding:4px;background:#eee;"><b>Could not complete office search'+A.responseText+"</b></div>")};