function controllerProxy(n){var t=this;this.controllerURL=n;this.invoke=function(n,i,r,u){var f=JSON.stringify(i),e=t.controllerURL+n;$.ajax({url:e,data:f,type:"POST",processData:!1,contentType:"application/json",timeout:1e4,dataType:"text",async:!1,success:function(n){var t,i;if(r){if(t=$.parseJSON(n),!0){r(t);return}for(i in t){r(t[i]);break}}},error:function(n){if(u){if(n.responseText){var t=JSON.parse(n.responseText);t?u(t):u({Message:"Unknown server error."})}return}}})}}function GetCurrentPrice(n,t,i,r,u,f,e){PriceDeadManSwitch&&(PriceDeadManSwitch=!1,Proxy.invoke("GetCurrentPrice",{listingID:n},function(n){n!=null&&($(t).text(n.DisplayListingPrice),$(i).text(n.DisplayLocalPrice),$(r).text(n.DisplayListingIncrement),$(u).text(n.DisplayLocalIncrement),$(f).text(n.DisplayNextListingPrice),$(e).text(n.DisplayNextLocalPrice),PriceDeadManSwitch=!0)},function(n){window.alert(n)}))}function GetEndDTTM(n,t){Proxy.invoke("GetCurrentEndDTTM",{listingID:n},function(n){$(t).text(n)},function(n){window.alert(n)})}function GetCurrentTime(n){TimeDeadManSwitch&&(TimeDeadManSwitch=!1,Proxy.invoke("GetCurrentTime",{},function(t){$(n).text(t);TimeDeadManSwitch=!0},function(n){window.alert(n)}))}function EmailInvoice(n,t,i){Proxy.invoke("EmailInvoice",{template:n,invoiceID:t,recipient:i},function(){},function(n){window.alert(n)})}function AttemptBatchPayment(n){var t;return Proxy.invoke("AttemptBatchPayment",{invoiceID:n},function(n){t=n.toString()=="true"?!0:!1},function(n){window.alert(n)}),t}function DemandBatchProcessing(){Proxy.invoke("DemandBatchProcessing",{},function(){},function(n){window.alert(n)})}function ApplyDatePicker(n,t,i){t.length>0&&$.datepicker.regional[t]?n.datepicker($.datepicker.regional[t]):t.length>1&&$.datepicker.regional[t.substring(0,2)]?n.datepicker($.datepicker.regional[t.substring(0,2)]):$.datepicker.regional[i]?n.datepicker($.datepicker.regional[i]):n.datepicker($.datepicker.regional[i.substring(0,2)])}var JSON,Proxy,PriceDeadManSwitch,TimeDeadManSwitch;JSON||(JSON={}),function(){"use strict";function i(n){return n<10?"0"+n:n}function f(n){return o.lastIndex=0,o.test(n)?'"'+n.replace(o,function(n){var t=s[n];return typeof t=="string"?t:"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+n+'"'}function r(i,e){var s,l,h,a,v=n,c,o=e[i];o&&typeof o=="object"&&typeof o.toJSON=="function"&&(o=o.toJSON(i));typeof t=="function"&&(o=t.call(e,i,o));switch(typeof o){case"string":return f(o);case"number":return isFinite(o)?String(o):"null";case"boolean":case"null":return String(o);case"object":if(!o)return"null";if(n+=u,c=[],Object.prototype.toString.apply(o)==="[object Array]"){for(a=o.length,s=0;s<a;s+=1)c[s]=r(s,o)||"null";return h=c.length===0?"[]":n?"[\n"+n+c.join(",\n"+n)+"\n"+v+"]":"["+c.join(",")+"]",n=v,h}if(t&&typeof t=="object")for(a=t.length,s=0;s<a;s+=1)typeof t[s]=="string"&&(l=t[s],h=r(l,o),h&&c.push(f(l)+(n?": ":":")+h));else for(l in o)Object.prototype.hasOwnProperty.call(o,l)&&(h=r(l,o),h&&c.push(f(l)+(n?": ":":")+h));return h=c.length===0?"{}":n?"{\n"+n+c.join(",\n"+n)+"\n"+v+"}":"{"+c.join(",")+"}",n=v,h}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+i(this.getUTCMonth()+1)+"-"+i(this.getUTCDate())+"T"+i(this.getUTCHours())+":"+i(this.getUTCMinutes())+":"+i(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var e=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n,u,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},t;typeof JSON.stringify!="function"&&(JSON.stringify=function(i,f,e){var o;if(n="",u="",typeof e=="number")for(o=0;o<e;o+=1)u+=" ";else typeof e=="string"&&(u=e);if(t=f,f&&typeof f!="function"&&(typeof f!="object"||typeof f.length!="number"))throw new Error("JSON.stringify");return r("",{"":i})});typeof JSON.parse!="function"&&(JSON.parse=function(n,t){function r(n,i){var f,e,u=n[i];if(u&&typeof u=="object")for(f in u)Object.prototype.hasOwnProperty.call(u,f)&&(e=r(u,f),e!==undefined?u[f]=e:delete u[f]);return t.call(n,i,u)}var i;if(n=String(n),e.lastIndex=0,e.test(n)&&(n=n.replace(e,function(n){return"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(n.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return i=eval("("+n+")"),typeof t=="function"?r({"":i},""):i;throw new SyntaxError("JSON.parse");})}();$.url=function(n){return $("base").attr("href")+n};Proxy=new controllerProxy($.url("RealTime/"));PriceDeadManSwitch=!0;TimeDeadManSwitch=!0;$.htmlDecode=function(){function t(t){return t&&typeof t=="string"&&(t=t.replace(/<script[^>]*>([\S\s]*?)<\/script>/gmi,""),t=t.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gmi,""),n.innerHTML=t,t=n.textContent,n.textContent=""),t}var n=document.createElement("div");return t}()