*
*/
-function xhr(type,url,data,cb) {
+function xhr(type,url,data,cb,cberr) {
var ao={
url: url,
type: type,
cb(ret);
}
};
+ if(cberr!==undefined) {
+ ao.error=function(xhr,stat,err) {
+ cberr(xhr,stat,err);
+ };
+ };
if((data!==undefined)&&(data!==null)) {
if(typeof data != "string")
ao.data=JSON.stringify(data);