define([
		"chy/_base/_ValidateMixin",
		"dojo/_base/declare",
		"dijit/form/CurrencyTextBox"
	], function(_ValidateMixin, declare, CurrencyTextBox){
		
	return declare("chy.form.Currency1000TextBox",[CurrencyTextBox, _ValidateMixin],{
		
		//constructor
		constructor: function(args){
			declare.safeMixin(this,args);
			this.inherited(arguments);
		},
		
		startup: function(){
			this.set('value',Number(this.get('value'))/1000);
		},
		
		validate: function(isFocused){
			var ans = this.inherited(arguments);
			this.valueNode.value = (Number(this.toString())*1000).toString();
			return ans;
		}
	});
});
