;(function(){
	var AS = YAHOO.ARISoft,
		ASC = AS.SmartContent;

	ASC.validators.isSettingsNameUnique = AS.core.createDerivedClass(
		YAHOO.ARISoft.validators.asyncValidator, {
			prepare: function() {
				var PM = AS.page.pageManager,
					id = 0;
				
				var el = YAHOO.util.Dom.get(this.section + "Id");
				if (el)
					id = el.value;

				this.url = PM.adminBaseUrl + "index.php?option=com_arismartcontent&view=" + YAHOO.ARISoft.page.viewName + "&task=ajaxIsNameUnique";
				this.postData = "name=" + this.getValue() + "&id=" + id;
			}
		}
	);
})();