var RemoteScriptingCall,ShowRemoteScriptingMsg;if(window.jQuery){(function(f){var d=this,b=d.PAGE_AjaxQueueName||"jQCompatLegacyCallsQueue",c,a,e;e=function(h,j,g){var i=[];i.push('<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">');i.push("<soap:Body>");i.push("<"+j+' xmlns="'+h+'">');i.push("<docRequest><WebServiceRequest>");i.push('<PFRequestInfo SessionGUID="'+(d.LN_UD!==null?d.LN_UD.sg:"")+'"><Site SiteID="'+(d.LN_SIF!==null?d.LN_SIF.sid:"1")+'"/></PFRequestInfo>');i.push(g);i.push("</WebServiceRequest></docRequest>");i.push("</"+j+">");i.push("</soap:Body></soap:Envelope>");return i.join("")};d.RemoteScriptingCall=function(g,n,p,o,k,i,m,j,r,h){var q=null;var l=o+g+"/"+p;f.ajaxQ.add(b,{url:g+"?op="+p,processData:false,data:e(o,p,n),dataType:"xml",contentType:"text/xml;charset=utf-8",success:c,error:function(s,w,u){if(u===undefined){var v=(!s||typeof s.responseText==="unknown")?"":s.responseText;if(v.indexOf("Message")!==-1){var t=d["eval"]("("+v+")")}else{}}else{}}})};d.ShowRemoteScriptingMsg=function(m,q,l,h){try{try{var k=document.getElementById(l);k.innerHTML=q;if(h){var i=0,j=0;if(typeof(d.innerWidth)==="number"){i=d.innerWidth;j=d.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){i=document.documentElement.clientWidth;j=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){i=document.body.clientWidth;j=document.body.clientHeight}}}var g=parseInt(k.style.width.replace("px",""),10);var o=parseInt(k.style.height.replace("px",""),10);k.style.left=(i-g)/2;k.style.top=(j-o)/2;k.style.display="block"}else{k.style.display="inline"}}catch(p){}setTimeout(m,20)}catch(n){}};d.HideRemoteScriptingMsg=function(g){try{f("#StateMessage").hide()}catch(h){}};a=function(g){if(g!==null){if(g.options.length>0){if(g.options[0].value===""){g.options.length=1}else{g.options.length=0}}}};c=function(i,h){var g=f(i).find("State");var k=new Option("-- All States --","");var j=f("#EmailAlertStateDropDownList")[0];if(g.length>0){if(f(g[0]).attr("CountryCd")!=="US"){k=new Option("-- All Provinces --","")}if(j.options.length>0){j.options[0]=k}f(g).each(function(){var l=new Option(f(this).attr("StateProvName"),f(this).attr("StateProvCode"));j.options[j.options.length]=l})}d.HideRemoteScriptingMsg(h)};d.GetStatesForCountry_NewAjax=function(j,p,i,q,l,k,g){var h=null;a(p);a(q);a(l);a(k);a(g);if(i===""){var o=new Option("-- All States --","");if(p.options.length>0){p.options[0]=o}d.HideRemoteScriptingMsg(j);return}var n='<PFRequestData><Country CountryCode="'+i+'"/></PFRequestData>';var r=i;var m;if(q!==null){m=this.RemoteScriptingCall("/xNet/MainSite/WebServices/Address/Geolookup.asmx",n,"GetStatesForCountryWithMsas","http://www.loopnet.com/WebServices","PFResponseInfo",this.fPopulateStates,j)}else{m=this.RemoteScriptingCall("/xNet/MainSite/WebServices/Address/Geolookup.asmx",n,"GetStatesForCountry","http://www.loopnet.com/WebServices","StateList",this.fPopulateStates,j)}return}})(jQuery)};
