/* The global object JSON contains two methods. JSON.stringify(value) takes a JavaScript value and produces a JSON text. The value must not be cyclical. JSON.parse(text) takes a JSON text and produces a JavaScript value. It will throw a 'JSONError' exception if there is an error. */ var JSON = { /* Stringify a JavaScript value, producing a JSON text. */ stringify: function (v) { var a = []; /* Emit a string. */ function e(s) { a[a.length] = s; } /* Convert a value. */ function g(x) { var c, i, l, v; switch (typeof x) { case 'object': if (x) { if (x instanceof Array) { e('['); l = a.length; for (i = 0; i < x.length; i += 1) { v = x[i]; if (typeof v != 'undefined' && typeof v != 'function') { if (l < a.length) { e(','); } g(v); } } e(']'); return; } else if (typeof x.toString != 'undefined') { e('{'); l = a.length; for (i in x) { v = x[i]; if (x.hasOwnProperty(i) && typeof v != 'undefined' && typeof v != 'function') { if (l < a.length) { e(','); } g(i); e(':'); g(v); } } return e('}'); } } e('null'); return; case 'number': e(isFinite(x) ? +x : 'null'); return; case 'string': l = x.length; e('"'); for (i = 0; i < l; i += 1) { c = x.charAt(i); if (c >= ' ') { if (c == '\\' || c == '"') { e('\\'); } e(c); } else { switch (c) { case '\b': e('\\b'); break; case '\f': e('\\f'); break; case '\n': e('\\n'); break; case '\r': e('\\r'); break; case '\t': e('\\t'); break; default: c = c.charCodeAt(); e('\\u00' + Math.floor(c / 16).toString(16) + (c % 16).toString(16)); } } } e('"'); return; case 'boolean': e(String(x)); return; default: e('null'); return; } } g(v); return a.join(''); }, /* Parse a JSON text, producing a JavaScript value. */ parse: function (text) { return (/^(\s+|[,:{}\[\]]|"(\\["\\\/bfnrtu]|[^\x00-\x1f"\\]+)*"|-?\d+(\.\d*)?([eE][+-]?\d+)?|true|false|null)+$/.test(text)) && eval('(' + text + ')'); } }; // client-side agent implementation this_url = "/customerSupport.php"; function Agent() { this.debug = false; // default this.call = function () { var aa_sfunc = ""; var aa_cfunc = ""; var result = ""; var xmlHttpObject; if(arguments.length<3) { alert("Incorrect number of parameters. Please check your function call"); return; } aa_url=arguments[0]; aa_sfunc=arguments[1]; aa_cfunc=arguments[2]; if((aa_url==null)||(aa_url=="")) aa_url = this_url; var aa_poststr = "aa_afunc=call&aa_sfunc=" + encodeURI(aa_sfunc) + "&aa_cfunc=" + encodeURI(aa_cfunc); for(var i=3; i