var Virge_Object = function(){
	this.toggleDisplay = function(id, displayType){
		if(typeof displayType == 'undefined'){
			displayType = 'block';
		}
		target = dojo.byId(id);
		if(target.style.display != 'none'){
			target.style.display = 'none';
		} else{
			target.style.display = displayType;
		}
		return this;
	};
	this._pushForm = function (form){
		dojo.xhrPost({
			url: '/base/Attribute/Action/Add.php',
			form: form,
			handleAs: 'json',
			load: function (data){
				//parse out resultes
				alert('test');
			},
			error: function (error){
				console.error('Error: ', error);
			}
		});
	};
}

var Virge = new Virge_Object;


//ATTRIBUTE MANAGER

var Virge_AtrributeManager = function(){
	this.addAttribute = function(){
		dijit.byId(this.DIALOG_NAME).show();
	};
	this.setDialog = function(name){
			this.DIALOG_NAME = name;
	}
}

var V_AM = new Virge_AtrributeManager;