var NicArConnector = ObjClass.extend({
	callbackFunction: null,
	init: function(conf)
	{
		this.callbackFunction = conf.callbackFunction;
	},
	// getQuery: function(name)
	// {
			// return 'use "http://www.miguelgalante.com.ar/nicar/nicar.xml" as nicar;' + 
				// 'select * from nicar where domainname="' + name +'"';
	// },
	doRequest:function(request)
	{
		console.log("starting ajax");
		var $this = this;
		$.ajax({
			// url:"http://query.yahooapis.com/v1/public/yql",
			// dataType: "jsonp",
			// data:{	q: $this.getQuery(request.name), format: "json", diagnostics: true}
			url: "dopost.php",
			dataType: "text",
			data: {"domainname": request.name},
			type: "get",
			success: function(data)
			{
				console.log(data);
				// var disp = "-2";
				// if(data.query && data.query.results && data.query.results.result && data.query.results.result.disp != undefined)
				// {
					// disp = data.query.results.result.disp;
				// }
				var disp = (""+data).match("[-]*[0-9]") ? ""+data : "-2";
				$this.callbackFunction({"disp":disp,"name":request.name});
			},
			timeout: Settings.ajaxTimeout,
			error: function()
			{
				$this.callbackFunction({"disp":"-2","name":request.name});
			}
		});
	}
});
