/* ajax调用封装 */
function AjaxComponent(url,parameters,process){
	this.url = url;
	this.parameters = parameters;
	this.process = process;
	
	this.onload = process.onload || this.onload ;
	onload.arguments ? this.onload.apply(this,onload.arguments):this.onload.apply(this);
	this.onsuccess = process.onsuccess || this.onsuccess;
	$.ajax({url: this.url,type: "POST",data:this.parameters,complete:this.oncomplete ,success:this.onsuccess,error:this.onerror});
}

AjaxComponent.prototype={
	onload:function(){
		alert("[ERROR]请定义onload函数！");
	},
	onsuccess:function(){
		alert("[ERROR]请定义onsuccess");
	},
	oncomplete:function(){
		
	},
	onerror:function(){
		alert("[ERROR]请求发生错误！");
	},
	defaultOnsuccess:function(){
		
	}
}
function ajaxeval(responseText){
	return eval("("+responseText+")");
}