if (typeof JSON !== "object")document.write(""); var Article = {GetPhoto : function(id){ return this.ajax("GetPhoto", {id : id} ,this.getCallback(arguments, 1)); },Get_art : function(id){ return this.ajax("Get_art", {id : id} ,this.getCallback(arguments, 1)); },Query : function(pageSize, curPage, ver, classid){ return this.ajax("Query", {pageSize : pageSize, curPage : curPage, ver : ver, classid : classid} ,this.getCallback(arguments, 4)); },QueryList : function(pageSize, curPage, ver, classid){ return this.ajax("QueryList", {pageSize : pageSize, curPage : curPage, ver : ver, classid : classid} ,this.getCallback(arguments, 4)); },Search : function(classid, pageSize, curPage, keyword){ return this.ajax("Search", {classid : classid, pageSize : pageSize, curPage : curPage, keyword : keyword} ,this.getCallback(arguments, 4)); },SearchLan : function(classid, ver, pageSize, curPage, keyword){ return this.ajax("SearchLan", {classid : classid, ver : ver, pageSize : pageSize, curPage : curPage, keyword : keyword} ,this.getCallback(arguments, 5)); },UpdateField : function(id, field, value){ return this.ajax("UpdateField", {id : id, field : field, value : value} ,this.getCallback(arguments, 3)); },CacheModel : function(model){ return this.ajax("CacheModel", {model : model} ,this.getCallback(arguments, 1)); },CreateAllHtml : function(classid, ver){ return this.ajax("CreateAllHtml", {classid : classid, ver : ver} ,this.getCallback(arguments, 2)); },CreateListHtml : function(classid, ver){ return this.ajax("CreateListHtml", {classid : classid, ver : ver} ,this.getCallback(arguments, 2)); },CreateDetailHtml : function(classid, ver){ return this.ajax("CreateDetailHtml", {classid : classid, ver : ver} ,this.getCallback(arguments, 2)); },CreateSelectHtml : function(classid, ids, ver){ return this.ajax("CreateSelectHtml", {classid : classid, ids : ids, ver : ver} ,this.getCallback(arguments, 3)); },Add : function(model){ return this.ajax("Add", {model : model} ,this.getCallback(arguments, 1)); },Update : function(model){ return this.ajax("Update", {model : model} ,this.getCallback(arguments, 1)); },Delete : function(Id){ return this.ajax("Delete", {Id : Id} ,this.getCallback(arguments, 1)); },Deletes : function(ids){ return this.ajax("Deletes", {ids : ids} ,this.getCallback(arguments, 1)); },setDate : function (a) { if(a != null && typeof a == 'object') { for (var i in a) a[i] = this.setDate(a[i]) } return a = a instanceof Date ? '"\\/Date(' + a.getTime() + ')\\/"' : a}, getCallback : function(a, b){ return b < a.length ? a[b] : undefined},ajax: function (a, b, c){var j = JSON.stringify(this.setDate(b)); var d = { contentType:'text/plain', beforeSend : function(x){ x.setRequestHeader('method', a) }, async : true, url : this.u, type : 'POST', dataType : 'json', data : j, success:function(e){ typeof c == 'function' && c(e) } }; if(typeof c != 'function'){ d.async = false; return JSON.parse(jQuery.ajax(d).responseText) } else jQuery.ajax(d) }, u: '/ajax/Article.ashx'};