$(document).ready(function(){$("body").ajaxError(function(a,b){$(this).append('<div class="log" style="background-color: red;border: 1px solid #FF0101;border-radius: 5px 5px 5px 5px;color: #FFFFFF;font-size: 12px;min-height: 200px;margin-right: 30px;margin-top: 5px;padding: 10px;position: fixed;right: 0;top: 0;width: 290px;"><div class="error-container"></div><div class="action-error-dialog"><a href="javascript:void(0);" id="closeDialogError">Close</a></div></div>');var i=b.responseText;$("div.error-container").html(i);
$("#closeDialogError").click(function(){$(".log").remove()})})});var JSON;JSON||(JSON={});
(function(){function a(f){return 10>f?"0"+f:f}function b(f){l.lastIndex=0;return l.test(f)?'"'+f.replace(l,function(f){var d=p[f];return"string"===typeof d?d:"\\u"+("0000"+f.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+f+'"'}function i(f,a){var d,e,m,h,o=c,j,g=a[f];g&&"object"===typeof g&&"function"===typeof g.toJSON&&(g=g.toJSON(f));"function"===typeof n&&(g=n.call(a,f,g));switch(typeof g){case "string":return b(g);case "number":return isFinite(g)?""+g:"null";case "boolean":case "null":return""+
g;case "object":if(!g)return"null";c+=k;j=[];if("[object Array]"===Object.prototype.toString.apply(g)){h=g.length;for(d=0;d<h;d+=1)j[d]=i(d,g)||"null";m=0===j.length?"[]":c?"[\n"+c+j.join(",\n"+c)+"\n"+o+"]":"["+j.join(",")+"]";c=o;return m}if(n&&"object"===typeof n){h=n.length;for(d=0;d<h;d+=1)"string"===typeof n[d]&&(e=n[d],(m=i(e,g))&&j.push(b(e)+(c?": ":":")+m))}else for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(m=i(e,g))&&j.push(b(e)+(c?": ":":")+m);m=0===j.length?"{}":c?"{\n"+c+j.join(",\n"+
c)+"\n"+o+"}":"{"+j.join(",")+"}";c=o;return m}}if("function"!==typeof Date.prototype.toJSON)Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()};var h=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
l=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,c,k,p={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},n;if("function"!==typeof JSON.stringify)JSON.stringify=function(f,a,d){var e;k=c="";if("number"===typeof d)for(e=0;e<d;e+=1)k+=" ";else"string"===typeof d&&(k=d);if((n=a)&&"function"!==typeof a&&("object"!==typeof a||"number"!==typeof a.length))throw Error("JSON.stringify");return i("",
{"":f})};if("function"!==typeof JSON.parse)JSON.parse=function(a,c){function d(a,e){var f,b,g=a[e];if(g&&"object"===typeof g)for(f in g)Object.prototype.hasOwnProperty.call(g,f)&&(b=d(g,f),void 0!==b?g[f]=b:delete g[f]);return c.call(a,e,g)}var e,a=""+a;h.lastIndex=0;h.test(a)&&(a=a.replace(h,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof c?d({"":e},""):e;throw new SyntaxError("JSON.parse");}})();var xajax={explode:function(a,b){var i={"0":""};if(2!=arguments.length||"undefined"==typeof arguments[0]||"undefined"==typeof arguments[1])return null;if(""===a||!1===a||null===a)return!1;if("function"==typeof a||"object"==typeof a||"function"==typeof b||"object"==typeof b)return i;!0===a&&(a="1");return b.toString().split(a.toString())}};
function isObjectType(a,b){return!(!a||!b||!(b.prototype&&a.constructor==b.prototype.constructor))}
xajax.request=function(a,b,i){var a=a.fun,i=i.controller,b=b.parameters,h="",l;for(l in b)var c=b[l],c="object"==typeof c?JSON.stringify(c):c,h=h+"<xarg>"+c+"</xarg>";if(""==h){l=b.length;for(var k=0;k<l;k++)c=b[k],c="object"==typeof c?JSON.stringify(c):c,h=h+"<xarg>"+c+"</xarg>"}$.post(accessUrl+i+"/",{xarg:h,xcont:i,xfun:a},function(){},"json").success(function(a){for(var c in a){response=!0;if("error"==c)return a[c]-0==a[c]&&0<a[c].length?show_error_status(a[c]):alert(a[c]),!1;var f=a[c],b;for(b in f){"script"==
b&&eval(f[b]);if("assign"==b){var d=f[b],e;for(e in d)$("#"+e).html(d[e])}if("redirect"==b)return parent.location.href=f[b],!1;if("append"==b)for(e in d=f[b],d)$("#"+e).append(d[e]);if("prepend"==b)for(e in d=f[b],d)$("#"+e).prepend(d[e]);if("after"==b)for(e in d=f[b],d)$("#"+e).after(d[e])}}})};xajax.getFormValue=function(a){return $("#"+a).serializeArray()};
